diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -156,12 +156,13 @@ class Vimeo extends React.Component { } render() { - const { id, className } = this.props; + const { id, className, style } = this.props; return ( <div id={id} className={className} + style={style} ref={this.refContainer} /> ); @@ -186,6 +187,10 @@ if (process.env.NODE_ENV !== 'production') { */ className: PropTypes.string, /** + * Inline style for container element. + */ + style: PropTypes.object, + /** * Width of the player element. */ width: PropTypes.oneOfType([
add styling prop to container (#<I>)
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -2,6 +2,11 @@ import React from 'react' const withGesture = Wrapped => class extends React.Component { + static defaultProps = { + touch: true, + mouse: true + } + state = { x: 0, y: 0, @@ -16,6 +21,7 @@ const withGesture = Wrapped => // Touch handlers handleTouchStart = e => { + if (!this.props.touch) return window.addEventListener('touchmove', this.handleTouchMove) window.addEventListener('touchend', this.handleTouchEnd) this.handleDown(e.touches[0]) @@ -31,6 +37,7 @@ const withGesture = Wrapped => // Mouse handlers handleMouseDown = e => { + if (!this.props.mouse) return window.addEventListener('mousemove', this.handleMouseMoveRaf) window.addEventListener('mouseup', this.handleMouseUp) this.handleDown(e)
Add touch/mouse props to optionally disable specific events
diff --git a/src/migrations/config-server.js b/src/migrations/config-server.js index <HASH>..<HASH> 100644 --- a/src/migrations/config-server.js +++ b/src/migrations/config-server.js @@ -15,10 +15,10 @@ const migrations = [ const newSchema = { ...schema, version: 1, - ha_boolean: 'y|yes|true|on|home|open', - rejectUnauthorizedCerts: true, - connectionDelay: true, - cacheJson: true, + ha_boolean: schema.ha_boolean || 'y|yes|true|on|home|open', + rejectUnauthorizedCerts: schema.rejectUnauthorizedCerts || true, + connectionDelay: schema.connectionDelay || true, + cacheJson: schema.cacheJson || true, }; return newSchema; },
refactor: Use existing values for config-server during version 1 migration
diff --git a/commands/filter.py b/commands/filter.py index <HASH>..<HASH> 100644 --- a/commands/filter.py +++ b/commands/filter.py @@ -33,7 +33,8 @@ def cmd(send, msg, args): "removevowels": textutils.removevowels, "binary": textutils.gen_binary, "xkcd": textutils.do_xkcd_sub, - "praise": textutils.gen_praise + "praise": textutils.gen_praise, + "reverse": textutils.reverse } if args['type'] == 'privmsg': send('Ahamilto wants to know all about your doings!') diff --git a/helpers/textutils.py b/helpers/textutils.py index <HASH>..<HASH> 100644 --- a/helpers/textutils.py +++ b/helpers/textutils.py @@ -196,3 +196,7 @@ def do_xkcd_sub(msg, hook=False): return None if hook else msg else: return output + + +def reverse(msg): + return msg[::-1]
re-add !filter reverse
diff --git a/Request/ParamFetcher.php b/Request/ParamFetcher.php index <HASH>..<HASH> 100644 --- a/Request/ParamFetcher.php +++ b/Request/ParamFetcher.php @@ -222,7 +222,7 @@ class ParamFetcher implements ParamFetcherInterface $config->requirements ), )); - }else{ + } else { $constraint = new Regex(array( 'pattern' => '#^'.$config->requirements["rule"].'$#xsu', 'message' => $config->requirements["error_message"] @@ -241,9 +241,9 @@ class ParamFetcher implements ParamFetcherInterface if (0 !== count($errors)) { if ($strict) { - if(isset($config->requirements["error_message"])){ + if (isset($config->requirements["error_message"])) { $errorMessage = $config->requirements["error_message"]; - }else{ + } else { $errorMessage = $this->violationFormatter->formatList($config, $errors); } throw new BadRequestHttpException($errorMessage);
clean ups for code standarts.
diff --git a/grails-plugin-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingInfo.java b/grails-plugin-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingInfo.java index <HASH>..<HASH> 100644 --- a/grails-plugin-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingInfo.java +++ b/grails-plugin-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingInfo.java @@ -51,7 +51,7 @@ public class DefaultUrlMappingInfo extends AbstractUrlMappingInfo implements Url private UrlMappingData urlData; private Object viewName; private ServletContext servletContext; - private static final String SETTING_GRAILS_WEB_DISABLE_MULTIPART = "grails.web.disable.multipart"; + private static final String SETTING_GRAILS_WEB_DISABLE_MULTIPART = "grails.disableCommonsMultipart"; private boolean parsingRequest; private Object uri;
GRAILS-<I> made the property names consistent
diff --git a/go/cmd/vtgate/vtgate.go b/go/cmd/vtgate/vtgate.go index <HASH>..<HASH> 100644 --- a/go/cmd/vtgate/vtgate.go +++ b/go/cmd/vtgate/vtgate.go @@ -12,7 +12,6 @@ import ( "github.com/youtube/vitess/go/vt/servenv" "github.com/youtube/vitess/go/vt/topo" "github.com/youtube/vitess/go/vt/vtgate" - _ "github.com/youtube/vitess/go/vt/zktopo" ) var (
make vtgate topo agnostic Topo server support is controlled by plugins. Not everyone needs zookeeper support.
diff --git a/src/SslClient.py b/src/SslClient.py index <HASH>..<HASH> 100644 --- a/src/SslClient.py +++ b/src/SslClient.py @@ -6,7 +6,7 @@ from X509Certificate import X509Certificate DEFAULT_BUFFER_SIZE = 4096 -class SslClient: +class SslClient(object): """ High level API implementing an SSL client. """
make SslClient an object
diff --git a/upup/pkg/fi/cloudup/alitasks/rampolicy.go b/upup/pkg/fi/cloudup/alitasks/rampolicy.go index <HASH>..<HASH> 100644 --- a/upup/pkg/fi/cloudup/alitasks/rampolicy.go +++ b/upup/pkg/fi/cloudup/alitasks/rampolicy.go @@ -103,12 +103,10 @@ func (_ *RAMPolicy) RenderALI(t *aliup.ALIAPITarget, a, e, changes *RAMPolicy) e return fmt.Errorf("error rendering PolicyDocument: %v", err) } - policyRequest := ram.PolicyRequest{} - if a == nil { klog.V(2).Infof("Creating RAMPolicy with Name:%q", fi.StringValue(e.Name)) - policyRequest = ram.PolicyRequest{ + policyRequest := ram.PolicyRequest{ PolicyName: fi.StringValue(e.Name), PolicyDocument: policy, PolicyType: ram.Type(fi.StringValue(e.PolicyType)),
upup/pkg/fi/cloudup/alitasks/rampolicy: Fix ineffectual assignment to policyRequest
diff --git a/lib/diarize/speaker.rb b/lib/diarize/speaker.rb index <HASH>..<HASH> 100644 --- a/lib/diarize/speaker.rb +++ b/lib/diarize/speaker.rb @@ -62,9 +62,7 @@ module Diarize end def rdf_mapping - { - 'ws:gender' => gender, - } + { 'ws:gender' => gender } end protected
Closing the mapping in speaker model
diff --git a/tests/codeception/_support/WorkingSilex.php b/tests/codeception/_support/WorkingSilex.php index <HASH>..<HASH> 100644 --- a/tests/codeception/_support/WorkingSilex.php +++ b/tests/codeception/_support/WorkingSilex.php @@ -49,4 +49,10 @@ class WorkingSilex extends Silex $this->client = new Client($this->app, [], null, $this->cookieJar); $this->client->followRedirects(); } + + protected function clientRequest($method, $uri, array $parameters = [], array $files = [], array $server = [], $content = null, $changeHistory = true) + { + $this->reloadApp(); + return parent::clientRequest($method, $uri, $parameters, $files, $server, $content, $changeHistory); + } }
[Codeception] Reload the app for every request.
diff --git a/src/Seboettg/CiteProc/Rendering/Text.php b/src/Seboettg/CiteProc/Rendering/Text.php index <HASH>..<HASH> 100644 --- a/src/Seboettg/CiteProc/Rendering/Text.php +++ b/src/Seboettg/CiteProc/Rendering/Text.php @@ -91,7 +91,12 @@ class Text implements Rendering break; case 'variable': if ($this->toRenderTypeValue === "citation-number") { - $renderedText = $citationNumber + 1; + $var = "citation-number"; + if (isset($data->$var)) { + $renderedText = $data->$var; + } else { + $renderedText = $citationNumber + 1; + } break; } @@ -192,4 +197,4 @@ class Text implements Rendering } return $page; } -} \ No newline at end of file +}
Update Text.php Why do we need it? Cos when we are trying to render a citation and it is part of a number of bibliography but it's not the number 1 we will be able to send the field "citation-number" and render with it.
diff --git a/Eloquent/Relations/Concerns/CanBeOneOfMany.php b/Eloquent/Relations/Concerns/CanBeOneOfMany.php index <HASH>..<HASH> 100644 --- a/Eloquent/Relations/Concerns/CanBeOneOfMany.php +++ b/Eloquent/Relations/Concerns/CanBeOneOfMany.php @@ -137,7 +137,7 @@ trait CanBeOneOfMany { return $this->ofMany(collect(Arr::wrap($column))->mapWithKeys(function ($column) { return [$column => 'MAX']; - })->all(), 'MAX', $relation ?: $this->guessRelationship()); + })->all(), 'MAX', $relation); } /** @@ -152,7 +152,7 @@ trait CanBeOneOfMany { return $this->ofMany(collect(Arr::wrap($column))->mapWithKeys(function ($column) { return [$column => 'MIN']; - })->all(), 'MIN', $relation ?: $this->guessRelationship()); + })->all(), 'MIN', $relation); } /**
ofMany to decide relationship name when it is null (#<I>)
diff --git a/lib/lcg.js b/lib/lcg.js index <HASH>..<HASH> 100644 --- a/lib/lcg.js +++ b/lib/lcg.js @@ -20,6 +20,8 @@ 'use strict'; +var Buffer = require('buffer').Buffer; + function LCG(seed) { var self = this; if (typeof seed === 'number') {
linting: [lib/lcg] comply with no-undef rule
diff --git a/tests/test_SlocusPop.py b/tests/test_SlocusPop.py index <HASH>..<HASH> 100644 --- a/tests/test_SlocusPop.py +++ b/tests/test_SlocusPop.py @@ -143,6 +143,10 @@ class testPythonObjects(unittest.TestCase): self.assertEqual(up.popdata_user, self.pop.generation) self.assertEqual(self.pop, up) + def testMutationLookupTable(self): + for i in self.pop.mut_lookup: + self.assertEqual(i[0], pop.mutations[i[1]].pos) + if __name__ == "__main__": unittest.main()
add test for contents of Population.mut_lookup
diff --git a/tools/vcli/bw/repl/repl.go b/tools/vcli/bw/repl/repl.go index <HASH>..<HASH> 100644 --- a/tools/vcli/bw/repl/repl.go +++ b/tools/vcli/bw/repl/repl.go @@ -201,7 +201,7 @@ func REPL(driver storage.Store, input *os.File, rl ReadLiner, chanSize, bulkSize if len(table.Bindings()) > 0 { fmt.Println(table.String()) } - fmt.Println("[OK] Time spent: ", time.Now().Sub(now)) + fmt.Printf("[OK] %d rows retrived. Time spent: %v.\n", table.NumRows(), time.Now().Sub(now)) } done <- false }
Add row number of row results to BQL
diff --git a/lib/coral_core.rb b/lib/coral_core.rb index <HASH>..<HASH> 100644 --- a/lib/coral_core.rb +++ b/lib/coral_core.rb @@ -142,7 +142,15 @@ coral_require(core_dir, :core) #--- # Include core utilities -[ :cli, :disk, :process, :batch, :shell, :ssh ].each do |name| +[ :liquid, + :cli, + :disk, + :process, + :batch, + :package, + :shell, + :ssh +].each do |name| coral_require(util_dir, name) end
Loading new utility classes in the coral loader.
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -126,7 +126,7 @@ if (typeof window !== 'undefined' && window.Vue) { }; module.exports = { - version: '1.0.0-rc.4', + version: '1.0.0-rc.5', install, SelectDropdown, Pagination,
[build] <I>-rc<I>
diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index <HASH>..<HASH> 100644 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -181,7 +181,8 @@ abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest if ($discountItems->getPrice() < 0) { $discount = $discounts->addChild('discount'); $discount->addChild('fixed', $discountItems->getPrice() * -1); - $discount->addChild('description',htmlspecialchars($discountItems->getName(),ENT_QUOTES,"UTF-8")); + $discount-> + addChild('description', htmlspecialchars($discountItems->getName(), ENT_QUOTES, "UTF-8")); } } }
addChild on a new line
diff --git a/src/feat/database/query.py b/src/feat/database/query.py index <HASH>..<HASH> 100644 --- a/src/feat/database/query.py +++ b/src/feat/database/query.py @@ -379,6 +379,19 @@ class BaseQueryViewController(object): return dict(startkey=(field, ), endkey=(field, {})) +class KeepValueController(BaseQueryViewController): + ''' + Use this controller if you want to define a field which later you can + query with include_values paramater. + This is usefull for loading collations. + ''' + + keeps_value = True + + def parse_view_result(self, rows): + return [(x[2], x[0][1]) for x in rows] + + class HighestValueFieldController(BaseQueryViewController): ''' Use this controller to extract the value of a joined field.
Implement a view query controller making it easy to extract data from the index.
diff --git a/builtin/providers/google/resource_pubsub_subscription.go b/builtin/providers/google/resource_pubsub_subscription.go index <HASH>..<HASH> 100644 --- a/builtin/providers/google/resource_pubsub_subscription.go +++ b/builtin/providers/google/resource_pubsub_subscription.go @@ -75,7 +75,7 @@ func resourcePubsubSubscriptionCreate(d *schema.ResourceData, meta interface{}) var ackDeadlineSeconds int64 ackDeadlineSeconds = 10 if v, ok := d.GetOk("ack_deadline_seconds"); ok { - ackDeadlineSeconds = v.(int64) + ackDeadlineSeconds = int64(v.(int)) } var subscription *pubsub.Subscription
google_pubsub_subscription crashes when ack_deadline_seconds is provided
diff --git a/src/Response/GetLogResponse.php b/src/Response/GetLogResponse.php index <HASH>..<HASH> 100644 --- a/src/Response/GetLogResponse.php +++ b/src/Response/GetLogResponse.php @@ -53,11 +53,11 @@ class GetLogResponse extends AbstractResponse $this->account = EntityFactory::createAccount($data['account']); } if (array_key_exists('log', $data)) { - $log = $data['log']; - if (!is_array($log)) { - $log = []; + $tmpLog = $data['log']; + if (!is_array($tmpLog)) { + $tmpLog = []; } - $this->log = $log; + $this->log = $tmpLog; } }
Fix sonar - rename variable which has the same name as field
diff --git a/js/feature-tier.js b/js/feature-tier.js index <HASH>..<HASH> 100644 --- a/js/feature-tier.js +++ b/js/feature-tier.js @@ -116,7 +116,9 @@ DasTier.prototype.styleForFeature = function(f) { } if (sh.type) { if (sh.type == 'default') { - maybe = sh.style; + if (!maybe) { + maybe = sh.style; + } continue; } else if (sh.type != f.type) { continue;
Tweak to style-precedences.
diff --git a/salt/modules/virtualenv_mod.py b/salt/modules/virtualenv_mod.py index <HASH>..<HASH> 100644 --- a/salt/modules/virtualenv_mod.py +++ b/salt/modules/virtualenv_mod.py @@ -274,7 +274,7 @@ def create(path, return ret -def _install_script(source, cwd, python, runas, ret): +def _install_script(source, cwd, python, runas): env = 'base' if not salt.utils.is_windows(): tmppath = salt.utils.mkstemp(dir=cwd)
We're no longer passing `ret`. Remove it from args.
diff --git a/colly.go b/colly.go index <HASH>..<HASH> 100644 --- a/colly.go +++ b/colly.go @@ -837,6 +837,11 @@ func (c *Collector) OnScraped(f ScrapedCallback) { c.lock.Unlock() } +// SetClient will override the previously set http.Client +func (c *Collector) SetClient(client *http.Client) { + c.backend.Client = client +} + // WithTransport allows you to set a custom http.RoundTripper (transport) func (c *Collector) WithTransport(transport http.RoundTripper) { c.backend.Client.Transport = transport
Add SetClient to set custom http client So we can use http client and cookie jar across collectors and outside collector
diff --git a/packages/styled-components/src/sheet/Rehydration.js b/packages/styled-components/src/sheet/Rehydration.js index <HASH>..<HASH> 100644 --- a/packages/styled-components/src/sheet/Rehydration.js +++ b/packages/styled-components/src/sheet/Rehydration.js @@ -5,7 +5,7 @@ import { getIdForGroup, setGroupForId } from './GroupIDAllocator'; import type { Sheet } from './types'; const SELECTOR = `style[${SC_ATTR}][${SC_ATTR_VERSION}="${SC_VERSION}"]`; -const RULE_RE = /(?:\s*)?(.*?){((?:{[^}]*}|(?!{).*?)*?)}/g; +const RULE_RE = /(?:\s*)?(.*?){((?:{[^}]*}|(?!{).*?)*)}/g; const MARKER_RE = new RegExp(`^${SC_ATTR}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\]`); export const outputSheet = (sheet: Sheet) => {
adjust rehydration regex to handle deeply-nested MQs (#<I>) fixes #<I>
diff --git a/retrieval/scrape.go b/retrieval/scrape.go index <HASH>..<HASH> 100644 --- a/retrieval/scrape.go +++ b/retrieval/scrape.go @@ -47,12 +47,11 @@ var ( }, []string{"interval"}, ) - targetSkippedScrapes = prometheus.NewCounterVec( + targetSkippedScrapes = prometheus.NewCounter( prometheus.CounterOpts{ Name: "prometheus_target_skipped_scrapes_total", Help: "Total number of scrapes that were skipped because the metric storage was throttled.", }, - []string{"interval"}, ) targetReloadIntervalLength = prometheus.NewSummaryVec( prometheus.SummaryOpts{ @@ -430,7 +429,7 @@ func (sl *scrapeLoop) run(interval, timeout time.Duration, errc chan<- error) { sl.report(start, time.Since(start), len(samples), err) last = start } else { - targetSkippedScrapes.WithLabelValues(interval.String()).Inc() + targetSkippedScrapes.Inc() } select {
Remove label from prometheus_target_skipped_scrapes_total (#<I>) This avoids it not being intialised, and breaking out by interval wasn't partiuclarly useful. Fixes #<I>
diff --git a/synapse/lib/service.py b/synapse/lib/service.py index <HASH>..<HASH> 100644 --- a/synapse/lib/service.py +++ b/synapse/lib/service.py @@ -128,8 +128,6 @@ class SvcProxy: self._addSvcTufo(svcfo) - self.fire('syn:svc:init', svcfo=svcfo) - def _addSvcTufo(self, svcfo): iden = svcfo[0] @@ -147,8 +145,6 @@ class SvcProxy: self.bytag.pop(svcfo[0]) self.byiden.pop(svcfo[0],None) - self.fire('syn:svc:fini', svcfo=svcfo) - def getSynSvc(self, iden): ''' Return the tufo for the specified svc iden ( or None ).
svcproxy is not an eventbus
diff --git a/src/Storage/Mapping/MetadataDriver.php b/src/Storage/Mapping/MetadataDriver.php index <HASH>..<HASH> 100644 --- a/src/Storage/Mapping/MetadataDriver.php +++ b/src/Storage/Mapping/MetadataDriver.php @@ -209,6 +209,15 @@ class MetadataDriver implements MappingDriver ]; if ($data['type']==='repeater') { + + foreach ($data['fields'] as $key => &$value) { + if (isset($this->typemap[$value['type']])) { + $value['fieldtype'] = $this->typemap[$value['type']]; + } else { + $value['fieldtype'] = $this->typemap['text']; + } + } + $this->metadata[$className]['fields'][$key] = $mapping; $this->metadata[$className]['fields'][$key]['data'] = $data; } @@ -354,8 +363,9 @@ class MetadataDriver implements MappingDriver /** * Get the field type for a given column. * - * @param string $name + * @param string $name * @param \Doctrine\DBAL\Schema\Column $column + * @return string */ protected function getFieldTypeFor($name, $column) {
improve metadata setup for rpeating fields
diff --git a/minio/policy.py b/minio/policy.py index <HASH>..<HASH> 100644 --- a/minio/policy.py +++ b/minio/policy.py @@ -378,7 +378,7 @@ def _remove_statements(statements, policy, bucket_name, prefix=''): # def _merge_dict(d1, d2): out = collections.defaultdict(list) - for k, v in itertools.chain(d1.iteritems(), d2.iteritems()): + for k, v in itertools.chain(d1.items(), d2.items()): out[k] = list(set(out[k] + [v] if isinstance(v, basestring) else v)) return dict(out) @@ -399,7 +399,7 @@ def _merge_dict(d1, d2): # def _merge_condition(c1, c2): out = collections.defaultdict(dict) - for k, v in itertools.chain(c1.iteritems(), c2.iteritems()): + for k, v in itertools.chain(c1.items(), c2.items()): out.update({k: _merge_dict(out[k], v)}) return dict(out)
Fix: Use dict.items() instead of dict.iteritems() (#<I>) dict.iteritems() is not supported in python 3 but we can safely use dict.items() which provides a _view_ of dict elements.
diff --git a/demo.js b/demo.js index <HASH>..<HASH> 100644 --- a/demo.js +++ b/demo.js @@ -12,12 +12,18 @@ const VIDEO_ADDRESS_SIZE = (3**VIDEO_TRYTE_COUNT * TRITS_PER_TRYTE)**TRYTES_PER_ const Memory = require('./memory'); +const MAX_ADDRESS = (3**TRITS_PER_WORD - 1) / 2; +const MIN_ADDRESS = -MAX_ADDRESS; + +const VIDEO_ADDRESS_OFFSET = MAX_ADDRESS - VIDEO_ADDRESS_SIZE; // -3280, +if (VIDEO_ADDRESS_SIZE + VIDEO_ADDRESS_OFFSET !== MAX_ADDRESS) throw new Error('wrong video address size'); + const memory = Memory({ tryteCount: MEMORY_SIZE, map: { video: { - start: -3280, - end: VIDEO_ADDRESS_SIZE, + start: VIDEO_ADDRESS_OFFSET, // -3280 00iii iiiii + end: VIDEO_ADDRESS_SIZE + VIDEO_ADDRESS_OFFSET, // 29524, end 11111 11111 }, /* TODO input: {
Clarify video memory map assignment (-<I> to <I>, at upper end of memory space, to fit)
diff --git a/src/DocBlox/Core/Abstract.php b/src/DocBlox/Core/Abstract.php index <HASH>..<HASH> 100644 --- a/src/DocBlox/Core/Abstract.php +++ b/src/DocBlox/Core/Abstract.php @@ -27,7 +27,7 @@ abstract class DocBlox_Core_Abstract { /** @var string The actual version number of DocBlox. */ - const VERSION = '0.18.0'; + const VERSION = '0.18.1'; /** * The logger used to capture all messages send by the log method.
RELEASE: Updated version number to <I>
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 @@ -7,9 +7,13 @@ unless defined? SPEC_ROOT when ENV["RADIANT_ENV_FILE"] require ENV["RADIANT_ENV_FILE"] when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions} - require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/environment" + env = "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/environment" + puts "requiring #{env}" + require env else - require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/environment" + env = "#{File.expand_path(File.dirname(__FILE__) + "/../")}/config/environment" + puts "requiring #{env}" + require env end # unless defined? RADIANT_ROOT
alter the environment path when running tests from RADIANT_ROOT
diff --git a/tests/tictactoe/ShuffledDecisionsGameState.php b/tests/tictactoe/ShuffledDecisionsGameState.php index <HASH>..<HASH> 100644 --- a/tests/tictactoe/ShuffledDecisionsGameState.php +++ b/tests/tictactoe/ShuffledDecisionsGameState.php @@ -7,6 +7,17 @@ namespace lucidtaz\minimax\tests\tictactoe; * * This is to rule out any tests that accidentally succeed because of * coincidence. + * + * Note that this approach uses inheritance rather than applying the arguably + * more sensible Decorator pattern. The reason for this is that the code + * (currently, perhaps it will be solved) it not really strict with regards to + * typing, and will call methods on the TicTacToe GameState class that are not + * defined in the GameState interface, such as makeMove(). Until such issues are + * resolved by an interface redesign, we must resort to inheritance. + * + * Furthermore, a decorated object may lose its decoration when passing out + * references of itself to other code. This makes the pattern more hassle than + * it's worth. */ class ShuffledDecisionsGameState extends GameState {
Explain why the tests use inheritance instead of a Decorator
diff --git a/src/rabird/core/distutils/downloader.py b/src/rabird/core/distutils/downloader.py index <HASH>..<HASH> 100644 --- a/src/rabird/core/distutils/downloader.py +++ b/src/rabird/core/distutils/downloader.py @@ -115,7 +115,7 @@ def download(url, target=None): downloader(url, target) -def download_file_insecure_to_io(url, target_file=None): +def download_file_insecure_to_io(url, target_file=None, headers=None): """ Use Python to download the file, even though it cannot authenticate the connection. @@ -123,11 +123,20 @@ def download_file_insecure_to_io(url, target_file=None): try: from urllib.request import urlopen + from urllib.request import Request except ImportError: from urllib2 import urlopen + from urllib2 import Request src = None try: - src = urlopen(url) + req = Request( + url, + data=None, + headers=headers + ) + + src = urlopen(req) + # Read/write all in one block, so we don't create a corrupt file # if the download is interrupted. data = src.read()
Added headers argument for modify something just like "User-Agent"
diff --git a/clip.js b/clip.js index <HASH>..<HASH> 100644 --- a/clip.js +++ b/clip.js @@ -165,7 +165,7 @@ Polygon.prototype.collectClipResults = function(subjectList, clipList) { for (; !crt.visited; crt = crt.neighbor) { result.push(crt.vec.clone()); - var forward = !crt.entry + var forward = crt.entry while(true) { crt.visited = true; crt = forward ? crt.next : crt.prev;
this goes along with a previous commit. Since we fixed phase 2, we can fix phase 3. In phase 2, the `status_entry` was being initialized using the wrong polygon.
diff --git a/test/test_base.rb b/test/test_base.rb index <HASH>..<HASH> 100644 --- a/test/test_base.rb +++ b/test/test_base.rb @@ -162,7 +162,7 @@ class TestBase < Test::Unit::TestCase SomeModel.delete_all(:id=>2) end should "leave non_matching items in table" do - assert 1,SomeModel.all.size + assert_equal 1, SomeModel.all.size end should "remove matching items" do assert SomeModel.where(:id=>2).empty?
that should have been assert_equal. not sure how that ever worked.
diff --git a/src/diamond/test/testmetric.py b/src/diamond/test/testmetric.py index <HASH>..<HASH> 100644 --- a/src/diamond/test/testmetric.py +++ b/src/diamond/test/testmetric.py @@ -83,3 +83,22 @@ class TestMetric(unittest.TestCase): message = 'Actual %s, expected %s' % (actual_value, expected_value) self.assertEqual(actual_value, expected_value, message) + + def test_issue_723(self): + metrics = [ + 9.97143369909e-05, + '9.97143369909e-05', + 0.0000997143369909, + '0.0000997143369909', + ] + + for precision in xrange(0, 100): + for m in metrics: + metric = Metric('test.723', m, timestamp=0) + + actual_value = str(metric).strip() + expected_value = 'test.723 0 0' + + message = 'Actual %s, expected %s' % (actual_value, + expected_value) + self.assertEqual(actual_value, expected_value, message)
Per #<I>, try to duplicate generating a scientific notation metric
diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index <HASH>..<HASH> 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -372,6 +372,17 @@ EOF expect(File.exists?('simple.c')).to be_truthy end + it "does not process environments" do + test_dir("simple") + result = run_rscons(args: %w[clean]) + expect(result.stderr).to eq "" + expect(File.exists?('build/e.1/simple.c.o')).to be_falsey + expect(File.exists?('build/e.1')).to be_falsey + expect(File.exists?('simple.exe')).to be_falsey + expect(File.exists?('simple.c')).to be_truthy + expect(result.stdout).to eq "" + end + it 'does not clean created directories if other non-rscons-generated files reside there' do test_dir("simple") result = run_rscons
Test that clean task does not process environments
diff --git a/mod/hotpot/report.php b/mod/hotpot/report.php index <HASH>..<HASH> 100644 --- a/mod/hotpot/report.php +++ b/mod/hotpot/report.php @@ -51,7 +51,7 @@ // assemble array of form data $formdata = array( 'mode' => $mode, - 'reportusers' => has_capability('mod/hotpot:viewreport',$modulecontext) ? optional_param('reportusers', get_user_preferences('hotpot_reportusers', 'allusers'), PARAM_ALPHA) : 'this', + 'reportusers' => has_capability('mod/hotpot:viewreport',$modulecontext) ? optional_param('reportusers', get_user_preferences('hotpot_reportusers', 'allusers'), PARAM_ALPHANUM) : 'this', 'reportattempts' => optional_param('reportattempts', get_user_preferences('hotpot_reportattempts', 'all'), PARAM_ALPHA), 'reportformat' => optional_param('reportformat', 'htm', PARAM_ALPHA), 'reportshowlegend' => optional_param('reportshowlegend', get_user_preferences('hotpot_reportshowlegend', '0'), PARAM_INT),
set"reportusers" to PARAM_ALPHANUM, so that it can accept userids and group names
diff --git a/library/src/main/java/com/jaredrummler/materialspinner/MaterialSpinner.java b/library/src/main/java/com/jaredrummler/materialspinner/MaterialSpinner.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/jaredrummler/materialspinner/MaterialSpinner.java +++ b/library/src/main/java/com/jaredrummler/materialspinner/MaterialSpinner.java @@ -478,7 +478,7 @@ public class MaterialSpinner extends TextView { && popupWindowHeight <= listViewHeight) { return popupWindowHeight; } - return WindowManager.LayoutParams.WRAP_CONTENT; + return (int) listViewHeight; } /**
Do not use WRAP_CONTENT for PopupWindow height The PopupWindow was using WRAP_CONTENT for its height which was showing the popup below the view in some instances. The listview height is now used for the PopupWindow height which should fix this issue. This should resolve #<I> #<I>
diff --git a/pkg/kvstore/etcd.go b/pkg/kvstore/etcd.go index <HASH>..<HASH> 100644 --- a/pkg/kvstore/etcd.go +++ b/pkg/kvstore/etcd.go @@ -1491,9 +1491,15 @@ func (e *etcdClient) Close() { } e.RLock() defer e.RUnlock() - e.lockSession.Close() - e.session.Close() - e.client.Close() + if err := e.lockSession.Close(); err != nil { + e.getLogger().WithError(err).Warning("Failed to revoke lock session while closing etcd client") + } + if err := e.session.Close(); err != nil { + e.getLogger().WithError(err).Warning("Failed to revoke main session while closing etcd client") + } + if err := e.client.Close(); err != nil { + e.getLogger().WithError(err).Warning("Failed to close etcd client") + } } // GetCapabilities returns the capabilities of the backend
kvstore: Log errors while closing etcd client
diff --git a/example/idp2/idp.py b/example/idp2/idp.py index <HASH>..<HASH> 100755 --- a/example/idp2/idp.py +++ b/example/idp2/idp.py @@ -371,7 +371,7 @@ class SSO(Service): @staticmethod def _store_request(saml_msg): logger.debug("_store_request: %s", saml_msg) - key = sha1(saml_msg["SAMLRequest"]).hexdigest() + key = sha1(saml_msg["SAMLRequest"].encode()).hexdigest() # store the AuthnRequest IDP.ticket[key] = saml_msg return key
Fixed Unicode-objects must be encoded before hashing bug
diff --git a/src/Maths.php b/src/Maths.php index <HASH>..<HASH> 100644 --- a/src/Maths.php +++ b/src/Maths.php @@ -3,13 +3,13 @@ class Maths { - public static function _double($value, $iterations = 1) + public static function double($value, $iterations = 1) { $result = $value; if ($iterations > 0) { - $result = self::_double($result * 2, ($iterations - 1)); + $result = self::double($result * 2, ($iterations - 1)); } return $result;
Rename _double method to double in Maths library
diff --git a/src/dawguk/GarminConnect.php b/src/dawguk/GarminConnect.php index <HASH>..<HASH> 100755 --- a/src/dawguk/GarminConnect.php +++ b/src/dawguk/GarminConnect.php @@ -133,6 +133,7 @@ class GarminConnect { preg_match("/ticket=([^']+)'/", $strResponse, $arrMatches); if (!isset($arrMatches[1])) { + $this->objConnector->clearCookie(); throw new AuthenticationException("Ticket value wasn't found in response - looks like the authentication failed."); }
Fixes #5 Fix: Removing cookie from disk if authentication failed
diff --git a/src/util.js b/src/util.js index <HASH>..<HASH> 100644 --- a/src/util.js +++ b/src/util.js @@ -80,6 +80,17 @@ Bitcoin.Util = { while (decimalPart.length < 2) decimalPart += "0"; return integerPart+"."+decimalPart; }, + parseValue: function (valueString) { + var valueComp = valueString.split('.'); + var integralPart = valueComp[0]; + var fractionalPart = valueComp[1] || "0"; + while (fractionalPart.length < 8) fractionalPart += "0"; + fractionalPart = fractionalPart.replace(/^0+/g, ''); + var value = BigInteger.valueOf(parseInt(integralPart)); + value = value.multiply(BigInteger.valueOf(100000000)); + value = value.add(BigInteger.valueOf(parseInt(fractionalPart))); + return value; + }, sha256ripe160: function (data) { return Crypto.RIPEMD160(Crypto.SHA256(data, {asBytes: true}), {asBytes: true}); }
New utility function for parsing value strings.
diff --git a/tests/spring-cloud-sleuth-instrumentation-feign-tests/src/test/java/org/springframework/cloud/sleuth/instrument/feign/issues/issue502/Issue502Tests.java b/tests/spring-cloud-sleuth-instrumentation-feign-tests/src/test/java/org/springframework/cloud/sleuth/instrument/feign/issues/issue502/Issue502Tests.java index <HASH>..<HASH> 100644 --- a/tests/spring-cloud-sleuth-instrumentation-feign-tests/src/test/java/org/springframework/cloud/sleuth/instrument/feign/issues/issue502/Issue502Tests.java +++ b/tests/spring-cloud-sleuth-instrumentation-feign-tests/src/test/java/org/springframework/cloud/sleuth/instrument/feign/issues/issue502/Issue502Tests.java @@ -82,7 +82,7 @@ public class Issue502Tests { then(response).isEqualTo("foo"); // retries then(this.spans).hasSize(1); - then(this.spans.get(0).tags().get("http.path")).isEqualTo(""); + //then(this.spans.get(0).tags().get("http.path")).isEqualTo(""); } }
Comments out failing bit of test. See gh-<I>
diff --git a/colorific/__init__.py b/colorific/__init__.py index <HASH>..<HASH> 100644 --- a/colorific/__init__.py +++ b/colorific/__init__.py @@ -21,6 +21,11 @@ def get_version(): __version__ = get_version() -# import palette modules for backward compatilibity -from .palette import * -from .config import * +# import palette modules for backward compatilibity. +try: + from .palette import * + from .config import * + +except ImportError: + # you should install requirements, see requirements.pip file. + pass
don't give an error if you still didn't install requirements.
diff --git a/datadog_checks_base/datadog_checks/base/checks/base.py b/datadog_checks_base/datadog_checks/base/checks/base.py index <HASH>..<HASH> 100644 --- a/datadog_checks_base/datadog_checks/base/checks/base.py +++ b/datadog_checks_base/datadog_checks/base/checks/base.py @@ -90,6 +90,9 @@ class __AgentCheckPy3(object): # new-style init: the 3rd argument is `instances` self.instances = args[2] + # Agent 6+ will only have one instance + self.instance = self.instances[0] if self.instances else None + # `self.hostname` is deprecated, use `datadog_agent.get_hostname()` instead self.hostname = datadog_agent.get_hostname() @@ -457,6 +460,9 @@ class __AgentCheckPy2(object): # new-style init: the 3rd argument is `instances` self.instances = args[2] + # Agent 6+ will only have one instance + self.instance = self.instances[0] if self.instances else None + # `self.hostname` is deprecated, use `datadog_agent.get_hostname()` instead self.hostname = datadog_agent.get_hostname()
Expose the single check instance as an attribute (#<I>)
diff --git a/packages/@vue/cli-service/lib/commands/serve.js b/packages/@vue/cli-service/lib/commands/serve.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-service/lib/commands/serve.js +++ b/packages/@vue/cli-service/lib/commands/serve.js @@ -51,7 +51,7 @@ module.exports = (api, options) => { api.chainWebpack(webpackConfig => { if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') { webpackConfig - .devtool('cheap-module-eval-source-map') + .devtool('eval-cheap-module-source-map') webpackConfig .plugin('hmr')
refactor(cli-service): webpack `devtool` option (#<I>) Close: #<I>
diff --git a/src/Factory.php b/src/Factory.php index <HASH>..<HASH> 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -28,6 +28,23 @@ abstract class Factory string $password = null, array $options = [] ): EasyDB { + return static::fromArray([$dsn, $username, $password, $options]); + } + + /** + * Create a new EasyDB object from array of parameters + * + * @param string $dsn + * @param string $username + * @param string $password + * @param array $options + * @return \ParagonIE\EasyDB\EasyDB + * @throws Issues\ConstructorFailed + */ + public static function fromArray(array $config): EasyDB { + + list($dsn, $username, $password, $options) = $config; + $dbEngine = ''; $post_query = null;
Add fromArray() alias for connect() In case an exception is thrown in coonect(), database credentials are shown in the stack trace. So an alias fromArray() is added, to put all credentials into array which will appear in the stack trace as a mere word "Array".
diff --git a/src/core/createTemplate.js b/src/core/createTemplate.js index <HASH>..<HASH> 100644 --- a/src/core/createTemplate.js +++ b/src/core/createTemplate.js @@ -4,17 +4,13 @@ import createHTMLStringTree from '../htmlString/createHTMLStringTree'; import { createVariable } from './variables'; import scanTreeForDynamicNodes from './scanTreeForDynamicNodes'; +let uniqueId = Date.now(); + function createId() { - if ( ExecutionEnvironment.canUseSymbol) { + if ( ExecutionEnvironment.canUseSymbol ) { return Symbol(); } else { - let uniqueId = null; - - function getUniqueName(prefix) { - if (!uniqueId) uniqueId = (Date.now()); - return (prefix || 'id') + (uniqueId++); - }; - return getUniqueName('Inferno'); + return uniqueId++; } }
Reduce and inline the createId fallback
diff --git a/lib/accounting/booking.rb b/lib/accounting/booking.rb index <HASH>..<HASH> 100644 --- a/lib/accounting/booking.rb +++ b/lib/accounting/booking.rb @@ -9,7 +9,17 @@ module Accounting # Scoping named_scope :by_account, lambda {|account_id| { :conditions => ["debit_account_id = :account_id OR credit_account_id = :account_id", {:account_id => account_id}] } - } + } do + # Returns array of all booking titles + def titles + find(:all, :group => :title).map{|booking| booking.title} + end + end + + # Returns array of all years we have bookings for + def self.fiscal_years + find(:all, :select => "year(value_date) AS year", :group => "year(value_date)").map{|booking| booking.year} + end def self.scope_by_value_date(value_date) scoping = self.default_scoping - [@by_value_scope]
Extend Booking.by_account scope with titles method; Add Booking.fiscal_years
diff --git a/hazelcast/src/test/java/com/hazelcast/replicatedmap/ReplicatedMapStressTest.java b/hazelcast/src/test/java/com/hazelcast/replicatedmap/ReplicatedMapStressTest.java index <HASH>..<HASH> 100644 --- a/hazelcast/src/test/java/com/hazelcast/replicatedmap/ReplicatedMapStressTest.java +++ b/hazelcast/src/test/java/com/hazelcast/replicatedmap/ReplicatedMapStressTest.java @@ -1,7 +1,7 @@ package com.hazelcast.replicatedmap; import com.hazelcast.test.HazelcastTestSupport; -import com.hazelcast.test.annotation.SlowTest; +import com.hazelcast.test.annotation.NightlyTest; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicInteger; import static org.junit.Assert.assertEquals; -@Category(SlowTest.class) +@Category(NightlyTest.class) public class ReplicatedMapStressTest extends HazelcastTestSupport { @Test public void stressTestRemove() throws Exception {
stress tests belongs to a nightly category
diff --git a/devboard.js b/devboard.js index <HASH>..<HASH> 100644 --- a/devboard.js +++ b/devboard.js @@ -46,6 +46,12 @@ exports.DOMNode = function DOMNode(render, cleanUp) { /** * Rendering */ + +var customRender = false; +exports.customRender = function(fn) { + customRender = fn; +}; + function getRoot() { /* eslint-env browser */ var root = document.getElementById(ROOT_DIV_ID); @@ -62,5 +68,9 @@ function enqueueRender() { enqueueRender.timer = requestAnimationFrame(renderRoot, 0); } function renderRoot() { - ReactDOM.render($(Devboard, { catalog: catalog }), getRoot()); + var element = $(Devboard, { catalog: catalog }); + if (customRender) { + element = customRender(element); + } + ReactDOM.render(element, getRoot()); }
Provide a way to wrap the root component with your own stuff This was introduced for RHL v3's <AppContainer>, but seems like it might be generally fairly useful.
diff --git a/source/php/BulkImport.php b/source/php/BulkImport.php index <HASH>..<HASH> 100644 --- a/source/php/BulkImport.php +++ b/source/php/BulkImport.php @@ -171,7 +171,7 @@ class BulkImport $deleteAccounts = $this->diffUserAccounts(false); //Sanity check, many users to remove? - $maxDeleteLimit = isset($_GET['maxDeletelimit']) ? (int) $_GET['maxDeletelimit'] : 100; + $maxDeleteLimit = isset($_GET['maxDeletelimit']) ? (int) $_GET['maxDeletelimit'] : 1000; if (count($deleteAccounts) > $maxDeleteLimit) { if (is_main_site()) {
Update BulkImport.php Set a higher max delete limit.
diff --git a/reaction.py b/reaction.py index <HASH>..<HASH> 100644 --- a/reaction.py +++ b/reaction.py @@ -74,8 +74,14 @@ def tokenize(rx): yield token def parse_compound_number(number): - '''Parse compound number''' - return Decimal(number) + '''Parse compound number + + Return plain int if possible, otherwise use Decimal.''' + + d = Decimal(number) + if d % 1 == 0: + return int(d) + return d def parse_compound_count(count): '''Parse compound count'''
reaction: Prefer integers over Decimal for stoichiometry
diff --git a/lib/sequelize-mocking.js b/lib/sequelize-mocking.js index <HASH>..<HASH> 100644 --- a/lib/sequelize-mocking.js +++ b/lib/sequelize-mocking.js @@ -16,7 +16,7 @@ const _ = require('lodash'); const sequelizeFixtures = require('sequelize-fixtures'); // Constants and variables -const FAKE_DATABASE_NAME = 'test-database'; +const FAKE_DATABASE_NAME = 'sqlite://test-database'; const AFTER_DEFINE_EVENT = 'afterDefine'; const AFTER_DEFINE_EVENT_NAME = 'sequelizeMockAfterDefine'; const SQLITE_SEQUELIZE_OPTIONS = {
Close #<I>: apply the dialect prefix "sqlite://"
diff --git a/src/paperwork/backend/common/page.py b/src/paperwork/backend/common/page.py index <HASH>..<HASH> 100644 --- a/src/paperwork/backend/common/page.py +++ b/src/paperwork/backend/common/page.py @@ -21,6 +21,7 @@ import tempfile import PIL.Image +from ..util import strip_accents from ..util import split_words @@ -218,11 +219,10 @@ class BasicPage(object): return self.doc == other.doc and self.page_nb == other.page_nb def __contains__(self, sentence): - words = split_words(sentence) - words = [word.lower() for word in words] + words = split_words(sentence, keep_short=True) txt = self.text for line in txt: - line = line.lower() + line = strip_accents(line.lower()) for word in words: if word in line: return True
BasicPage.__contains__: Fix: Don't ignore short words + match correctly keywords, with accents or not
diff --git a/message.go b/message.go index <HASH>..<HASH> 100644 --- a/message.go +++ b/message.go @@ -283,6 +283,16 @@ func (m Message) Options(o OptionID) []interface{} { return rv } +// Get the first value for the given option ID. +func (m Message) Option(o OptionID) interface{} { + for _, v := range m.opts { + if o == v.ID { + return v.Value + } + } + return nil +} + func (m Message) optionStrings(o OptionID) []string { var rv []string for _, o := range m.Options(o) {
Added Option as a convenience for a single option
diff --git a/cookies.py b/cookies.py index <HASH>..<HASH> 100644 --- a/cookies.py +++ b/cookies.py @@ -750,6 +750,11 @@ class Cookie(object): if key in ('name', 'value'): continue parser = cls.attribute_parsers.get(key) if not parser: + # Don't let totally unknown attributes pass silently + if not ignore_bad_attributes: + raise InvalidCookieAttributeError(key, value, + "unknown cookie attribute '%s'" % key) + _report_unknown_attribute(key) continue parsed[key] = parse(key)
fix: don't let totally unknown attributes pass silently in from_dict for example, if a dict supposedly representing a Cookie has an attribute 'duh' that is likely to indicate an error. if the user set ignore_bad_attributes=False they want an exception. even if it's true, the typical behavior elsewhere is to log unknown attribute.
diff --git a/src/DoctrineServiceProvider.php b/src/DoctrineServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/DoctrineServiceProvider.php +++ b/src/DoctrineServiceProvider.php @@ -147,6 +147,10 @@ class DoctrineServiceProvider extends ServiceProvider */ protected function setupCache() { + // Alias the cache, so the class is injectable in Lumen too + $this->app->alias('cache', \Illuminate\Cache\CacheManager::class); + + // Bind Doctrine CacheManager $this->app->singleton(CacheManager::class); }
Alias CacheManager so the class is injectable in Lumen as well, fixes #<I>
diff --git a/lib/express/server.js b/lib/express/server.js index <HASH>..<HASH> 100644 --- a/lib/express/server.js +++ b/lib/express/server.js @@ -231,11 +231,11 @@ Server.prototype.error = function(fn){ Server.prototype.set = function(setting, val){ if (val === undefined) { - var app = this; - do { - if (app.settings.hasOwnProperty(setting)) - return app.settings[setting]; - } while (app = app.parent); + if (this.settings.hasOwnProperty(setting)) { + return this.settings[setting]; + } else if (this.parent) { + return this.parent.set(setting); + } } else { this.settings[setting] = val; return this;
Refactored app.set()
diff --git a/src/frontend/org/voltdb/ProcedureRunner.java b/src/frontend/org/voltdb/ProcedureRunner.java index <HASH>..<HASH> 100644 --- a/src/frontend/org/voltdb/ProcedureRunner.java +++ b/src/frontend/org/voltdb/ProcedureRunner.java @@ -441,8 +441,7 @@ public class ProcedureRunner { qs.stmt, qs.params, sparams); } } - - if (m_catProc.getSinglepartition()) { + else if (m_catProc.getSinglepartition()) { results = fastPath(batch); } else {
Replace a removed 'else'. Turns out that if{} else if{} is not replacable with if{} if{}.
diff --git a/src/pyshark/packet/common.py b/src/pyshark/packet/common.py index <HASH>..<HASH> 100644 --- a/src/pyshark/packet/common.py +++ b/src/pyshark/packet/common.py @@ -20,5 +20,5 @@ class SlotsPickleable(object): return ret def __setstate__(self, data): - for key, val in data.iteritems(): + for key, val in data.items(): setattr(self, key, val)
Changed iteritems() in SlotsPicklable, upgraded to Python3 items()
diff --git a/lib/twat/actions.rb b/lib/twat/actions.rb index <HASH>..<HASH> 100644 --- a/lib/twat/actions.rb +++ b/lib/twat/actions.rb @@ -100,9 +100,13 @@ module Twat end def account - @account ||= + @account = config.accounts[account_name] + end + + def account_name + @account_name ||= if opts.include?(:account) - config.accounts[opts[:account]] + opts[:account] else config.default_account end
Shimmed around a stupid regression
diff --git a/fontbakery-check-ttf.py b/fontbakery-check-ttf.py index <HASH>..<HASH> 100755 --- a/fontbakery-check-ttf.py +++ b/fontbakery-check-ttf.py @@ -840,9 +840,14 @@ def main(): expected_value = "{}-{}".format(fname, style) + # TODO: Figure out if we really need to handle these entries + # and what would be the expected format for them. +# elif name.nameID == NAMEID_COMPATIBLE_FULL_MACONLY: +# expected_value = "some-rule-here" + else: - # We'll implement support for - # more name entries later today :-) + # This ignores any other nameID that might + # be declared in the name table continue # This is to allow us to handle more than one choice: @@ -858,9 +863,6 @@ def main(): "' or '".join(expected_values), string)) - if name.nameID == NAMEID_COMPATIBLE_FULL_MACONLY: - pass # FSanches: not sure yet which rule to use here... - if failed is False: fb.ok("Main entries in the name table" " conform to expected format.")
remove requirement for nameid=<I> (NAMEID_COMPATIBLE_FULL_MACONLY) and leave a TODO comment to remind us that we need to check this.
diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/SQLSrv/StatementTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/SQLSrv/StatementTest.php index <HASH>..<HASH> 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/SQLSrv/StatementTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/SQLSrv/StatementTest.php @@ -3,6 +3,7 @@ namespace Doctrine\Tests\DBAL\Functional\Driver\SQLSrv; use Doctrine\DBAL\Driver\SQLSrv\Driver; +use Doctrine\DBAL\Driver\SQLSrv\SQLSrvException; use Doctrine\Tests\DbalFunctionalTestCase; class StatementTest extends DbalFunctionalTestCase @@ -27,7 +28,7 @@ class StatementTest extends DbalFunctionalTestCase // it's impossible to prepare the statement without bound variables for SQL Server, // so the preparation happens before the first execution when variables are already in place - $this->setExpectedException('Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvException'); + $this->expectException('Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvException'); $stmt->execute(); } }
#<I> s/setExpectedException/expectException
diff --git a/lib/oxidized/model/saos.rb b/lib/oxidized/model/saos.rb index <HASH>..<HASH> 100644 --- a/lib/oxidized/model/saos.rb +++ b/lib/oxidized/model/saos.rb @@ -10,6 +10,7 @@ class SAOS < Oxidized::Model end cmd 'configuration show' do |cfg| + cfg.gsub! /^! Created: [^\n]*\n/, '' cfg end
Update saos.rb This proposed change is to make shure lines starting with "! Created: " are ignored. This preventes a diff in the config every time oxidized runs over Ciena SAOS devices. This is probably not the most elegant way but it's a start.
diff --git a/src/DumpServerCommand.php b/src/DumpServerCommand.php index <HASH>..<HASH> 100644 --- a/src/DumpServerCommand.php +++ b/src/DumpServerCommand.php @@ -5,13 +5,13 @@ namespace BeyondCode\DumpServer; use Illuminate\Console\Command; use InvalidArgumentException; -use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; +use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\VarDumper\Dumper\CliDumper; use Symfony\Component\VarDumper\Dumper\HtmlDumper; use Symfony\Component\VarDumper\Server\DumpServer; use Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor; +use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; class DumpServerCommand extends Command {
Enforce Laravel Style imports.
diff --git a/examples/shell.py b/examples/shell.py index <HASH>..<HASH> 100644 --- a/examples/shell.py +++ b/examples/shell.py @@ -10,7 +10,9 @@ from typing import Text from six import text_type as text -from iota import Iota, __version__ +# Import all common IOTA symbols into module scope, so that the user +# doesn't have to import anything themselves. +from iota import * def main(uri): @@ -24,6 +26,7 @@ def main(uri): ) ) + try: # noinspection PyUnresolvedReferences import IPython @@ -35,6 +38,8 @@ def main(uri): if __name__ == '__main__': + from iota import __version__ + parser = ArgumentParser( description = __doc__, epilog = 'PyOTA v{version}'.format(version=__version__),
Made repl script a bit more user-friendly.
diff --git a/lib/transports/polling-xhr.js b/lib/transports/polling-xhr.js index <HASH>..<HASH> 100644 --- a/lib/transports/polling-xhr.js +++ b/lib/transports/polling-xhr.js @@ -177,6 +177,7 @@ Request.prototype.create = function () { }; this.xhr.onprogress = empty; } else { + this.xhr.withCredentials = true; this.xhr.onreadystatechange = function () { try { if (xhr.readyState != 4) return;
Fixed; make sure to send cookies in cross domain requests.
diff --git a/lib/improv.js b/lib/improv.js index <HASH>..<HASH> 100644 --- a/lib/improv.js +++ b/lib/improv.js @@ -200,7 +200,7 @@ var ImprovChart = function (chart) { this.noteList = makeImprovNoteList(chart); this.midi = function (filename, options) { - return midi.output('improv', this, filename, options); + return midi.output('improvChart', this, filename, options); }; this.toString = function () { diff --git a/lib/midi.js b/lib/midi.js index <HASH>..<HASH> 100644 --- a/lib/midi.js +++ b/lib/midi.js @@ -188,7 +188,7 @@ var makeChordTrack = function (chords, options) { }; // Return MIDI buffer containing an improvisation -var improv = function (data, options) { +var improvChart = function (data, options) { var header = makeHeaderChunk(1, 3); var tempoTrack = makeTempoTrack(options); var noteTrack = makeMelodyTrack(data.noteList, options); @@ -222,7 +222,7 @@ module.exports.output = function (type, data, filename, options) { }; // Map of type string to function var types = { - improv: improv, + improvChart: improvChart, chordChart: chordChart }; var buffer;
Changed value from `improv` to `improvChart` in midi settings to be consistent.
diff --git a/lib/guard/webrick/runner.rb b/lib/guard/webrick/runner.rb index <HASH>..<HASH> 100644 --- a/lib/guard/webrick/runner.rb +++ b/lib/guard/webrick/runner.rb @@ -21,6 +21,8 @@ module Guard def stop Process.kill("HUP", pid) + @pid = nil + true end end end diff --git a/spec/guard/webrick/runner_spec.rb b/spec/guard/webrick/runner_spec.rb index <HASH>..<HASH> 100644 --- a/spec/guard/webrick/runner_spec.rb +++ b/spec/guard/webrick/runner_spec.rb @@ -38,20 +38,32 @@ describe Guard::WEBrick::Runner do it "should kill the process running the HTTPServer" do Process.stub(:fork).and_return(12345) Process.should_receive(:kill).with("HUP", 12345) - new_runner.stop + subject = new_runner + subject.stop + end + + it "should set the pid back to nil" do + Process.stub(:fork).and_return(12345) + Process.should_receive(:kill).with("HUP", 12345) + subject = new_runner + subject.stop + subject.pid.should be_nil end it "should shutdown the WEBrick::HTTPServer instance" do make_fake_forked_server Signal.trap("USR1") { @css = true } - r = new_runner + subject = new_runner sleep 0.05 # wait for HTTPServer to fork and start - r.stop + subject.stop sleep 0.05 # wait to get USR1 signal from child pid @css.should be_true end end + + describe "restart" do + end end def new_runner(options = {})
Set @pid to nil when server is shutdown.
diff --git a/lib/shopify_app/version.rb b/lib/shopify_app/version.rb index <HASH>..<HASH> 100644 --- a/lib/shopify_app/version.rb +++ b/lib/shopify_app/version.rb @@ -1,3 +1,3 @@ module ShopifyApp - VERSION = "2.1.0" + VERSION = "2.1.1" end
Bumps version number for release of John T's LESS compile and image route changes
diff --git a/aeron-driver/src/main/java/uk/co/real_logic/aeron/driver/DriverConductor.java b/aeron-driver/src/main/java/uk/co/real_logic/aeron/driver/DriverConductor.java index <HASH>..<HASH> 100644 --- a/aeron-driver/src/main/java/uk/co/real_logic/aeron/driver/DriverConductor.java +++ b/aeron-driver/src/main/java/uk/co/real_logic/aeron/driver/DriverConductor.java @@ -263,10 +263,9 @@ public class DriverConductor implements Agent private void onHeartbeatCheckTimeouts() { - final long now = nanoClock.nanoTime(); - toDriverCommands.consumerHeartbeatTime(epochClock.time()); + final long now = nanoClock.nanoTime(); onCheckClients(now); onCheckPublications(now); onCheckPublicationLinks(now);
[Java]: Code ordering for clarity.
diff --git a/pkg/serviceaccount/jwt.go b/pkg/serviceaccount/jwt.go index <HASH>..<HASH> 100644 --- a/pkg/serviceaccount/jwt.go +++ b/pkg/serviceaccount/jwt.go @@ -22,7 +22,6 @@ import ( "crypto/rsa" "encoding/base64" "encoding/json" - "errors" "fmt" "strings" @@ -140,8 +139,6 @@ type Validator interface { NewPrivateClaims() interface{} } -var errMismatchedSigningMethod = errors.New("invalid signing method") - func (j *jwtTokenAuthenticator) AuthenticateToken(tokenData string) (user.Info, bool, error) { if !j.hasCorrectIssuer(tokenData) { return nil, false, nil
Clean unused error type variable The function which invoked this variable was removed by <URL>
diff --git a/aws/resource_aws_instance_test.go b/aws/resource_aws_instance_test.go index <HASH>..<HASH> 100644 --- a/aws/resource_aws_instance_test.go +++ b/aws/resource_aws_instance_test.go @@ -47,7 +47,7 @@ func testSweepInstances(region string) error { } conn := client.(*AWSClient).ec2conn - err = conn.DescribeInstancesPages(&ec2.DescribeInstancesInput{}, func(page *ec2.DescribeInstancesOutput, isLast bool) bool { + err = conn.DescribeInstancesPages(&ec2.DescribeInstancesInput{}, func(page *ec2.DescribeInstancesOutput, lastPage bool) bool { if len(page.Reservations) == 0 { log.Print("[DEBUG] No EC2 Instances to sweep") return false @@ -87,7 +87,7 @@ func testSweepInstances(region string) error { } } } - return !isLast + return !lastPage }) if err != nil { if testSweepSkipSweepError(err) {
tests/r/instance: Use consistent var name
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ long_description = '\n\n'.join([read('README'), __doc__ = long_description -requirements = ['stringparser', 'pyvisa>=1.7', 'pyyaml'] +requirements = ['stringparser', 'pyvisa>=1.8', 'pyyaml'] setup(name='PyVISA-sim', description='Simulated backend for PyVISA implementing TCPIP, GPIB, RS232, and USB resources',
Updated requirements to PyVISA>=<I>
diff --git a/ring.go b/ring.go index <HASH>..<HASH> 100644 --- a/ring.go +++ b/ring.go @@ -121,6 +121,7 @@ func (opt *RingOptions) clientOptions() *Options { OnConnect: opt.OnConnect, DB: opt.DB, + Password: opt.Password, DialTimeout: opt.DialTimeout, ReadTimeout: opt.ReadTimeout,
Re-added password support for AUTH purposes
diff --git a/app_test.go b/app_test.go index <HASH>..<HASH> 100644 --- a/app_test.go +++ b/app_test.go @@ -111,8 +111,8 @@ var _ = Describe("Companies", func() { cfg2 := &gogadgets.Config{ Master: false, Host: "localhost", - SubPort: port + 1, - PubPort: port, + SubPort: port, + PubPort: port + 1, } a := gogadgets.NewApp(cfg) diff --git a/zmq.go b/zmq.go index <HASH>..<HASH> 100644 --- a/zmq.go +++ b/zmq.go @@ -67,8 +67,8 @@ func NewClientSockets(cfg SocketsConfig) (*Sockets, error) { master: false, id: newUUID(), host: cfg.Host, - subPort: cfg.PubPort, - pubPort: cfg.SubPort, + subPort: cfg.SubPort, + pubPort: cfg.PubPort, } return s, nil }
trying to get zmq ports right
diff --git a/middleware/match.js b/middleware/match.js index <HASH>..<HASH> 100644 --- a/middleware/match.js +++ b/middleware/match.js @@ -1,11 +1,14 @@ var metaRouter = require('../'); var DataHolder = require('raptor-async/DataHolder'); +var nodePath = require('path'); module.exports = function match(routes) { var matcher; var matcherDataHolder; if (typeof routes === 'string') { + routes = nodePath.resolve(process.cwd(), routes); + matcherDataHolder = new DataHolder(); metaRouter.routesLoader.load(routes, function(err, routes) { if (err) {
Resolve all paths to CWD
diff --git a/DrdPlus/Tables/Armaments/Armourer.php b/DrdPlus/Tables/Armaments/Armourer.php index <HASH>..<HASH> 100644 --- a/DrdPlus/Tables/Armaments/Armourer.php +++ b/DrdPlus/Tables/Armaments/Armourer.php @@ -118,6 +118,21 @@ class Armourer extends StrictObject * @param ArmorCode $armorCode * @param int $bodySize * @param int $currentStrength + * @return bool + * @throws \Granam\Integer\Tools\Exceptions\WrongParameterType + * @throws \Granam\Integer\Tools\Exceptions\ValueLostOnCast + */ + public function canUseArmor(ArmorCode $armorCode, $bodySize, $currentStrength) + { + $missingStrength = $this->getMissingStrengthForArmor($armorCode, $bodySize, $currentStrength); + + return $this->tables->getArmorSanctionsTable()->canMove($missingStrength); + } + + /** + * @param ArmorCode $armorCode + * @param int $bodySize + * @param int $currentStrength * @return int * @throws CanNotUseArmorBecauseOfMissingStrength * @throws \Granam\Integer\Tools\Exceptions\WrongParameterType
Armourer can tell if armor can be used
diff --git a/client/html/src/Client/Html/Catalog/Count/Tree/Standard.php b/client/html/src/Client/Html/Catalog/Count/Tree/Standard.php index <HASH>..<HASH> 100644 --- a/client/html/src/Client/Html/Catalog/Count/Tree/Standard.php +++ b/client/html/src/Client/Html/Catalog/Count/Tree/Standard.php @@ -254,7 +254,7 @@ class Standard $view->treeCountList = $cntl->aggregate( 'index.catalog.id' ); if( $level === \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE ) { - $view->treeCountList = $this->counts( $this->traverse( $tree, $view->treeCountList ) ); + $view->treeCountList = $this->counts( $this->traverse( $tree, $view->treeCountList->toArray() ) ); } }
Adapt to changed aggregate() method signature
diff --git a/schema.go b/schema.go index <HASH>..<HASH> 100644 --- a/schema.go +++ b/schema.go @@ -158,6 +158,12 @@ func (s *Schema) applyParentSchema() { v.applyParentSchema() } + if props := s.AdditionalProperties; props != nil { + if sc := props.Schema; sc != nil { + sc.setParent(s) + sc.applyParentSchema() + } + } if items := s.AdditionalItems; items != nil { if sc := items.Schema; sc != nil { sc.setParent(s) @@ -1031,7 +1037,14 @@ func validate(rv reflect.Value, def *Schema) (err error) { } func (s Schema) Scope() string { + if pdebug.Enabled { + g := pdebug.IPrintf("START Schema.Scope") + defer g.IRelease("END Schema.Scope") + } if s.id != "" || s.parent == nil { + if pdebug.Enabled { + pdebug.Printf("Returning id '%s'", s.id) + } return s.id }
Don't forget to apply parent to AdditionalProperties
diff --git a/lib/less/parser.js b/lib/less/parser.js index <HASH>..<HASH> 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -1068,7 +1068,7 @@ less.Parser = function Parser(env) { save(); if (env.dumpLineNumbers) { - sourceLineNumber = getLocation(i, input).line; + sourceLineNumber = getLocation(i, input).line + 1; sourceFileName = getFileName(env); }
getLocation() seems to return lines starting at 0, therefore we have to add 1. This fixes the off-by-one bug, and is consistent with what is done at line <I> in 'parser.js'.
diff --git a/html/pfappserver/root/static.alt/src/utils/network.js b/html/pfappserver/root/static.alt/src/utils/network.js index <HASH>..<HASH> 100644 --- a/html/pfappserver/root/static.alt/src/utils/network.js +++ b/html/pfappserver/root/static.alt/src/utils/network.js @@ -42,14 +42,9 @@ const network = { return subnet.join('.') }, ipv4Sort (a, b) { - if (!!a && !b) - return 1 - else if (!a && !!b) - return -1 - else if (!a && !b) - return 0 - const aa = a.split(".") - const bb = b.split(".") + if (!!a && !b) { return 1 } else if (!a && !!b) { return -1 } else if (!a && !b) { return 0 } + const aa = a.split('.') + const bb = b.split('.') var resulta = aa[0] * 0x1000000 + aa[1] * 0x10000 + aa[2] * 0x100 + aa[3] * 1 var resultb = bb[0] * 0x1000000 + bb[1] * 0x10000 + bb[2] * 0x100 + bb[3] * 1 return (resulta === resultb) ? 0 : ((resulta > resultb) ? 1 : -1)
(web admin) Improve formatting of network.js
diff --git a/library/Public.php b/library/Public.php index <HASH>..<HASH> 100644 --- a/library/Public.php +++ b/library/Public.php @@ -172,3 +172,25 @@ if (!function_exists('municipio_get_author_full_name')) { return get_user_meta($author, 'nicename', true); } } + +if (!function_exists('municipio_post_taxonomies_to_display')) { + /** + * Gets "public" (set via theme options) taxonomies and terms for a specific post + * @param int $postId The id of the post + * @return array Taxs and terms + */ + function municipio_post_taxonomies_to_display(int $postId) : array + { + $taxonomies = array(); + $post = get_post($postId); + $taxonomiesToShow = get_field('archive_' . sanitize_title($post->post_type) . '_post_taxonomy_display', 'option'); + + foreach ($taxonomiesToShow as $taxonomy) { + $taxonomies[$taxonomy] = wp_get_post_terms($postId, $taxonomy); + } + + $taxonomies = array_filter($taxonomies); + + return $taxonomies; + } +}
Public function to get "public" taxs and terms for a post
diff --git a/sendgrid-ruby.gemspec b/sendgrid-ruby.gemspec index <HASH>..<HASH> 100644 --- a/sendgrid-ruby.gemspec +++ b/sendgrid-ruby.gemspec @@ -28,4 +28,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop' spec.add_development_dependency 'minitest', '~> 5.9' spec.add_development_dependency 'rack' + spec.add_development_dependency 'simplecov' end 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,3 +1,5 @@ +require 'simplecov' +SimpleCov.start require 'rubygems' require 'bundler/setup' require 'pry' diff --git a/test/sendgrid/test_sendgrid-ruby.rb b/test/sendgrid/test_sendgrid-ruby.rb index <HASH>..<HASH> 100644 --- a/test/sendgrid/test_sendgrid-ruby.rb +++ b/test/sendgrid/test_sendgrid-ruby.rb @@ -1,3 +1,5 @@ +require 'simplecov' +SimpleCov.start require_relative '../../lib/sendgrid-ruby.rb' require 'ruby_http_client' require 'minitest/autorun'
test: add Simplecov Local Enhancements (#<I>) As a contributor, I'd like to know what baseline code coverage is and how my enhancements affect it. It was actually fairly difficult to find a good location to insert the SimpleCov.start and keep the results consistent. But after several hours, the final state of this PR seems to be the best. No documentation was updated because code coverage is now part of the default rake run, with no further action required.
diff --git a/tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java b/tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java index <HASH>..<HASH> 100644 --- a/tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java +++ b/tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java @@ -711,6 +711,8 @@ public class OConsoleDatabaseApp extends OrientConsole implements OCommandOutput out.println(); out.println("Class................: " + cls); + if (cls.getShortName() != null) + out.println("Alias................: " + cls.getShortName()); if (cls.getSuperClass() != null) out.println("Super class..........: " + cls.getSuperClass()); out.println("Default cluster......: " + currentDatabase.getClusterNameById(cls.getDefaultClusterId()) + " (id="
Concole: printed class short name as "alias" in command "info class"
diff --git a/ananas/ananas.py b/ananas/ananas.py index <HASH>..<HASH> 100644 --- a/ananas/ananas.py +++ b/ananas/ananas.py @@ -208,7 +208,8 @@ class PineappleBot(StreamListener): self._bot.log("config", "Section {} not in {}, aborting.".format(self._name, self._filename)) return False self._bot.log("config", "Loading configuration from {}".format(self._filename)) - self.update(self._cfg["DEFAULT"]) + if "DEFAULT" in self._cfg.sections: + self.update(self._cfg["DEFAULT"]) self.update(self._cfg[self._name]) return True
Allow DEFAULT section to be absent
diff --git a/salt/modules/file.py b/salt/modules/file.py index <HASH>..<HASH> 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -3319,7 +3319,11 @@ def makedirs_(path, ''' # walk up the directory structure until we find the first existing # directory - dirname = os.path.abspath(path) + path = path.rstrip() + trailing_slash = path.endswith('/') + if not trailing_slash: + path = path + '/' + dirname = os.path.normpath(os.path.dirname(path)) if os.path.isdir(dirname): # There's nothing for us to do
Appending trailing slash if not present
diff --git a/eventsourcing/__init__.py b/eventsourcing/__init__.py index <HASH>..<HASH> 100644 --- a/eventsourcing/__init__.py +++ b/eventsourcing/__init__.py @@ -1 +1 @@ -__version__ = "7.2.4dev0" +__version__ = "7.2.4rc0"
Increased version number to <I>rc0.
diff --git a/numerapi/numerapi.py b/numerapi/numerapi.py index <HASH>..<HASH> 100644 --- a/numerapi/numerapi.py +++ b/numerapi/numerapi.py @@ -91,6 +91,7 @@ class NumerAPI(object): return (None, r.status_code) rj = r.json() + print rj results = rj['submissions']['results'] scores = np.zeros(len(results)) for i in range(len(results)): @@ -109,8 +110,8 @@ class NumerAPI(object): sid = user['submission_id'] val_logloss = np.float(user['logloss']['validation']) val_consistency = np.float(user['logloss']['consistency']) - career_usd = np.float(user['earnings']['career']['usd']) - career_nmr = np.float(user['earnings']['career']['nmr']) + career_usd = np.float(user['earnings']['career']['usd'].replace(',','')) + career_nmr = np.float(user['earnings']['career']['nmr'].replace(',','')) concordant = user['concordant'] original = user['original'] return (uname, sid, val_logloss, val_consistency, original, concordant, career_usd, career_nmr, status_code)
strip comma from career earnings strings.
diff --git a/src/toil/jobStores/aws/utils.py b/src/toil/jobStores/aws/utils.py index <HASH>..<HASH> 100644 --- a/src/toil/jobStores/aws/utils.py +++ b/src/toil/jobStores/aws/utils.py @@ -346,7 +346,7 @@ def connection_reset(e): def sdb_unavailable(e): - return isinstance(e, BotoServerError) and e.status == 503 + return isinstance(e, BotoServerError) and e.status in (500, 503) def no_such_sdb_domain(e):
Add <I> status to the list of retriable SDB BotoServerErrors. (#<I>)
diff --git a/lib/node/attributes.rb b/lib/node/attributes.rb index <HASH>..<HASH> 100644 --- a/lib/node/attributes.rb +++ b/lib/node/attributes.rb @@ -42,7 +42,7 @@ module Bcome::Node::Attributes instance_data = instance_variable_defined?(instance_var_name) ? instance_variable_get(instance_var_name) : {} instance_data = {} unless instance_data if parent.instance_variable_defined?(instance_var_name) - parent_intance_data = parent.send(parent_key) + parent_instance_data = parent.send(parent_key) else parent_instance_data = {} end
Fixed bug in recursing network data
diff --git a/packages/modal/src/presenters/ModalPresenter.js b/packages/modal/src/presenters/ModalPresenter.js index <HASH>..<HASH> 100644 --- a/packages/modal/src/presenters/ModalPresenter.js +++ b/packages/modal/src/presenters/ModalPresenter.js @@ -7,6 +7,11 @@ import { types } from "../types"; import "./ModalPresenter.scss"; export default class ModalPresenter extends Component { + static modifiersByType = { + [types.STANDARD]: "hig__modal-V1__window--standard", + [types.ALTERNATE]: "hig__modal-V1__window--alternate" + }; + static propTypes = { /** * Supports adding any dom content to the body of the modal @@ -68,10 +73,10 @@ export default class ModalPresenter extends Component { type } = this.props; - const windowClasses = cx([ + const windowClasses = cx( "hig__modal-V1__window", - `hig__modal-V1__window--${type}` - ]); + ModalPresenter.modifiersByType[type] + ); const wrapperClasses = cx([ "hig__modal-V1",
refactor: Use dictionary for variant style modifiers
diff --git a/src/Rendering/Name/Name.php b/src/Rendering/Name/Name.php index <HASH>..<HASH> 100644 --- a/src/Rendering/Name/Name.php +++ b/src/Rendering/Name/Name.php @@ -584,7 +584,7 @@ class Name implements HasParent $text = !empty($given) ? $given . " " . $family : $family; } } else { - $text = $this->form === "long" ? $data->family.$data->given : $data->family; + $text = $this->form === "long" ? $data->family . " " . $data->given : $data->family; } return $text;
fix issues with no whitespace between given and family names of authors and editors
diff --git a/tests/TestServer/PhpUnitStartServerListener.php b/tests/TestServer/PhpUnitStartServerListener.php index <HASH>..<HASH> 100644 --- a/tests/TestServer/PhpUnitStartServerListener.php +++ b/tests/TestServer/PhpUnitStartServerListener.php @@ -46,28 +46,19 @@ final class PhpUnitStartServerListener implements TestListener */ public function startTestSuite(TestSuite $suite): void { - if ($suite->getName() !== $this->suiteName) { - return; - } - - $process = new Process( - [ - 'php', - '-S', - $this->socket, - $this->documentRoot - ] - ); - $process->start(); + if ($suite->getName() === $this->suiteName) { + $process = new Process( + [ + 'php', + '-S', + $this->socket, + $this->documentRoot + ] + ); + $process->start(); - $process->waitUntil( - function (string $type, string $output) { - if ($type === Process::ERR) { - throw new \RuntimeException($output); - } - - return true; - } - ); + // Wait for the server. + sleep(1); + } } }
Revert Wait for the web server to run in the test This reverts commit <I>a<I>b<I>d3d9f<I>e<I>e<I>f4b<I>bb5c3acd2f. Reason is that the tests at travis ci fail and the change is not so urgent.
diff --git a/saltapi/netapi/rest_cherrypy/app.py b/saltapi/netapi/rest_cherrypy/app.py index <HASH>..<HASH> 100644 --- a/saltapi/netapi/rest_cherrypy/app.py +++ b/saltapi/netapi/rest_cherrypy/app.py @@ -1414,10 +1414,10 @@ class API(object): 'tools.trailing_slash.on': True, 'tools.gzip.on': True, + 'tools.cpstats.on': self.apiopts.get('collect_stats', False), }, '/stats': { 'request.dispatch': cherrypy.dispatch.Dispatcher(), - 'tools.cpstats.on': self.apiopts.get('collect_stats', False), }, }
tools.cpstats.on needs to be placed under root