diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/validates_zipcode/validator.rb b/lib/validates_zipcode/validator.rb index <HASH>..<HASH> 100644 --- a/lib/validates_zipcode/validator.rb +++ b/lib/validates_zipcode/validator.rb @@ -27,7 +27,7 @@ module ValidatesZipcode alpha2 = @country_code || record.send(@country_code_attribute) unless ValidatesZipcode::Zipcode.new(zipcode: value.to_s, country_alpha2: alpha2).valid? - record.errors.add(attribute, I18n.t('errors.messages.invalid_zipcode', value: value, default: 'Zipcode is invalid')) + record.errors.add(attribute, :invalid_zipcode, message: I18n.t('errors.messages.invalid_zipcode', value: value, default: 'Zipcode is invalid')) end end end
Add "validator type" to error (dgilperez/validates_zipcode#<I>) One line fiddle, seems to work, all tests pass (ruby <I>).
diff --git a/lib/rubocop/cop/mixin/trailing_comma.rb b/lib/rubocop/cop/mixin/trailing_comma.rb index <HASH>..<HASH> 100644 --- a/lib/rubocop/cop/mixin/trailing_comma.rb +++ b/lib/rubocop/cop/mixin/trailing_comma.rb @@ -124,19 +124,25 @@ module RuboCop end def put_comma(node, items, kind) + return if avoid_autocorrect?(elements(node)) + last_item = items.last return if last_item.block_pass_type? - last_expr = last_item.source_range - ix = last_expr.source.rindex("\n") || 0 - ix += last_expr.source[ix..-1] =~ /\S/ - range = range_between(last_expr.begin_pos + ix, last_expr.end_pos) - autocorrect_range = avoid_autocorrect?(elements(node)) ? nil : range + range = autocorrect_range(last_item) - add_offense(autocorrect_range, range, + add_offense(range, range, format(MSG, 'Put a', format(kind, 'a multiline') + '.')) end + def autocorrect_range(item) + expr = item.source_range + ix = expr.source.rindex("\n") || 0 + ix += expr.source[ix..-1] =~ /\S/ + + range_between(expr.begin_pos + ix, expr.end_pos) + end + # By default, there's no reason to avoid auto-correct. def avoid_autocorrect?(_) false
Reduce complexity in TrailingComma mixin Extract `autocorrect_range` from `put_comma`.
diff --git a/Eloquent/Factories/Factory.php b/Eloquent/Factories/Factory.php index <HASH>..<HASH> 100644 --- a/Eloquent/Factories/Factory.php +++ b/Eloquent/Factories/Factory.php @@ -448,22 +448,22 @@ abstract class Factory protected function expandAttributes(array $definition) { return collect($definition) - ->map(function ($attribute, $key) { + ->map($evaluateRelations = function ($attribute) { if ($attribute instanceof self) { $attribute = $attribute->create()->getKey(); } elseif ($attribute instanceof Model) { $attribute = $attribute->getKey(); } - $definition[$key] = $attribute; - return $attribute; }) - ->map(function ($attribute, $key) use (&$definition) { + ->map(function ($attribute, $key) use (&$definition, $evaluateRelations) { if (is_callable($attribute) && ! is_string($attribute) && ! is_array($attribute)) { $attribute = $attribute($definition); } + $attribute = $evaluateRelations($attribute); + $definition[$key] = $attribute; return $attribute;
[9.x] Factory fails to eval models and factories when returned from closure (#<I>) * Add test to check a factory closure attribute returning a factory is resolved * Fix evaluation of factories and models when returned from a closure in factory definition
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index <HASH>..<HASH> 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -541,6 +541,7 @@ Module.new do FileUtils.cp_r("#{assets_path}/config/webpack", "#{app_template_path}/config/webpack") FileUtils.ln_s("#{assets_path}/node_modules", "#{app_template_path}/node_modules") FileUtils.chdir(app_template_path) do + sh "yarn install" sh "bin/rails webpacker:binstubs" end
Run yarn install in template dir We want to yarn install in the template dir so that templates get a yarn.lock copied over.
diff --git a/api/client/utils.go b/api/client/utils.go index <HASH>..<HASH> 100644 --- a/api/client/utils.go +++ b/api/client/utils.go @@ -102,6 +102,10 @@ func (cli *DockerCli) clientRequest(method, path string, in io.Reader, headers m if cli.tlsConfig == nil { return serverResp, fmt.Errorf("%v.\n* Are you trying to connect to a TLS-enabled daemon without TLS?\n* Is your docker daemon up and running?", err) } + if cli.tlsConfig != nil && strings.Contains(err.Error(), "remote error: bad certificate") { + return serverResp, fmt.Errorf("The server probably has client authentication (--tlsverify) enabled. Please check your TLS client certification settings: %v", err) + } + return serverResp, fmt.Errorf("An error occurred trying to connect: %v", err) }
Add better client error for client certificate failure (missing or denied) This adds a more meaningful error on the client side so the "bad certificate" error coming from the TLS dial code has some context for the user. Docker-DCO-<I>-
diff --git a/lib/Cake/Console/Templates/skel/Controller/PagesController.php b/lib/Cake/Console/Templates/skel/Controller/PagesController.php index <HASH>..<HASH> 100644 --- a/lib/Cake/Console/Templates/skel/Controller/PagesController.php +++ b/lib/Cake/Console/Templates/skel/Controller/PagesController.php @@ -30,13 +30,6 @@ class PagesController extends AppController { /** - * Default helper - * - * @var array - */ - public $helpers = array('Html'); - -/** * This controller does not use a model * * @var array
Removing hardcoded helper from PagesController in skel
diff --git a/src/javascript/lib/core/erlang_compat/maps.js b/src/javascript/lib/core/erlang_compat/maps.js index <HASH>..<HASH> 100644 --- a/src/javascript/lib/core/erlang_compat/maps.js +++ b/src/javascript/lib/core/erlang_compat/maps.js @@ -13,7 +13,8 @@ function is_non_primitive(key) { erlang.is_map(key) || erlang.is_pid(key) || erlang.is_reference(key) || - erlang.is_bitstring(key) + erlang.is_bitstring(key) || + erlang.is_tuple(key) ); }
Make sure to check for tuples
diff --git a/spec/dummy/spec/lib/punto_pagos_rails/transaction_service_spec.rb b/spec/dummy/spec/lib/punto_pagos_rails/transaction_service_spec.rb index <HASH>..<HASH> 100644 --- a/spec/dummy/spec/lib/punto_pagos_rails/transaction_service_spec.rb +++ b/spec/dummy/spec/lib/punto_pagos_rails/transaction_service_spec.rb @@ -77,7 +77,7 @@ RSpec.describe TransactionService do allow(Ticket).to receive(:find).with(ticket.id).and_return(ticket) service.create expect(ticket.errors[:base]).to include( - I18n.t("activerecord.errors.models.ticket.attributes.base.invalid_puntopagos_response")) + I18n.t("punto_pagos_rails.errors.invalid_puntopagos_response")) end end
fix(test): compare with wrong error label
diff --git a/php-binance-api.php b/php-binance-api.php index <HASH>..<HASH> 100644 --- a/php-binance-api.php +++ b/php-binance-api.php @@ -86,7 +86,7 @@ class API { } public function history($symbol, $limit = 500, $fromTradeId = 1) { return $this->httpRequest("v3/myTrades", "GET", ["symbol"=>$symbol, "limit"=>$limit, "fromId"=>$fromTradeId], true); - } + } public function useServerTime() { $serverTime = $this->httpRequest("v1/time")['serverTime']; $this->info['timeOffset'] = $serverTime - (microtime(true)*1000); @@ -123,7 +123,7 @@ class API { return $this->bookPriceData($this->httpRequest("v3/ticker/bookTicker")); } public function account() { - return $this->httpRequest("v3/account", true); + return $this->httpRequest("v3/account", "GET", [], true); } public function prevDay($symbol) { return $this->httpRequest("v1/ticker/24hr", "GET", ["symbol"=>$symbol]);
This closes #<I> Issue with missing signed request Many thanks to zth<I>
diff --git a/fleetspeak/src/e2etesting/balancer/balancer.go b/fleetspeak/src/e2etesting/balancer/balancer.go index <HASH>..<HASH> 100644 --- a/fleetspeak/src/e2etesting/balancer/balancer.go +++ b/fleetspeak/src/e2etesting/balancer/balancer.go @@ -18,6 +18,7 @@ import ( var ( serversFile = flag.String("servers_file", "", "File with server hosts") serverFrontendAddr = flag.String("frontend_address", "", "Frontend address for clients to connect") + useProxyProto = flag.Bool("use_proxy_proto", true, "Whether to forward client information using proxy proto") ) func copy(wc io.WriteCloser, r io.Reader) { @@ -64,9 +65,11 @@ func run() error { } } log.Printf("Connection accepted, server: %v\n", serverAddr) - err = proxyproto.WriteFirstProxyMessage(serverConn, lbConn.RemoteAddr().String(), serverAddr) - if err != nil { - return err + if *useProxyProto { + err = proxyproto.WriteFirstProxyMessage(serverConn, lbConn.RemoteAddr().String(), serverAddr) + if err != nil { + return err + } } go copy(serverConn, lbConn) go copy(lbConn, serverConn)
In e2e testing load balancer, make usage of proxyproto optional. (#<I>)
diff --git a/src/main/java/sh/tak/appbundler/CreateApplicationBundleMojo.java b/src/main/java/sh/tak/appbundler/CreateApplicationBundleMojo.java index <HASH>..<HASH> 100644 --- a/src/main/java/sh/tak/appbundler/CreateApplicationBundleMojo.java +++ b/src/main/java/sh/tak/appbundler/CreateApplicationBundleMojo.java @@ -337,7 +337,7 @@ public class CreateApplicationBundleMojo extends AbstractMojo { new File(binFolder, filename).setExecutable(true, false); } // creating fake folder if a JRE is used - File jdkDylibFolder = new File(jrePath, "Contents/Home/jre/jli/libjli.dylib"); + File jdkDylibFolder = new File(jrePath, "Contents/Home/jre/lib/jli/libjli.dylib"); if (!jdkDylibFolder.exists()) { getLog().info("Assuming that this is a JRE creating fake folder"); File fakeJdkFolder = new File(pluginsDirectory, "Contents/Home/jre/lib");
Missing lib in path added.
diff --git a/psiturk/amt_services.py b/psiturk/amt_services.py index <HASH>..<HASH> 100644 --- a/psiturk/amt_services.py +++ b/psiturk/amt_services.py @@ -408,7 +408,7 @@ class MTurkServices(object): worker_data = [{ 'hitId': worker.HITId, 'assignmentId': worker.AssignmentId, - 'workerId': worker.Worker_id, + 'workerId': worker.WorkerId, 'submit_time': worker.SubmitTime, 'accept_time': worker.AcceptTime, 'status': worker.assignment_status @@ -422,7 +422,7 @@ class MTurkServices(object): try: bonus = MTurkConnection.get_price_as_price(amount) assignment = self.mtc.get_assignment(assignment_id)[0] - worker_id = assignment.Worker_id + worker_id = assignment.WorkerId self.mtc.grant_bonus(worker_id, assignment_id, bonus, reason) return True except MTurkRequestError as exception:
Fixes typo introduced in worker API
diff --git a/test/cluster/client/client.go b/test/cluster/client/client.go index <HASH>..<HASH> 100644 --- a/test/cluster/client/client.go +++ b/test/cluster/client/client.go @@ -16,6 +16,7 @@ import ( type Client struct { *httpclient.Client cluster *tc.Cluster + size int } var ErrNotFound = errors.New("testcluster: resource not found") @@ -34,11 +35,12 @@ func NewClient(endpoint string) (*Client, error) { return nil, err } client.cluster = &cluster + client.size = cluster.Size() return client, nil } func (c *Client) Size() int { - return c.cluster.Size() + return c.size } func (c *Client) BackoffPeriod() time.Duration { @@ -62,6 +64,7 @@ func (c *Client) AddHost(ch chan *host.HostEvent, vanilla bool) (*tc.Instance, e select { case event := <-ch: if event.HostID == instance.ID { + c.size++ return &instance, nil } case <-time.After(60 * time.Second): @@ -71,6 +74,7 @@ func (c *Client) AddHost(ch chan *host.HostEvent, vanilla bool) (*tc.Instance, e } func (c *Client) RemoveHost(host *tc.Instance) error { + c.size-- return c.Delete("/" + host.ID) }
test: Fix testCluster.Size() TestOmniJobs uses testCluster.Size() to determine how many jobs to wait for, so it should not include hosts which have been removed.
diff --git a/sources/scalac/transformer/AddConstructors.java b/sources/scalac/transformer/AddConstructors.java index <HASH>..<HASH> 100644 --- a/sources/scalac/transformer/AddConstructors.java +++ b/sources/scalac/transformer/AddConstructors.java @@ -63,7 +63,8 @@ public class AddConstructors extends Transformer { super(global); this.constructors = constructors; this.forINT = global.target == global.TARGET_INT; - this.forJVM = global.target == global.TARGET_JVM; + this.forJVM = (global.target == global.TARGET_JVM + || global.target == global.TARGET_JVM_BCEL); this.forMSIL = global.target == global.TARGET_MSIL; }
- bug fix: also set flag forJVM when generating... - bug fix: also set flag forJVM when generating JVM bytecodes with BCEL.
diff --git a/shablona/shablona.py b/shablona/shablona.py index <HASH>..<HASH> 100644 --- a/shablona/shablona.py +++ b/shablona/shablona.py @@ -2,15 +2,19 @@ import numpy as np import pandas as pd import scipy.optimize as opt from scipy.special import erf -from .due import due, Doi, BibTeX +from .due import due, Doi __all__ = ["Model", "Fit", "opt_err_func", "transform_data", "cumgauss"] # Use duecredit (duecredit.org) to provide a citation to relevant work to -# be cited. This does nothing, unless the user has duecredit installted, +# be cited. This does nothing, unless the user has duecredit installed, # And calls this with duecredit (as in `python -m duecredit script.py`): -due.cite(Doi("10.1167/13.9.30")) +due.cite(Doi("10.1167/13.9.30"), + description="Template project for small scientific Python projects", + tags=["reference-implementation"], + path='shablona') + def transform_data(data): """
ENH: extend duecredit's definition for shablona added description (so it lists nicely, otherwise how could we know what it is about?), tags to specify that this is the canonical reference (not just an implementation of what is cited in the url) and 'path' since that one is not deduced automagically removed unused import to please flake8
diff --git a/lib/octave_formatter.rb b/lib/octave_formatter.rb index <HASH>..<HASH> 100644 --- a/lib/octave_formatter.rb +++ b/lib/octave_formatter.rb @@ -35,14 +35,16 @@ class OctaveFormatter hold on; plot(rate, reply_rate_stddev, '-kh'); hold on; - plot(rate, errors, '-r<'); + plot(rate, reply_time, '-g*'); + hold on; + plot(rate, errors, '-r*'); grid on; axis([0 #{rate.last} 0 #{rate.last}]); title('Hansel report for #{@data[:server]}:#{@data[:port]}#{@data[:uri]} (#{@data[:num_conns]} connections per run)') xlabel('Demanded Request Rate'); - legend('Request Rate', 'Connection Rate', 'Avg. reply rate', 'Max. reply rate', 'Reply rate StdDev', 'Errors'); + legend('Request Rate', 'Connection Rate', 'Avg. reply rate', 'Max. reply rate', 'Reply rate StdDev', 'Reply time', 'Errors'); print('#{@png_output}', '-dpng') EOS result = result.gsub ' ', ''
octave formatter: plot the reply time
diff --git a/registration/model.py b/registration/model.py index <HASH>..<HASH> 100644 --- a/registration/model.py +++ b/registration/model.py @@ -42,10 +42,10 @@ class RegistrationModel(object): (k, v) = item return self.transformations[k].apply(v) - return images.map(apply, with_keys=True) + return images.map(apply, value_shape=images.value_shape, dtype=images.dtype, with_keys=True) def __repr__(self): s = self.__class__.__name__ s += '\nlength: %g' % len(self.transformations) s += '\nalgorithm: ' + self.algorithm - return s \ No newline at end of file + return s
skip shape and dtype check during transform
diff --git a/src/processor.js b/src/processor.js index <HASH>..<HASH> 100644 --- a/src/processor.js +++ b/src/processor.js @@ -107,9 +107,7 @@ function processRoom(roomId, intents, objects, terrain, gameTime, roomInfo, flag roomSpawns.push(object); } - if(!driver.config.emit('processObject',object, objects, terrain, gameTime, roomInfo, bulk, userBulk)) { - object._skip = true; - } + driver.config.emit('processObject',object, objects, terrain, gameTime, roomInfo, bulk, userBulk); });
refact(modding): replace callbacks with EventEmitters
diff --git a/indra/databases/chembl_client.py b/indra/databases/chembl_client.py index <HASH>..<HASH> 100644 --- a/indra/databases/chembl_client.py +++ b/indra/databases/chembl_client.py @@ -145,7 +145,6 @@ def query_target(target_chembl_id): 'params': {'target_chembl_id': target_chembl_id, 'limit': 1}} res = send_query(query_dict) - assert(res['page_meta']['total_count'] == 1) target = res['targets'][0] return target diff --git a/indra/tests/test_chembl_client.py b/indra/tests/test_chembl_client.py index <HASH>..<HASH> 100644 --- a/indra/tests/test_chembl_client.py +++ b/indra/tests/test_chembl_client.py @@ -39,7 +39,7 @@ def test_activity_query(): def test_target_query(): - target = query_target(braf_chembl_id) + target = chembl_client.query_target(braf_chembl_id) assert(target['target_type'] == 'SINGLE PROTEIN')
Do not assert in query_target_function
diff --git a/packages/roc-package-module-dev/src/actions/build.js b/packages/roc-package-module-dev/src/actions/build.js index <HASH>..<HASH> 100644 --- a/packages/roc-package-module-dev/src/actions/build.js +++ b/packages/roc-package-module-dev/src/actions/build.js @@ -51,9 +51,9 @@ const buildWithBabel = (target, settings) => { /** * Builds source files based on the configuration using Babel. * - * @param {Object} rocCommandObject - A command object. + * @param {Object} settings - Roc settings object. * - * @returns {Promise} - Promise that is resolved when build is completed. + * @returns {Function} - A correct Roc action. */ export default (settings) => (targets) => { // If not at least on of the targets matches the valid ones it will ignore it. Makes it smarter when combining.
Fixed a small ESLint problem releasted to JSDoc
diff --git a/gptools/utils.py b/gptools/utils.py index <HASH>..<HASH> 100644 --- a/gptools/utils.py +++ b/gptools/utils.py @@ -165,8 +165,18 @@ class UniformJointPrior(JointPrior): ---------- bounds : list of tuples, (`num_params`,) The bounds for each of the random variables. + ub : list of float, (`num_params`,), optional + The upper bounds for each of the random variables. If present, `bounds` + is then taken to be a list of float with the lower bounds. This gives + :py:class:`UniformJointPrior` a similar calling fingerprint as the other + :py:class:`JointPrior` classes. """ - def __init__(self, bounds): + def __init__(self, bounds, ub=None): + if ub is not None: + try: + bounds = zip(bounds, ub) + except TypeError: + bounds = [(bounds, ub)] self.bounds = bounds def __call__(self, theta):
Small tweaks to help profiletools.
diff --git a/lib/identity_code/lv.rb b/lib/identity_code/lv.rb index <HASH>..<HASH> 100644 --- a/lib/identity_code/lv.rb +++ b/lib/identity_code/lv.rb @@ -68,6 +68,10 @@ module IdentityCode now.year - (birth_date.year + IdentityCode.age_correction(birth_date)) end + def sex + nil + end + private def century diff --git a/lib/identity_code/version.rb b/lib/identity_code/version.rb index <HASH>..<HASH> 100644 --- a/lib/identity_code/version.rb +++ b/lib/identity_code/version.rb @@ -1,3 +1,3 @@ module IdentityCode - VERSION = '0.2.4' + VERSION = '0.2.5' end
No sex in Latvia 🙈
diff --git a/holoviews/plotting/bokeh/util.py b/holoviews/plotting/bokeh/util.py index <HASH>..<HASH> 100644 --- a/holoviews/plotting/bokeh/util.py +++ b/holoviews/plotting/bokeh/util.py @@ -64,7 +64,10 @@ def mpl_to_bokeh(properties): elif k == 'marker': new_properties.update(markers.get(v, {'marker': v})) elif k == 'color' or k.endswith('_color'): - new_properties[k] = colors.ColorConverter.colors.get(v, v) + v = colors.ColorConverter.colors.get(v, v) + if isinstance(v, tuple): + v = colors.rgb2hex(v) + new_properties[k] = v else: new_properties[k] = v new_properties.pop('cmap', None)
Fixed color conversions in bokeh utility
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ BASE_DIR = os.path.join(os.path.expanduser("~"), ".indy") LOG_DIR = os.path.join(BASE_DIR, "log") CONFIG_FILE = os.path.join(BASE_DIR, "indy_config.py") -tests_require = ['pytest==3.4.1', 'pytest-xdist==1.22.1', 'python3-indy==1.3.1-dev-469'] +tests_require = ['pytest==3.3.1', 'pytest-xdist==1.22.1', 'python3-indy==1.3.1-dev-469'] setup( name='indy-node-dev',
[Test purpose] Decrease pytest version for _fixture_values using
diff --git a/src/components/seek_time/seek_time.js b/src/components/seek_time/seek_time.js index <HASH>..<HASH> 100644 --- a/src/components/seek_time/seek_time.js +++ b/src/components/seek_time/seek_time.js @@ -49,8 +49,8 @@ class SeekTime extends UIObject { var offsetX = event.pageX - $(event.target).offset().left var pos = offsetX / $(event.target).width() * 100 pos = Math.min(100, Math.max(pos, 0)) - var currentTime = pos * this.mediaControl.container.getDuration() / 100; - this.time = formatTime(currentTime); + this.currentTime = pos * this.mediaControl.container.getDuration() / 100; + this.time = formatTime(this.currentTime); this.$el.css('left', event.pageX - Math.floor((this.$el.width() / 2) + 6)); this.$el.removeClass('hidden'); this.render();
seek time: set currentTime as attribute
diff --git a/src/wavesurfer.js b/src/wavesurfer.js index <HASH>..<HASH> 100644 --- a/src/wavesurfer.js +++ b/src/wavesurfer.js @@ -95,6 +95,22 @@ var WaveSurfer = { this.drawer.progress(0); }, + /** + * Set the playback volume. + * + * newVolume A value between -1 and 1, -1 being no volume and 1 being full volume. + */ + setVolume: function(newVolume) { + + }, + + /** + * Toggle the volume on and off. + */ + mute: function() { + + }, + mark: function (options) { var my = this; var timings = this.timings(0);
Added setVolume and mute methods to the wavesurfer class as the main end points for controlling the playback volume. Implementation to follow.
diff --git a/src/Transition.js b/src/Transition.js index <HASH>..<HASH> 100644 --- a/src/Transition.js +++ b/src/Transition.js @@ -51,7 +51,7 @@ export default class Transition extends Component { } } - pivot (props, first) { + pivot (props) { const { getKey, data,
Remove unused var (#<I>) Just taking out this unused "first" variable to avoid confusion.
diff --git a/slacker/__init__.py b/slacker/__init__.py index <HASH>..<HASH> 100644 --- a/slacker/__init__.py +++ b/slacker/__init__.py @@ -435,6 +435,13 @@ class Chat(BaseAPI): 'user_auth_url': user_auth_url, }) + def get_permalink(self, channel, message_ts): + return self.get('chat.getPermalink', + params={ + 'channel': channel, + 'message_ts': message_ts + }) + class IM(BaseAPI): def list(self):
Add the new method of chat.getPermalink
diff --git a/src/components/navbar/messages.js b/src/components/navbar/messages.js index <HASH>..<HASH> 100644 --- a/src/components/navbar/messages.js +++ b/src/components/navbar/messages.js @@ -97,20 +97,16 @@ export default defineMessages({ id: 'NavBar.Discounts.add', defaultMessage: 'Add discount', }, - 'NavBar.ProjectSettings.title': { - id: 'NavBar.ProjectSettings.title', + 'NavBar.Settings.title': { + id: 'NavBar.Settings.title', defaultMessage: 'Settings', }, - 'NavBar.Taxes.title': { - id: 'NavBar.Taxes.title', - defaultMessage: 'Taxes', - }, - 'NavBar.International.title': { - id: 'NavBar.International.title', - defaultMessage: 'International', + 'NavBar.ProjectSettings.title': { + id: 'NavBar.ProjectSettings.title', + defaultMessage: 'Project settings', }, - 'NavBar.ShippingMethods.title': { - id: 'NavBar.ShippingMethods.title', - defaultMessage: 'Shipping methods', + 'NavBar.ProductTypes.title': { + id: 'NavBar.ProductTypes.title', + defaultMessage: 'Product types', }, });
refactor(Settings): move project-settings to sub-route, add product-types sub-route
diff --git a/features/step_definitions/jekyll_steps.rb b/features/step_definitions/jekyll_steps.rb index <HASH>..<HASH> 100644 --- a/features/step_definitions/jekyll_steps.rb +++ b/features/step_definitions/jekyll_steps.rb @@ -14,7 +14,7 @@ Given /^I have a blank site in "(.*)"$/ do |path| end Given /^I do not have a "(.*)" directory$/ do |path| - Dir.exists?("#{TEST_DIR}/#{path}") + File.directory?("#{TEST_DIR}/#{path}") end # Like "I have a foo file" but gives a yaml front matter so jekyll actually processes it @@ -141,7 +141,7 @@ Then /^the (.*) directory should exist$/ do |dir| end Then /^the "(.*)" file should exist in the (.*) path$/ do |file, path| - assert File.file?("#{TEST_DIR}/#{path}/#{file}") + assert File.exists?("#{TEST_DIR}/#{path}/#{file}") end Then /^the (.*) directory should exist in the (.*) path$/ do |dir, path|
Switch it to file.exists? and File.directory? so <I> doesn't complain.
diff --git a/angr/knowledge/function.py b/angr/knowledge/function.py index <HASH>..<HASH> 100644 --- a/angr/knowledge/function.py +++ b/angr/knowledge/function.py @@ -64,7 +64,7 @@ class Function(object): if project.is_hooked(addr): hooker = project.hooked_by(addr) name = hooker.display_name - else: + elif project._simos.is_syscall_addr(addr): syscall_inst = project._simos.syscall_from_addr(addr) name = syscall_inst.display_name diff --git a/angr/simos.py b/angr/simos.py index <HASH>..<HASH> 100644 --- a/angr/simos.py +++ b/angr/simos.py @@ -246,6 +246,20 @@ class SimOS(object): basic_addr = self.project.loader.extern_object.get_pseudo_addr(symbol_name) return basic_addr, basic_addr + # Dummy stuff to allow this API to be used freely + + def syscall(self, state, allow_unsupported=True): + return None + + def is_syscall_addr(self, addr): + return False + + def syscall_from_addr(self, addr, allow_unsupported=True): + return None + + def syscall_from_number(self, number, allow_unsupported=True): + return None + class SimUserland(SimOS): """
Add dummy shim for syscall stuff in SimOS base
diff --git a/tests/DispatcherTest.php b/tests/DispatcherTest.php index <HASH>..<HASH> 100644 --- a/tests/DispatcherTest.php +++ b/tests/DispatcherTest.php @@ -19,7 +19,7 @@ class DispatcherTest extends TestCase new FakeEndPointMiddleware(), ]); - $this->assertResponse('', $dispatcher->dispatch(new ServerRequest())); + $this->assertResponse('', $dispatcher(new ServerRequest())); } public function testMiddleware() @@ -148,6 +148,28 @@ class DispatcherTest extends TestCase $dispatcher->dispatch(new ServerRequest()); } + public function testInvalidStringMiddlewareException() + { + $this->expectException(InvalidArgumentException::class); + + $dispatcher = new Dispatcher([ + 'invalid' + ]); + + $dispatcher->dispatch(new ServerRequest()); + } + + public function testInvalidMatcherException() + { + $this->expectException(InvalidArgumentException::class); + + $dispatcher = new Dispatcher([ + [new Datetime(), new FakeMiddleware()] + ]); + + $dispatcher->dispatch(new ServerRequest()); + } + private function assertResponse(string $body, ResponseInterface $response) { $this->assertEquals($body, (string) $response->getBody());
added tests for <I>% coverage
diff --git a/valley/mixins.py b/valley/mixins.py index <HASH>..<HASH> 100644 --- a/valley/mixins.py +++ b/valley/mixins.py @@ -198,7 +198,7 @@ class BooleanMixin(VariableMixin): self.validators = [BooleanValidator()] def get_db_value(self, value): - return bool(value) + return self.get_python_value(value) def get_python_value(self, value): true_vals = ('True', 'true', 1, '1',True)
fixed get_db_Value for BooleanMixin
diff --git a/lib/IDS/Converter.php b/lib/IDS/Converter.php index <HASH>..<HASH> 100644 --- a/lib/IDS/Converter.php +++ b/lib/IDS/Converter.php @@ -561,6 +561,9 @@ class IDS_Converter $value ); + // normalize separation char repetion + $value = preg_replace('/([.+~=\-])\1{2,}/m', '$1', $value); + //remove parenthesis inside sentences $value = preg_replace('/(\w\s)\(([&\w]+)\)(\s\w|$)/', '$1$2$3', $value);
added code to deal with abnormal repetiton of separation chars
diff --git a/src/ol/proj/proj.js b/src/ol/proj/proj.js index <HASH>..<HASH> 100644 --- a/src/ol/proj/proj.js +++ b/src/ol/proj/proj.js @@ -228,11 +228,9 @@ goog.inherits(ol.Proj4jsProjection_, ol.Projection); * @inheritDoc */ ol.Proj4jsProjection_.prototype.getMetersPerUnit = function() { - var metersPerUnit; - if (!goog.isNull(this.units_)) { + var metersPerUnit = this.proj4jsProj_.to_meter; + if (!goog.isDef(metersPerUnit)) { metersPerUnit = ol.METERS_PER_UNIT[this.units_]; - } else { - metersPerUnit = this.getProj4jsProj().to_meter; } return metersPerUnit; };
Less code Since out meters per unit conversion table is a bit spare, prefer the configured conversion.
diff --git a/tests/test_jujupy.py b/tests/test_jujupy.py index <HASH>..<HASH> 100644 --- a/tests/test_jujupy.py +++ b/tests/test_jujupy.py @@ -1516,6 +1516,13 @@ class TestEnvJujuClient(ClientTest): client.wait_for_started(start=now - timedelta(1200)) self.assertEqual(writes, ['pending: jenkins/0', '\n']) + def test__wait_for_status_suppresses_deadline(self): + client = EnvJujuClient(JujuData('local'), None, None) + client._wait_for_status(None, None) + soft_deadline = datetime(2015, 1, 2, 3, 4, 6) + now = soft_deadline + timedelta(seconds=1) + client._backend.soft_deadline = soft_deadline + def test_wait_for_started_logs_status(self): value = self.make_status_yaml('agent-state', 'pending', 'started') client = EnvJujuClient(JujuData('local'), None, None)
Start testing wait_for_status.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ def tag_version(): """Generate version number from Git Tag, e.g. v2.0.0, v2.0.0-1.""" recent_tag = subprocess.check_output(shlex.split('git describe --long')) tag, count, _ = recent_tag.decode().split('-') - version = '-'.join([tag, count]) if int(count) else tag + version = 'a'.join([tag, count]) if int(count) else tag return version
feat: Default to alpha releases
diff --git a/codeTemplates/src/Entity/Repositories/AbstractEntityRepository.php b/codeTemplates/src/Entity/Repositories/AbstractEntityRepository.php index <HASH>..<HASH> 100644 --- a/codeTemplates/src/Entity/Repositories/AbstractEntityRepository.php +++ b/codeTemplates/src/Entity/Repositories/AbstractEntityRepository.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); namespace TemplateNamespace\Entity\Repositories; -// phpcs:disable - line length +// phpcs:disable -- line length use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Mapping; diff --git a/codeTemplates/src/Entity/Repositories/TemplateEntityRepository.php b/codeTemplates/src/Entity/Repositories/TemplateEntityRepository.php index <HASH>..<HASH> 100644 --- a/codeTemplates/src/Entity/Repositories/TemplateEntityRepository.php +++ b/codeTemplates/src/Entity/Repositories/TemplateEntityRepository.php @@ -3,7 +3,7 @@ namespace TemplateNamespace\Entity\Repositories; use FQNFor\AbstractEntityRepository; -// phpcs:disable - line length +// phpcs:disable -- line length class TemplateEntityRepository extends AbstractEntityRepository { // phpcs: enable
May have made a mistake with the csignore comments
diff --git a/lib/cuda/driver/ffi-cu.rb b/lib/cuda/driver/ffi-cu.rb index <HASH>..<HASH> 100644 --- a/lib/cuda/driver/ffi-cu.rb +++ b/lib/cuda/driver/ffi-cu.rb @@ -122,9 +122,12 @@ module API :MAXIMUM_TEXTURE3D_WIDTH, 24, :MAXIMUM_TEXTURE3D_HEIGHT, 25, :MAXIMUM_TEXTURE3D_DEPTH, 26, - :MAXIMUM_TEXTURE2D_ARRAY_WIDTH, 27, - :MAXIMUM_TEXTURE2D_ARRAY_HEIGHT, 28, - :MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES, 29, + :MAXIMUM_TEXTURE2D_LAYERED_WIDTH, 27, + :MAXIMUM_TEXTURE2D_LAYERED_HEIGHT, 28, + :MAXIMUM_TEXTURE2D_LAYERED_LAYERS, 29, + :MAXIMUM_TEXTURE2D_ARRAY_WIDTH, 27, # Deprecated. + :MAXIMUM_TEXTURE2D_ARRAY_HEIGHT, 28, # Deprecated. + :MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES, 29, # Deprecated. :SURFACE_ALIGNMENT, 30, :CONCURRENT_KERNELS, 31, :ECC_ENABLED, 32,
CU: Update texture attributes of CUDeviceAttribute for CUDA <I>.
diff --git a/trovebox/http.py b/trovebox/http.py index <HASH>..<HASH> 100644 --- a/trovebox/http.py +++ b/trovebox/http.py @@ -105,7 +105,7 @@ class Http(object): self._logger.info("GET %s" % url) self._logger.info("---") self._logger.info(response.text[:1000]) - if len(response.text) > 1000: + if len(response.text) > 1000: # pragma: no cover self._logger.info("[Response truncated to 1000 characters]") self.last_url = url @@ -161,7 +161,7 @@ class Http(object): self._logger.info("files: %s" % repr(files)) self._logger.info("---") self._logger.info(response.text[:1000]) - if len(response.text) > 1000: + if len(response.text) > 1000: # pragma: no cover self._logger.info("[Response truncated to 1000 characters]") self.last_url = url
No coverage required for response logging truncation
diff --git a/lib/openapi3_parser/source.rb b/lib/openapi3_parser/source.rb index <HASH>..<HASH> 100644 --- a/lib/openapi3_parser/source.rb +++ b/lib/openapi3_parser/source.rb @@ -72,7 +72,7 @@ module Openapi3Parser data.dig(*json_pointer) if data.respond_to?(:dig) end - def has_pointer?(json_pointer) # rubocop:disable Style/PredicateName + def has_pointer?(json_pointer) # rubocop:disable Naming/PredicateName !data_at_pointer(json_pointer).nil? end
Rename rubocop rule disabling This was incorrectly namespaced to Style when it is actually under Naming namespace.
diff --git a/src/Models/Monitor.php b/src/Models/Monitor.php index <HASH>..<HASH> 100644 --- a/src/Models/Monitor.php +++ b/src/Models/Monitor.php @@ -76,7 +76,7 @@ class Monitor extends Model { parent::boot(); - static::saving(function (Monitor $monitor) { + static::saving(function (self $monitor) { if (static::alreadyExists($monitor)) { throw CannotSaveMonitor::alreadyExists($monitor); }
Apply fixes from StyleCI (#<I>)
diff --git a/workbench/server/dir_watcher.py b/workbench/server/dir_watcher.py index <HASH>..<HASH> 100644 --- a/workbench/server/dir_watcher.py +++ b/workbench/server/dir_watcher.py @@ -26,7 +26,7 @@ class DirWatcher(object): def start_monitoring(self): """ Monitor the path given """ - self.jobs = [gevent.spawn(self._start_monitoring)] + # self.jobs = [gevent.spawn(self._start_monitoring)] def _start_monitoring(self): """ Internal method that monitors the directory for changes """
disable file monitoring until we figure out a bad bug
diff --git a/test/spec/Editor-test.js b/test/spec/Editor-test.js index <HASH>..<HASH> 100644 --- a/test/spec/Editor-test.js +++ b/test/spec/Editor-test.js @@ -184,6 +184,12 @@ define(function (require, exports, module) { // Mode for range - mix of modes myEditor.setSelection({line: 2, ch: 4}, {line: 3, ch: 7}); expect(myEditor.getModeForSelection()).toBeNull(); + + // Mode for range - mix of modes where start & endpoints are same mode + // Known limitation of getModeForSelection() that it does not spot where the mode + // differs in mid-selection + myEditor.setSelection({line: 0, ch: 0}, {line: 6, ch: 14}); // select all + expect(myEditor.getModeForSelection()).toBe("html"); }); });
Add one more unit test, requested in code review - mixed mode selection range the exposes the limitations of only looking at start & end of range.
diff --git a/vault/core.go b/vault/core.go index <HASH>..<HASH> 100644 --- a/vault/core.go +++ b/vault/core.go @@ -666,16 +666,16 @@ func (c *Core) Standby() (bool, error) { func (c *Core) Leader() (bool, string, error) { c.stateLock.RLock() defer c.stateLock.RUnlock() - // Check if sealed - if c.sealed { - return false, "", ErrSealed - } - // Check if HA enabled if c.ha == nil { return false, "", ErrHANotEnabled } + // Check if sealed + if c.sealed { + return false, "", ErrSealed + } + // Check if we are the leader if !c.standby { return true, c.advertiseAddr, nil
vault: Swap the HAEnabled check with the sealed check
diff --git a/web/src/test/java/uk/ac/ebi/atlas/acceptance/rest/tests/mtab1066/MTAB1066GeneProfilesDownloadControllerIT.java b/web/src/test/java/uk/ac/ebi/atlas/acceptance/rest/tests/mtab1066/MTAB1066GeneProfilesDownloadControllerIT.java index <HASH>..<HASH> 100644 --- a/web/src/test/java/uk/ac/ebi/atlas/acceptance/rest/tests/mtab1066/MTAB1066GeneProfilesDownloadControllerIT.java +++ b/web/src/test/java/uk/ac/ebi/atlas/acceptance/rest/tests/mtab1066/MTAB1066GeneProfilesDownloadControllerIT.java @@ -78,7 +78,7 @@ public class MTAB1066GeneProfilesDownloadControllerIT { ResponseBody body = subject.getResponseBody(); String[] lines = body.asString().split("\n"); - assertThat(lines.length, is(176)); + assertThat(lines.length, greaterThan(170)); } } \ No newline at end of file
as index size varies between a fresh local index and an old index on lime, had to soften gene profile download length test
diff --git a/lib/veritas/relation/empty.rb b/lib/veritas/relation/empty.rb index <HASH>..<HASH> 100644 --- a/lib/veritas/relation/empty.rb +++ b/lib/veritas/relation/empty.rb @@ -3,8 +3,10 @@ module Veritas class Empty < Materialized include Optimizable # for no-op #optimize + ZERO_TUPLE = [].freeze + def initialize(header) - super(header, Set.new) + super(header, ZERO_TUPLE) @predicate = Logic::Proposition::False.instance end
Use an Array to initialize an Empty relation
diff --git a/trunk/JLanguageTool/src/main/dev/org/languagetool/dev/WordTokenizer.java b/trunk/JLanguageTool/src/main/dev/org/languagetool/dev/WordTokenizer.java index <HASH>..<HASH> 100644 --- a/trunk/JLanguageTool/src/main/dev/org/languagetool/dev/WordTokenizer.java +++ b/trunk/JLanguageTool/src/main/dev/org/languagetool/dev/WordTokenizer.java @@ -37,7 +37,6 @@ import org.languagetool.Language; */ public final class WordTokenizer { - public static void main(final String[] args) throws IOException { final WordTokenizer prg = new WordTokenizer(); if (args.length != 1) { @@ -48,7 +47,6 @@ public final class WordTokenizer { } private void run(final String lang) throws IOException { - JLanguageTool langTool = new JLanguageTool( Language.getLanguageForShortName(lang)); BufferedReader in = null; @@ -63,14 +61,9 @@ public final class WordTokenizer { for (AnalyzedTokenReadings a : atr) { out.write(a.getToken()); out.write("\n"); - } + } } - } - catch (IOException e) { - System.err.println("IOException reading System.in" + e); - throw e; - } - finally { + } finally { if (in != null) { in.close(); }
small code simplification: no need to catch exception
diff --git a/lib/celluloid/calls.rb b/lib/celluloid/calls.rb index <HASH>..<HASH> 100644 --- a/lib/celluloid/calls.rb +++ b/lib/celluloid/calls.rb @@ -3,7 +3,11 @@ module Celluloid class Call attr_reader :method, :arguments, :block + RETRY_CALL = 3 + RETRY_LIMIT = 5 + def initialize(method, arguments = [], block = nil) + @retry = 0 @method, @arguments = method, arguments if block if Celluloid.exclusive? @@ -24,6 +28,11 @@ module Celluloid check(obj) _b = @block && @block.to_proc obj.public_send(@method, *@arguments, &_b) + rescue Celluloid::TimeoutError => ex + raise ex unless ( @retry += 1 ) <= RETRY_LIMIT + Internals::Logger.warn("TimeoutError at Call dispatch. Retrying in #{RETRY_CALL} seconds. ( Attempt #{@retry} of #{RETRY_LIMIT} )") + sleep RETRY_CALL + retry end def check(obj)
retry structure for calls coming in primatively, to be continued in #<I>
diff --git a/config/initializers/indexing_adapter_initializer.rb b/config/initializers/indexing_adapter_initializer.rb index <HASH>..<HASH> 100644 --- a/config/initializers/indexing_adapter_initializer.rb +++ b/config/initializers/indexing_adapter_initializer.rb @@ -5,7 +5,7 @@ require 'valkyrie/indexing/null_indexing_adapter' Rails.application.config.to_prepare do Valkyrie::IndexingAdapter.register( - Valkyrie::Indexing::Solr::IndexingAdapter.new(), + Valkyrie::Indexing::Solr::IndexingAdapter.new, :solr_index ) Valkyrie::IndexingAdapter.register(
updated lint regarding no params on method call
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,10 +18,14 @@ module.exports = function(grunt) { port: 8050, host: "*", keepalive: true, - livereload: true + livereload: true, + open: { + target: 'http://localhost:8050/tests/SpecRunner.html', + appName: 'xdg-open', + callback: function() {} // App that will be called with the target url to open the browser. + } } } - }, mocha: { test: {
Automatically open test page in browser using xdg-open.
diff --git a/src/sap.ui.core/src/sap/ui/model/FilterProcessor.js b/src/sap.ui.core/src/sap/ui/model/FilterProcessor.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.core/src/sap/ui/model/FilterProcessor.js +++ b/src/sap.ui.core/src/sap/ui/model/FilterProcessor.js @@ -101,7 +101,7 @@ sap.ui.define(['./Filter', 'jquery.sap.global', 'jquery.sap.unicode'], if (typeof oValue == "string") { // Internet Explorer and Edge cannot uppercase properly on composed characters if (String.prototype.normalize && (sap.ui.Device.browser.msie || sap.ui.Device.browser.edge)) { - oValue = oValue.normalize("NFD"); + oValue = oValue.normalize("NFKD"); } oValue = oValue.toUpperCase(); // use canonical composition as recommended by W3C
[FIX] FilterProcessor: Adapt normalization for MS Edge <I>+ Since MS Edge <I> the behaviour of toUpperCase with composed Unicode characters changed, which requires compatibility decomposition to still work as expected. BCP: <I> Change-Id: Id<I>a<I>c<I>cd9aab<I>c4dd<I>bc<I>
diff --git a/src/Http/MellonAuthenticationHook.php b/src/Http/MellonAuthenticationHook.php index <HASH>..<HASH> 100644 --- a/src/Http/MellonAuthenticationHook.php +++ b/src/Http/MellonAuthenticationHook.php @@ -38,20 +38,20 @@ class MellonAuthenticationHook implements BeforeHookInterface public function executeBefore(Request $request, array $hookData) { + $userId = $request->getHeader($this->userIdAttribute); if ($this->addEntityId) { // add the entity ID to the user ID, this is used when we have // different IdPs that do not guarantee uniqueness among the used // user identifier attribute, e.g. NAME_ID or uid - return sprintf( + $userId = sprintf( '%s|%s', // strip out all "special" characters from the entityID, just // like mod_auth_mellon does preg_replace('/__*/', '_', preg_replace('/[^A-Za-z.]/', '_', $request->getHeader('MELLON_IDP'))), - $request->getHeader($this->userIdAttribute) + $userId ); } - $userId = $request->getHeader($this->userIdAttribute); if ($this->session->has('_mellon_auth_user')) { if ($userId !== $this->session->get('_mellon_auth_user')) { // if we have an application session where the user_id does not
also fix #6 for the case where addEntityID is true
diff --git a/apptentive/src/main/java/com/apptentive/android/sdk/ApptentiveViewActivity.java b/apptentive/src/main/java/com/apptentive/android/sdk/ApptentiveViewActivity.java index <HASH>..<HASH> 100644 --- a/apptentive/src/main/java/com/apptentive/android/sdk/ApptentiveViewActivity.java +++ b/apptentive/src/main/java/com/apptentive/android/sdk/ApptentiveViewActivity.java @@ -408,7 +408,7 @@ public class ApptentiveViewActivity extends ApptentiveComponentActivity //region User log out listener @Override public void onUserLogOut() { - if (isFinishing()) { + if (!isFinishing()) { finish(); } }
Fixed dismissing ApptentiveViewActivity on user log out
diff --git a/jenetics/src/main/java/io/jenetics/internal/util/StreamProxy.java b/jenetics/src/main/java/io/jenetics/internal/util/StreamProxy.java index <HASH>..<HASH> 100644 --- a/jenetics/src/main/java/io/jenetics/internal/util/StreamProxy.java +++ b/jenetics/src/main/java/io/jenetics/internal/util/StreamProxy.java @@ -36,6 +36,7 @@ import java.util.function.Supplier; import java.util.function.ToDoubleFunction; import java.util.function.ToIntFunction; import java.util.function.ToLongFunction; +import java.util.function.UnaryOperator; import java.util.stream.Collector; import java.util.stream.DoubleStream; import java.util.stream.IntStream; @@ -297,4 +298,14 @@ public abstract class StreamProxy<T> implements Stream<T> { return _self.unordered(); } + @Override + public Stream<T> takeWhile(final Predicate<? super T> predicate) { + return _self.takeWhile(predicate); + } + + @Override + public Stream<T> dropWhile(final Predicate<? super T> predicate) { + return _self.dropWhile(predicate); + } + }
Delegate new 'Stream' methods 'takeWhile' and 'dropWhile'.
diff --git a/test/helper.rb b/test/helper.rb index <HASH>..<HASH> 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,4 +1,5 @@ require 'rubygems' if RUBY_VERSION < '1.9.0' +gem 'test-unit' require "test/unit" require 'em-spec/test' Dir.glob(File.dirname(__FILE__) + '/../lib/sensu/*', &method(:require))
[travis] em-spec working w/ ruby <I>
diff --git a/src/Forms/ApiAccessTokenFormFactory.php b/src/Forms/ApiAccessTokenFormFactory.php index <HASH>..<HASH> 100644 --- a/src/Forms/ApiAccessTokenFormFactory.php +++ b/src/Forms/ApiAccessTokenFormFactory.php @@ -14,7 +14,7 @@ class ApiAccessTokenFormFactory private $apiAccessRepository; private $apiAccessTokensRepository; - + private $translator; public $onSubmit; @@ -48,10 +48,10 @@ class ApiAccessTokenFormFactory $form->setRenderer(new BootstrapRenderer()); $form->addProtection(); - $form->addSubmit('send', $this->translator->translate('api.admin.access.form.check_all')) + $form->addSubmit('send') ->getControlPrototype() ->setName('button') - ->setHtml('<i class="fa fa-cloud-upload"></i> ' . $this->translator->translate('api.admin.access.form.save')); + ->setHtml('<i class="fa fa-save"></i> ' . $this->translator->translate('api.admin.access.form.save')); $form->setDefaults($defaults);
Fix translation of button for api access form Removing caption from button. Caption "check all" is incorrect and translations are sometimes incorrectly cached if both caption & setHtml are used on addButton / addSubmit.
diff --git a/lib/naver/ext/hash/to_underscore_keys.rb b/lib/naver/ext/hash/to_underscore_keys.rb index <HASH>..<HASH> 100644 --- a/lib/naver/ext/hash/to_underscore_keys.rb +++ b/lib/naver/ext/hash/to_underscore_keys.rb @@ -29,7 +29,7 @@ class Hash end def underscore(camel_cased_word) - return camel_cased_word unless /[A-Z-]|::/.match?(camel_cased_word) + return camel_cased_word unless camel_cased_word =~ /[A-Z-]|::/ word = camel_cased_word.to_s.gsub("::".freeze, "/".freeze) word.gsub!(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2'.freeze) word.gsub!(/([a-z\d])([A-Z])/, '\1_\2'.freeze)
REGEX.match? is ruby <I> only. replace to =~
diff --git a/tests/test_textFile.py b/tests/test_textFile.py index <HASH>..<HASH> 100644 --- a/tests/test_textFile.py +++ b/tests/test_textFile.py @@ -30,6 +30,7 @@ def test_s3_textFile(): 's3n://aws-publicdatasets/common-crawl/crawl-data/CC-MAIN-2015-11/warc.paths.*' ) print(myrdd.collect()) + assert 'common-crawl/crawl-data/CC-MAIN-2015-11/segments/1424937481488.49/warc/CC-MAIN-20150226075801-00329-ip-10-28-5-156.ec2.internal.warc.gz' in myrdd.collect() def test_saveAsTextFile(): @@ -60,5 +61,6 @@ def test_saveAsTextFile_bz2(): if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG) - test_local_textFile_2() + # test_local_textFile_2() # test_saveAsTextFile_gz() + test_s3_textFile()
add an assert to the s3-gz-compressed-textFile test case
diff --git a/modules/hypermedia.js b/modules/hypermedia.js index <HASH>..<HASH> 100644 --- a/modules/hypermedia.js +++ b/modules/hypermedia.js @@ -198,15 +198,8 @@ define([ enter: function (rel, parameters, actions, options) { var homeResource = this.getDefinition(rel); - // Override the default actions for the entry point $resource - // We only use get, other actions will not do anything - // Also specify the accepted content-type to be of type hypermedia actions = actions ? actions : {}; angular.extend(actions, { - query: angular.noop, - delete: angular.noop, - remove: angular.noop, - save: angular.noop, get: { method: 'GET', headers: { 'accept': HYPERMEDIA_TYPE }
Enable the use of other http verb with json home endpoints (it was limited to get only)
diff --git a/remi/gui.py b/remi/gui.py index <HASH>..<HASH> 100644 --- a/remi/gui.py +++ b/remi/gui.py @@ -1033,7 +1033,6 @@ class TabBox(Widget): def add_tab(self, widget, name, tab_cb): holder = Tag(_type='div', _class='') - holder.style['padding'] = '15px' holder.add_child('content', widget) li = Tag(_type='li', _class='')
BigFix graphical unwanted padding in TabBox
diff --git a/cloudaux/aws/ec2.py b/cloudaux/aws/ec2.py index <HASH>..<HASH> 100644 --- a/cloudaux/aws/ec2.py +++ b/cloudaux/aws/ec2.py @@ -93,6 +93,12 @@ def describe_instances(**kwargs): @sts_conn('ec2') @rate_limited() +def describe_vpcs(**kwargs): + return kwargs.pop('client').describe_vpcs(**kwargs) + + +@sts_conn('ec2') +@rate_limited() def describe_images(**kwargs): return kwargs.pop('client').describe_images(**kwargs)['Images']
Adding the ability to describe vpcs.
diff --git a/src/resolver.js b/src/resolver.js index <HASH>..<HASH> 100644 --- a/src/resolver.js +++ b/src/resolver.js @@ -44,9 +44,6 @@ function resolverFactory(target, options) { type = type.ofType || type; findOptions.attributes = targetAttributes; - - findOptions.root = context; - findOptions.context = context; findOptions.logging = findOptions.logging || context.logging; return Promise.resolve(options.before(findOptions, args, context, info)).then(function (findOptions) {
dont add context to findOptions as Sequelize might memory leak
diff --git a/lib/socket.js b/lib/socket.js index <HASH>..<HASH> 100644 --- a/lib/socket.js +++ b/lib/socket.js @@ -220,14 +220,11 @@ Socket.prototype.onOpen = function () { */ Socket.prototype.onMessage = function (msg) { + // debug: socket receive: type "%s" | data "%s", msg.type, msg.data switch (msg.type) { case 'noop': break; - case 'open': - this.onOpen(); - break; - case 'ping': this.sendPacket('pong'); break;
Instrumented onMessage and removed unnecessary `open` handler.
diff --git a/lib/rvc/modules/vim.rb b/lib/rvc/modules/vim.rb index <HASH>..<HASH> 100644 --- a/lib/rvc/modules/vim.rb +++ b/lib/rvc/modules/vim.rb @@ -81,7 +81,7 @@ def connect uri, opts unless opts[:rev] # negotiate API version rev = vim.serviceContent.about.apiVersion - vim.rev = [rev, '4.1'].min + vim.rev = [rev, ENV['RVC_VIMREV'] || '4.1'].min end isVC = vim.serviceContent.about.apiType == "VirtualCenter"
allow RVC_VIMREV environment variable to override maximum supported version
diff --git a/src/Message/PurchaseRequest.php b/src/Message/PurchaseRequest.php index <HASH>..<HASH> 100644 --- a/src/Message/PurchaseRequest.php +++ b/src/Message/PurchaseRequest.php @@ -22,9 +22,9 @@ class PurchaseRequest extends AbstractRequest return $this->setParameter('language', $value); } - public function getClient() + public function getClient(): string { - return $this->getParameter('client'); + return (string) $this->getParameter('client'); } public function setClient($value)
fix: client could be object and throws exceptions
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,8 +1,10 @@ +"use strict"; + var gulp = require("gulp"), jshint = require("gulp-jshint"); gulp.task("lint", function() { - return gulp.src(["./lib/*.js", "./test/*.js"]) + return gulp.src(["./lib/**/*.js", "./test/**/*.js"]) .pipe(jshint()) .pipe(jshint.reporter("jshint-stylish")); });
Include more files to lint
diff --git a/salt/modules/win_file.py b/salt/modules/win_file.py index <HASH>..<HASH> 100644 --- a/salt/modules/win_file.py +++ b/salt/modules/win_file.py @@ -17,8 +17,8 @@ import logging # pylint: disable=W0611 import tempfile # do not remove. Used in salt.modules.file.__clean_tmp import itertools # same as above, do not remove, it's used in __clean_tmp -import contextlib # do not remove, used in imported file.py functions -import difflib # do not remove, used in imported file.py functions +import contextlib # do not remove, used in imported file.py functions +import difflib # do not remove, used in imported file.py functions # pylint: enable=W0611 # Import third party libs
use two spaces before inline comment Keep pylint happy
diff --git a/src/Fields/Datepicker.php b/src/Fields/Datepicker.php index <HASH>..<HASH> 100644 --- a/src/Fields/Datepicker.php +++ b/src/Fields/Datepicker.php @@ -94,15 +94,20 @@ EOT; { $startDay = $options['start-day'] ?? 1; $format = $options['format'] ?? 'YYYY-MM-DD'; + $event = $options['event'] ?? 'keydown'; return <<<EOT -datepicker("#$id", { +var _{$id}Datepicker = datepicker("#$id", { startDay: $startDay, dateSelected: moment(document.getElementById("$id").value).toDate(), formatter: (input, date, instance) => { input.value = moment(date).format("$format"); } }); +document.getElementById("$id").addEventListener('{$event}', function () { + let date = moment(this.value).toDate(); + _{$id}Datepicker.setDate(date, true); +}); EOT; } }
Because datepicker had an issue with updating
diff --git a/userservice/user.py b/userservice/user.py index <HASH>..<HASH> 100644 --- a/userservice/user.py +++ b/userservice/user.py @@ -24,8 +24,11 @@ class UserService: def _require_middleware(self): if "initialized" not in self._get_current_user_data(): - raise UninitializedError("You need to have this line in your " - "MIDDLEWARE_CLASSES: 'userservice.user.UserServiceMiddleware'") + if settings.DEBUG: + print("You need to have this in settings.MIDDLEWARE_CLASSES: " + "'userservice.user.UserServiceMiddleware'") + + raise UninitializedError("Missing UserServiceMiddleware") def get_request(self): data = self._get_current_user_data()
print warning when DEBUG is True
diff --git a/src/mako/session/Session.php b/src/mako/session/Session.php index <HASH>..<HASH> 100644 --- a/src/mako/session/Session.php +++ b/src/mako/session/Session.php @@ -296,7 +296,12 @@ class Session // Get the session id from the cookie or generate a new one if it doesn't exist. - $this->sessionId = $this->request->signedCookie($this->cookieName, $this->generateId()); + $this->sessionId = $this->request->signedCookie($this->cookieName, false); + + if($this->sessionId === false) + { + $this->sessionId = $this->generateId(); + } // Create a new / update the existing session cookie
No longer loading the UUID class unnecessarily
diff --git a/sdk/go/common/apitype/history.go b/sdk/go/common/apitype/history.go index <HASH>..<HASH> 100644 --- a/sdk/go/common/apitype/history.go +++ b/sdk/go/common/apitype/history.go @@ -84,6 +84,7 @@ const ( // Should generally mirror backend.UpdateInfo, but we clone it in this package to add // flexibility in case there is a breaking change in the backend-type. type UpdateInfo struct { + Version int `json:"version"` // Information known before an update is started. Kind UpdateKind `json:"kind"` StartTime int64 `json:"startTime"`
Export UpdateID as part of the UpdateInfo event that comes from the SaaS (#<I>)
diff --git a/lib/slimmer.rb b/lib/slimmer.rb index <HASH>..<HASH> 100644 --- a/lib/slimmer.rb +++ b/lib/slimmer.rb @@ -197,6 +197,18 @@ module Slimmer dest.at_css(@path).replace(body) end end + + class BodyClassCopier + def filter(src, dest) + src_body_tag = src.at_css("body") + dest_body_tag = dest.at_css('body') + if src_body_tag.has_attribute?("class") + combinded_classes = dest_body_tag.attr('class').to_s.split(/ +/) + combinded_classes << src_body_tag.attr('class').to_s.split(/ +/) + dest_body_tag.set_attribute("class", combinded_classes.join(' ')) + end + end + end class AdminTitleInserter def filter(src,dest) @@ -278,6 +290,7 @@ module Slimmer AdminTitleInserter.new, FooterRemover.new, BodyInserter.new(), + BodyClassCopier.new ] self.process(processors,body,template('admin')) end @@ -288,6 +301,7 @@ module Slimmer TitleInserter.new(), TagMover.new(), BodyInserter.new(), + BodyClassCopier.new, SectionInserter.new() ]
Allow body classes to be propogated from both the template and application layout.
diff --git a/src/cr/cube/cubepart.py b/src/cr/cube/cubepart.py index <HASH>..<HASH> 100644 --- a/src/cr/cube/cubepart.py +++ b/src/cr/cube/cubepart.py @@ -1572,6 +1572,8 @@ class _Nub(CubePartition): @lazyproperty def is_empty(self): + if self.unweighted_count <= 0: + return True return math.isnan(self.unweighted_count) @lazyproperty diff --git a/tests/unit/test_cubepart.py b/tests/unit/test_cubepart.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_cubepart.py +++ b/tests/unit/test_cubepart.py @@ -538,7 +538,8 @@ class Describe_Nub(object): """Unit test suite for `cr.cube.cubepart._Nub` object.""" @pytest.mark.parametrize( - "unweighted_count, expected_value", ((float("NaN"), True), (45.4, False)) + "unweighted_count, expected_value", + ((float("NaN"), True), (45.4, False), (0.0, True)), ) def it_knows_when_it_is_empty(self, request, unweighted_count, expected_value): property_mock(request, _Nub, "unweighted_count", return_value=unweighted_count)
fix is_empty in _Nub checks even for <I>
diff --git a/presto-resource-group-managers/src/main/java/com/facebook/presto/resourceGroups/db/DbResourceGroupConfigurationManager.java b/presto-resource-group-managers/src/main/java/com/facebook/presto/resourceGroups/db/DbResourceGroupConfigurationManager.java index <HASH>..<HASH> 100644 --- a/presto-resource-group-managers/src/main/java/com/facebook/presto/resourceGroups/db/DbResourceGroupConfigurationManager.java +++ b/presto-resource-group-managers/src/main/java/com/facebook/presto/resourceGroups/db/DbResourceGroupConfigurationManager.java @@ -198,6 +198,18 @@ public class DbResourceGroupConfigurationManager configureChangedGroups(changedSpecs); disableDeletedGroups(deletedSpecs); + if (lastRefresh.get() > 0) { + for (ResourceGroupIdTemplate deleted : deletedSpecs) { + log.info("Resource group spec deleted %s", deleted); + } + for (ResourceGroupIdTemplate changed : changedSpecs) { + log.info("Resource group spec %s changed to %s", changed, resourceGroupSpecs.get(changed)); + } + } + else { + log.info("Loaded %s selectors and %s resource groups from database", this.selectors.get().size(), this.resourceGroupSpecs.size()); + } + lastRefresh.set(System.nanoTime()); } catch (Throwable e) {
Add more logging to DB resource groups
diff --git a/spec/cucumber/formatter/spec_helper.rb b/spec/cucumber/formatter/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/cucumber/formatter/spec_helper.rb +++ b/spec/cucumber/formatter/spec_helper.rb @@ -36,10 +36,15 @@ module Cucumber compile [gherkin_doc], receiver, filters end + require 'cucumber/formatter/event_bus_report' + def event_bus_report + @event_bus_report ||= Formatter::EventBusReport.new(actual_runtime.configuration) + end + require 'cucumber/formatter/legacy_api/adapter' def report @report ||= LegacyApi::Adapter.new( - Fanout.new([@formatter]), + Fanout.new([@formatter, event_bus_report]), actual_runtime.results, actual_runtime.configuration) end
Let formatter::spec_helper use event_bus_report. Then the events will be available to the formatters during testing with RSpec.
diff --git a/cherrypy/_cputil.py b/cherrypy/_cputil.py index <HASH>..<HASH> 100644 --- a/cherrypy/_cputil.py +++ b/cherrypy/_cputil.py @@ -323,11 +323,14 @@ def formatExc(exc=None): if exc == (None, None, None): return "" - if hasattr(exc[1], "args"): - page_handler_str = "" - if len(exc[1].args) > 1: - page_handler = exc[1].args.pop() + + page_handler_str = "" + args = list(getattr(exc[1], "args", [])) + if args: + if len(args) > 1: + page_handler = args.pop() page_handler_str = 'Page handler: %s\n' % repr(page_handler) + exc[1].args = tuple(args) return page_handler_str + "".join(traceback.format_exception(*exc)) def bareError(extrabody=None):
Fix for the fix for #<I> (hey, that rhymes!).
diff --git a/app/models/picture.rb b/app/models/picture.rb index <HASH>..<HASH> 100644 --- a/app/models/picture.rb +++ b/app/models/picture.rb @@ -27,4 +27,16 @@ class Picture < ActiveRecord::Base self.name.blank? ? "image_#{self.id}" : self.name.split(/\./).first end + def landscape_format? + return (self.image_width > self.image_height) ? true : false + end + + def portrait_format? + return (self.image_width < self.image_height) ? true : false + end + + def square_format? + return (self.image_width == self.image_height) ? true : false + end + end
adding three methods to get information about pictures format. (landscape, portrait and square)
diff --git a/app/models/blog.rb b/app/models/blog.rb index <HASH>..<HASH> 100644 --- a/app/models/blog.rb +++ b/app/models/blog.rb @@ -179,15 +179,15 @@ class Blog < ActiveRecord::Base url_generated += "##{extra_params[:anchor]}" if extra_params[:anchor] url_generated when Hash - unless Rails.cache.exist?('blog-urlfor-withbaseurl') - options.reverse_merge!(:only_path => false, :controller => '', - :action => 'permalink', - :host => host_with_port, - :script_name => root_path) - - Rails.cache.write('blog-urlfor-withbaseurl', url_for_without_base_url(options)) + merged_opts = options.reverse_merge!(:only_path => false, :controller => '', + :action => 'permalink', + :host => host_with_port, + :script_name => root_path) + cache_key = merged_opts.values.prepend('blog-urlfor-withbaseurl').join('-') + unless Rails.cache.exist?(cache_key) + Rails.cache.write(cache_key, url_for_without_base_url(merged_opts)) end - Rails.cache.read('blog-urlfor-withbaseurl') + Rails.cache.read(cache_key) else raise "Invalid URL in url_for: #{options.inspect}" end
Fixes link caching issue (All cached links are the same basically)
diff --git a/lib/hexUtils.js b/lib/hexUtils.js index <HASH>..<HASH> 100644 --- a/lib/hexUtils.js +++ b/lib/hexUtils.js @@ -1,3 +1,5 @@ +'use strict' + const ethjsUtil = require('ethjs-util') module.exports = {
Allow let in hexUtils
diff --git a/packages/ipfs-core/src/components/stats/bw.js b/packages/ipfs-core/src/components/stats/bw.js index <HASH>..<HASH> 100644 --- a/packages/ipfs-core/src/components/stats/bw.js +++ b/packages/ipfs-core/src/components/stats/bw.js @@ -53,10 +53,10 @@ function getBandwidthStats (libp2p, opts) { const { movingAverages, snapshot } = stats return { - totalIn: BigInt(snapshot.dataReceived.toString()), - totalOut: BigInt(snapshot.dataSent.toString()), - rateIn: BigInt(movingAverages.dataReceived[60000].movingAverage() / 60), - rateOut: BigInt(movingAverages.dataSent[60000].movingAverage() / 60) + totalIn: BigInt(snapshot.dataReceived.integerValue().toString()), + totalOut: BigInt(snapshot.dataSent.integerValue().toString()), + rateIn: BigInt(Math.round(movingAverages.dataReceived[60000].movingAverage() / 60)), + rateOut: BigInt(Math.round(movingAverages.dataSent[60000].movingAverage() / 60)) } }
fix: round bandwidth stats (#<I>) Dividing the bandwidth stats sometimes results in a fraction which we cannot convert to a `BigInteger` since it's not an integer... Fixes #<I>
diff --git a/lib/pagify.rb b/lib/pagify.rb index <HASH>..<HASH> 100644 --- a/lib/pagify.rb +++ b/lib/pagify.rb @@ -3,8 +3,6 @@ module Pagify autoload :ArrayPager, 'pagify/array' autoload :DataMapperPager, 'pagify/data_mapper' autoload :ActiveRecordPager, 'pagify/active_record' - - autoload :VERSION, 'pagify/version' end require 'pagify/basic'
don't autoload VERSION.
diff --git a/src/Intahwebz/ImageFile.php b/src/Intahwebz/ImageFile.php index <HASH>..<HASH> 100644 --- a/src/Intahwebz/ImageFile.php +++ b/src/Intahwebz/ImageFile.php @@ -3,6 +3,8 @@ namespace Intahwebz; +echo "Lol this is amazing...."; +exit(0); abstract class ImageFile { @@ -28,7 +30,7 @@ abstract class ImageFile { $newWidth = false; $newHeight = false; - aiohfhef; + if($this->srcWidth > $maxWidth || $this->srcHeight > $maxHeight){ $newWidth = $maxWidth;
OK this is a deliberate creash.
diff --git a/docker/models/images.py b/docker/models/images.py index <HASH>..<HASH> 100644 --- a/docker/models/images.py +++ b/docker/models/images.py @@ -193,8 +193,8 @@ class ImageCollection(Collection): (:py:class:`Image`): The image. Raises: - :py:class:`docker.errors.ImageNotFound` If the image does not - exist. + :py:class:`docker.errors.ImageNotFound` + If the image does not exist. :py:class:`docker.errors.APIError` If the server returns an error. """
Fix docstring of ImageCollection.get
diff --git a/server/src/main/java/org/kaazing/gateway/server/context/resolve/GatewayContextResolver.java b/server/src/main/java/org/kaazing/gateway/server/context/resolve/GatewayContextResolver.java index <HASH>..<HASH> 100644 --- a/server/src/main/java/org/kaazing/gateway/server/context/resolve/GatewayContextResolver.java +++ b/server/src/main/java/org/kaazing/gateway/server/context/resolve/GatewayContextResolver.java @@ -537,15 +537,8 @@ public class GatewayContextResolver { for (AuthorizationConstraintType authConstraint : serviceConfig.getAuthorizationConstraintArray()) { Collections.addAll(requireRolesCollection, authConstraint.getRequireRoleArray()); } - RealmContext realmContext = null; - String name = serviceConfig.getRealmName(); - if (serviceConfig.isSetRealmName()) { - realmContext = realmsContext.getRealmContext(name); - if (realmContext != null && !name.equals("auth-required")) { - if (requireRolesCollection.isEmpty()) { - Collections.addAll(requireRolesCollection, "*"); - } - } + if (requireRolesCollection.isEmpty()) { + requireRolesCollection.add("*"); } String[] requireRoles = requireRolesCollection.toArray(new String[requireRolesCollection.size()]);
default require-role to "*" even for multiple http realms - remove check for "auth-required" realm name, which was bypassing gateway security
diff --git a/umbra/ui/models.py b/umbra/ui/models.py index <HASH>..<HASH> 100644 --- a/umbra/ui/models.py +++ b/umbra/ui/models.py @@ -433,7 +433,7 @@ class GraphModel(QAbstractItemModel): success = True for i in range(count): childNode = umbra.ui.nodes.GraphModelNode() - success *= True if isinstance(parentNode.insertChild(childNode, row), self.__defaultNode) else False + success *= True if parentNode.insertChild(childNode, row) else False self.endInsertRows() return success @@ -451,7 +451,7 @@ class GraphModel(QAbstractItemModel): self.beginRemoveRows(parent, row, row + count - 1) success = True for i in range(count): - success *= True if isinstance(parentNode.removeChild(row), self.__defaultNode) else False + success *= True if parentNode.removeChild(row) else False self.endRemoveRows() return success
Update various methods in "umbra.ui.models.GraphModel" class.
diff --git a/pyani/scripts/parsers/__init__.py b/pyani/scripts/parsers/__init__.py index <HASH>..<HASH> 100644 --- a/pyani/scripts/parsers/__init__.py +++ b/pyani/scripts/parsers/__init__.py @@ -59,8 +59,6 @@ from pyani.scripts.parsers import ( listdeps_parser, ) -from pyani import __version__ - # Process command-line def parse_cmdline(argv: Optional[List] = None) -> Namespace:
Removed unnecessary import of `__version__`
diff --git a/src/main/java/org/osgl/util/Generics.java b/src/main/java/org/osgl/util/Generics.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/osgl/util/Generics.java +++ b/src/main/java/org/osgl/util/Generics.java @@ -163,7 +163,9 @@ public class Generics { } } superClass = (Class) pSuperType.getRawType(); - if ($.eq(superClass, rootClass)) { + // We don't compare class directly to workaround some rare case when same class loaded by + // different class loaders + if ($.eq(superClass.getName(), rootClass.getName())) { return nextList; } return typeParamImplementations(superClass, rootClass, nextList);
Generics.typeParamImplementations: handle the case with different classloader
diff --git a/lib/celluloid/io/tcp_socket.rb b/lib/celluloid/io/tcp_socket.rb index <HASH>..<HASH> 100644 --- a/lib/celluloid/io/tcp_socket.rb +++ b/lib/celluloid/io/tcp_socket.rb @@ -39,8 +39,6 @@ module Celluloid # Guess it's not an IP address, so let's try DNS unless @addr - # TODO: suppport asynchronous DNS - # Even EventMachine doesn't do async DNS by default o_O addrs = Array(DNSResolver.new.resolve(remote_host)) raise Resolv::ResolvError, "DNS result has no information for #{remote_host}" if addrs.empty?
We totally do async DNS now!
diff --git a/src/User_Command.php b/src/User_Command.php index <HASH>..<HASH> 100644 --- a/src/User_Command.php +++ b/src/User_Command.php @@ -1,7 +1,9 @@ <?php /** - * Manage users. + * Manages users, along with their roles, capabilities, and meta. + * + * See references for [Roles and Capabilities](https://codex.wordpress.org/Roles_and_Capabilities)and [WP User class](https://codex.wordpress.org/Class_Reference/WP_User). * * ## EXAMPLES *
Improve command description; add Codex links
diff --git a/amqpstorm/channel.py b/amqpstorm/channel.py index <HASH>..<HASH> 100644 --- a/amqpstorm/channel.py +++ b/amqpstorm/channel.py @@ -107,8 +107,7 @@ class Channel(BaseChannel, Stateful): :param pamqp.Frame frame_in: Amqp frame. :return: """ - rpc_request = self.rpc.on_frame(frame_in) - if rpc_request: + if self.rpc.on_frame(frame_in): return if frame_in.name in CONTENT_FRAME: diff --git a/amqpstorm/channel0.py b/amqpstorm/channel0.py index <HASH>..<HASH> 100644 --- a/amqpstorm/channel0.py +++ b/amqpstorm/channel0.py @@ -35,7 +35,6 @@ class Channel0(object): :return: """ LOGGER.debug('Frame Received: %s', frame_in.name) - if frame_in.name == 'Heartbeat': self._write_frame(Heartbeat()) elif frame_in.name == 'Connection.Start': diff --git a/amqpstorm/compatibility.py b/amqpstorm/compatibility.py index <HASH>..<HASH> 100644 --- a/amqpstorm/compatibility.py +++ b/amqpstorm/compatibility.py @@ -6,7 +6,6 @@ import sys PYTHON3 = sys.version_info >= (3, 0, 0) - if PYTHON3: RANGE = range else:
Refactored Basic.get.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ desc = ('Flexible, extensible Web CMS framework built on Tornado,' 'compatible with Python 3.4 and above.') setup( name='torcms', - version='0.6.21', + version='0.6.22', keywords=('torcms', 'tornado', 'cms',), description=desc, long_description=''.join(open('README.rst').readlines()),
update the version to <I>.
diff --git a/src/Webpage/MenuGenerator.php b/src/Webpage/MenuGenerator.php index <HASH>..<HASH> 100644 --- a/src/Webpage/MenuGenerator.php +++ b/src/Webpage/MenuGenerator.php @@ -24,7 +24,7 @@ use vxPHP\Application\Application; * * @author Gregor Kofler * - * @version 1.0.0, 2020-10-10 + * @version 1.0.1, 2020-11-30 * * @throws MenuGeneratorException */ @@ -182,7 +182,7 @@ class MenuGenerator * @throws ApplicationException * @throws MenuGeneratorException */ - public static function create(string $id = null, int $level = null, bool $forceActiveMenu = null, string $decorator = null, $renderArgs = null): MenuGenerator + public static function create(string $id = null, int $level = null, bool $forceActiveMenu = false, string $decorator = null, $renderArgs = null): MenuGenerator { return new static($id, $level, $forceActiveMenu, $decorator, $renderArgs); }
fix: wrong default type for hinted argument in MenuGenerator
diff --git a/lib/flapjack/cli/notifier_manager.rb b/lib/flapjack/cli/notifier_manager.rb index <HASH>..<HASH> 100644 --- a/lib/flapjack/cli/notifier_manager.rb +++ b/lib/flapjack/cli/notifier_manager.rb @@ -41,15 +41,17 @@ module Flapjack options.host ||= "localhost" options.port ||= 11300 - unless options.recipients =~ /.+/ - puts "You must specify a recipients file!\n\n" - puts opts - exit 2 - end - - unless File.exists?(options.recipients) - puts "The specified recipients file doesn't exist!" - exit 2 + unless ARGV[0] == "stop" + unless options.recipients =~ /.+/ + puts "You must specify a recipients file!\n\n" + puts opts + exit 2 + end + + unless File.exists?(options.recipients) + puts "The specified recipients file doesn't exist!" + exit 2 + end end unless %w(start stop restart).include?(args[0])
don't check for recipients file if we're stopping
diff --git a/src/main/java/com/stripe/model/Token.java b/src/main/java/com/stripe/model/Token.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/stripe/model/Token.java +++ b/src/main/java/com/stripe/model/Token.java @@ -15,6 +15,8 @@ public class Token extends APIResource { Long created; String currency; String id; + String email; + String clientIp; Boolean livemode; Boolean used; Card card; @@ -52,6 +54,22 @@ public class Token extends APIResource { this.id = id; } + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getClientIp() { + return clientIp; + } + + public void setClientIp(String clientIp) { + this.clientIp = clientIp; + } + public Boolean getLivemode() { return livemode; }
Add member variables for "client ip" and "email" in Token model
diff --git a/Exedra/Application/Loader.php b/Exedra/Application/Loader.php index <HASH>..<HASH> 100644 --- a/Exedra/Application/Loader.php +++ b/Exedra/Application/Loader.php @@ -16,7 +16,7 @@ class Loader return strpos($file, ":") !== false; } - public function load($file,$data = null, $subapp = null) + private function refinePath($file) { if(($colonPos = strpos($file, ":")) !== false) { @@ -24,16 +24,33 @@ class Loader $file = $this->structure->get($structure)."/".$file; } + return $file; + } + + public function load($file,$data = null) + { + $file = $this->refinePath($file); + if(isset($loaded[$file])) return false; if(!file_exists($file)) - throw new \Exception("File not found : $file", 1); + throw new \Exception("File not found : $file"); if($data && is_array($data)) extract($data); return require_once $file; } + + public function getContent($file) + { + $file = $this->refinePath($file); + + if(!file_exists($file)) + throw new \Exception("File not found : $file"); + + return file_get_contents($file); + } } ?> \ No newline at end of file
Add getContent method to loader
diff --git a/tasks/writing.js b/tasks/writing.js index <HASH>..<HASH> 100644 --- a/tasks/writing.js +++ b/tasks/writing.js @@ -76,7 +76,9 @@ function writing(grunt) { posts.push(post); if (!--numRemainingPosts) { - posts = _.sortBy(posts, 'date'); + posts.sort(function (a, b) { + return b.date - a.date; + }); _.each(posts, function (post) { grunt.file.write(post.filepath, templates.post({post: post}));
Used a sort function that actually works.
diff --git a/libtmux/window.py b/libtmux/window.py index <HASH>..<HASH> 100644 --- a/libtmux/window.py +++ b/libtmux/window.py @@ -477,9 +477,8 @@ class Window(TmuxMappingObject, TmuxRelationalObject): # tmux < 1.7. This is added in 1.7. if pane.stderr: - raise exc.LibTmuxException(pane.stderr) if "pane too small" in pane.stderr: - pass + raise exc.LibTmuxException(pane.stderr) raise exc.LibTmuxException(pane.stderr, self._info, self.panes) else:
chore: Fix raise for older tmux versions
diff --git a/lib/ovirt/base_object.rb b/lib/ovirt/base_object.rb index <HASH>..<HASH> 100644 --- a/lib/ovirt/base_object.rb +++ b/lib/ovirt/base_object.rb @@ -12,5 +12,11 @@ module OVIRT def parse_version xml (xml/'version').first[:major] +"."+ (xml/'version').first[:minor] end + + def parse_bool text + return true if text =~ /^true$/i + return false if text =~ /^false$/i + raise ArgumentError.new %Q[The string "#{text}" isn't a valid boolean, it should be "true" or "false"] + end end -end \ No newline at end of file +end
Add method to parse XML booleans Currently we don't convert boolean objects returned by the server to the Ruby representation of booleans. This complicates further treatment of these values, as they have to be treated as strings. To avoid that this patch introduces a new "parse_bool" method in the base object class intended to convert the boolean representation used by the server into the Ruby representation. This method will be used in later changes.
diff --git a/ommprotocol/md.py b/ommprotocol/md.py index <HASH>..<HASH> 100644 --- a/ommprotocol/md.py +++ b/ommprotocol/md.py @@ -264,9 +264,7 @@ class Stage(object): status = '#{}'.format(self._stage_number[0]) if self.total_stages is not None: status += '/{}'.format(self.total_stages) - if self.steps: - status += ': {} @ {}K'.format(self.name, self.temperature) - status += ', NPT' if self.barostat else ', NVT' + status += ': {}'.format(self.name) if self.restrained_atoms: status += ' [Restrained {}]'.format(self.restrained_atoms) elif self.constrained_atoms: @@ -306,7 +304,10 @@ class Stage(object): # MD simulation if self.verbose: pbc = 'PBC ' if self.system.usesPeriodicBoundaryConditions() else '' - print(' Running {}MD for {} steps'.format(pbc, self.steps)) + conditions = 'NPT' if self.barostat else 'NVT' + print(' Running {}MD for {} steps @ {}K, {}'.format(pbc, self.steps, + self.temperature, + conditions)) with self.handle_exceptions(): self.simulate()
fix(md): better structured stdout report of conditions