diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/riak/client/__init__.py b/riak/client/__init__.py index <HASH>..<HASH> 100644 --- a/riak/client/__init__.py +++ b/riak/client/__init__.py @@ -296,11 +296,9 @@ class RiakClient(RiakMapReduceChain, RiakClientOperations): Iterate through all of the connections and close each one. """ if self._http_pool is not None: - for item in self._http_pool: - self._http_pool.delete_element(item) + self._http_pool.clear() if self._pb_pool is not None: - for item in self._pb_pool: - self._pb_pool.delete_element(item) + self._pb_pool.clear() def _create_node(self, n): if isinstance(n, RiakNode):
Use built-in pool clear() method instead of explicitly iterating on client close()
diff --git a/src/Admin/Appearance/Widgets.php b/src/Admin/Appearance/Widgets.php index <HASH>..<HASH> 100644 --- a/src/Admin/Appearance/Widgets.php +++ b/src/Admin/Appearance/Widgets.php @@ -165,9 +165,11 @@ class Widgets add_filter('use_widgets_block_editor', '__return_false'); } - if ($GLOBALS['pagenow'] === 'widgets.php') { - BlockEditor::set($this->editor); - } + add_action('admin_init', function (){ + if ($GLOBALS['pagenow'] === 'widgets.php') { + BlockEditor::set($this->editor); + } + }); } /**
Fix warning ErrorException (E_WARNING) Cannot modify header information - headers already sent by (output started at [...]web/app/mu-plugins/intervention/src/Admin/Appearance/Widgets.php:<I>)
diff --git a/pusher/notification_client.py b/pusher/notification_client.py index <HASH>..<HASH> 100644 --- a/pusher/notification_client.py +++ b/pusher/notification_client.py @@ -20,7 +20,7 @@ GCM_TTL = 241920 class NotificationClient(Client): def __init__( self, app_id, key, secret, ssl=True, host=None, port=None, - timeout=5, cluster=None, json_encoder=None, json_decoder=None, + timeout=30, cluster=None, json_encoder=None, json_decoder=None, backend=None, **backend_options): super(NotificationClient, self).__init__( app_id, key, secret, ssl, host, port, timeout, cluster,
bump notification_client timeout to <I>s
diff --git a/src/FlexiPeeHP/FlexiBeeRO.php b/src/FlexiPeeHP/FlexiBeeRO.php index <HASH>..<HASH> 100644 --- a/src/FlexiPeeHP/FlexiBeeRO.php +++ b/src/FlexiPeeHP/FlexiBeeRO.php @@ -291,7 +291,8 @@ class FlexiBeeRO extends \Ease\Brick /** * SetUp Object to be ready for connect * - * @param array $options Object Options + * @param array $options Object Options (company,url,user,password,evidence, + * prefix,debug) */ public function setUp($options = []) { @@ -329,6 +330,9 @@ class FlexiBeeRO extends \Ease\Brick if (isset($options['prefix'])) { $this->setPrefix($options['prefix']); } + if (isset($options['debug'])) { + $this->debug = $options['debug']; + } } /**
Debug Added to FlexiBeeRO class accepted options
diff --git a/src/components/MultiSelect/FilterableMultiSelect.js b/src/components/MultiSelect/FilterableMultiSelect.js index <HASH>..<HASH> 100644 --- a/src/components/MultiSelect/FilterableMultiSelect.js +++ b/src/components/MultiSelect/FilterableMultiSelect.js @@ -86,6 +86,11 @@ export default class FilterableMultiSelect extends React.Component { * Initialize the component with an open(`true`)/closed(`false`) menu. */ open: PropTypes.bool, + + /** + * Callback function for translating ListBoxMenuIcon SVG title + */ + translateWithId: PropTypes.func, }; static getDerivedStateFromProps({ open }, state) { @@ -221,6 +226,7 @@ export default class FilterableMultiSelect extends React.Component { light, invalid, invalidText, + translateWithId, } = this.props; const className = cx( `${prefix}--multi-select`, @@ -281,7 +287,10 @@ export default class FilterableMultiSelect extends React.Component { {inputValue && isOpen && ( <ListBox.Selection clearSelection={this.clearInputValue} /> )} - <ListBox.MenuIcon isOpen={isOpen} /> + <ListBox.MenuIcon + isOpen={isOpen} + translateWithId={translateWithId} + /> </ListBox.Field> {isOpen && ( <ListBox.Menu>
fix(multi-select): introduce translateWithId (#<I>) Fixes #<I>.
diff --git a/src/parse.js b/src/parse.js index <HASH>..<HASH> 100644 --- a/src/parse.js +++ b/src/parse.js @@ -81,6 +81,7 @@ Parse.register('group', require('./transformers/group')); Parse.register('spec', require('./transformers/spec')); Parse.register('date', require('./transformers/date')); Parse.register('bool', require('./transformers/bool')); +Parse.register('number', require('./transformers/number')); Parse.register('base64', require('./transformers/base64')); Parse.register('multilingual', require('./transformers/multilingual')); Parse.register('stripPrefix', require('./transformers/stripPrefix'));
[number] Enable NumberTransformer
diff --git a/src/Taxonomy.php b/src/Taxonomy.php index <HASH>..<HASH> 100644 --- a/src/Taxonomy.php +++ b/src/Taxonomy.php @@ -76,12 +76,12 @@ class Taxonomy { /** * Create a new term in a specific vocabulary * - * @param string $name - * The name of the term - * * @param int $vid * The Vocabulary ID in which to add the term * + * @param string $name + * The name of the term + * * @param int $parent * The ID of the parent term if it is a child * @@ -93,8 +93,8 @@ class Taxonomy { * * @thrown Illuminate\Database\Eloquent\ModelNotFoundException */ - public function createTerm($name, $vid, $parent = 0, $weight = 0) { - if ($vocabulary = $this->vocabulary->findOrFail($id);) { + public function createTerm($vid, $name, $parent = 0, $weight = 0) { + if ($vocabulary = $this->vocabulary->findOrFail($id)) { $term = [ 'name' => $name, 'vocabulary_id' => $vid,
Removed trailing ; in if
diff --git a/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java b/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java index <HASH>..<HASH> 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java +++ b/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java @@ -148,7 +148,7 @@ public enum OGlobalConfiguration { // ENVIRONMENT "memory.directMemory.preallocate", "Preallocate amount of direct memory which is needed for the disk cache", Boolean.class, - true), + false), DIRECT_MEMORY_TRACK_MODE( "memory.directMemory.trackMode",
chore: disabled memory pre-allocation
diff --git a/client/state/jetpack-connect/actions.js b/client/state/jetpack-connect/actions.js index <HASH>..<HASH> 100644 --- a/client/state/jetpack-connect/actions.js +++ b/client/state/jetpack-connect/actions.js @@ -378,6 +378,11 @@ export function isUserConnected( siteId, siteIsOnSitesList ) { } } ) .catch( error => { + dispatch( + recordTracksEvent( 'calypso_jpc_siterequest_failure', { + error: error, + } ) + ); dispatch( { type: SITE_REQUEST_FAILURE, siteId,
Jetpack Connect: Add tracks to site request failure (#<I>)
diff --git a/packages/neos-ui/src/Containers/Modals/SelectNodeType/index.js b/packages/neos-ui/src/Containers/Modals/SelectNodeType/index.js index <HASH>..<HASH> 100644 --- a/packages/neos-ui/src/Containers/Modals/SelectNodeType/index.js +++ b/packages/neos-ui/src/Containers/Modals/SelectNodeType/index.js @@ -195,7 +195,7 @@ export default class SelectNodeType extends PureComponent { return ( <Dialog actions={[this.renderCancelAction()]} - title={[this.renderSelectNodeTypeDialogHeader()]} + title={this.renderSelectNodeTypeDialogHeader()} onRequestClose={this.handleCancel} isOpen style="wide"
Bugfix don't pass the create dialog title as array
diff --git a/haproxy_exporter.go b/haproxy_exporter.go index <HASH>..<HASH> 100644 --- a/haproxy_exporter.go +++ b/haproxy_exporter.go @@ -382,7 +382,7 @@ func (e *Exporter) scrape(ch chan<- prometheus.Metric) (up float64) { info, err := e.parseInfo(infoReader) if err != nil { - level.Debug(e.logger).Log("msg", "Faild parsing show info", "err", err) + level.Debug(e.logger).Log("msg", "Failed parsing show info", "err", err) } else { ch <- prometheus.MustNewConstMetric(haproxyInfo, prometheus.GaugeValue, 1, info.ReleaseDate, info.Version) }
Correct a typo in haproxy_exporter.go (#<I>)
diff --git a/tests/test_aggregator.py b/tests/test_aggregator.py index <HASH>..<HASH> 100644 --- a/tests/test_aggregator.py +++ b/tests/test_aggregator.py @@ -182,6 +182,6 @@ def test_issue_61(): latex = r'\frac{x + 4}{x + \frac{123 \left(\sqrt{x} + 5\right)}{x + 4} - 8}' expected = [r'\frac', ['x', '+', '4'], ['x', '+', - r'\frac', ['123', [r'\left', '(', [r'\sqrt', ['x'], '+', '5'], r'\right', ')']], ['x', '+', '4'] - , '-', '8']] + r'\frac', ['123', [r'\left', '(', [r'\sqrt', ['x'], '+', '5'], r'\right', ')']], ['x', '+', '4'], + '-', '8']] assert expected == list(aggregate(latex))
Make work for pycodestyle
diff --git a/modules/custom/d_geysir/src/Utility/ModalDetector.php b/modules/custom/d_geysir/src/Utility/ModalDetector.php index <HASH>..<HASH> 100644 --- a/modules/custom/d_geysir/src/Utility/ModalDetector.php +++ b/modules/custom/d_geysir/src/Utility/ModalDetector.php @@ -46,12 +46,21 @@ class ModalDetector implements ModalDetectorInterface { public function isGeysirModalRequest(): bool { try { $controller = $this->resolver->getController($this->request); + $is_modal = ( + // Modal window. + $this->request->query->get('_wrapper_format') === 'drupal_modal' || + ( + // Ajax inside modal window. + $this->request->query->get('_wrapper_format') === 'drupal_ajax' && + $this->request->request->get('_triggering_element_name') !== 'op' + ) + ); if (isset($controller[0])) { - return $controller[0] instanceof GeysirModalController; + return $controller[0] instanceof GeysirModalController && $is_modal; } - return $controller instanceof GeysirModalController; + return $controller instanceof GeysirModalController && $is_modal; } catch (\LogicException $exception) { return FALSE;
Issue #<I> by gpietrzak: (v <I>) Form buttons broken after paragraph save
diff --git a/lib/cli/parse.js b/lib/cli/parse.js index <HASH>..<HASH> 100644 --- a/lib/cli/parse.js +++ b/lib/cli/parse.js @@ -153,13 +153,19 @@ module.exports = function parse(options, callback) { }; function firstErrorDescription(node) { + if (!node.hasError) return null; + if (node.type === 'ERROR') { return "ERROR " + pointString(node.startPosition) + " - " + pointString(node.endPosition); } - const {namedChildren} = node; - for (let i = 0, length = namedChildren.length; i < length; i++) { - const description = firstErrorDescription(namedChildren[i]); + if (node.isMissing()) { + return "MISSING " + node.type + " " + pointString(node.startPosition) + " - " + pointString(node.endPosition); + } + + const {children} = node; + for (let i = 0, length = children.length; i < length; i++) { + const description = firstErrorDescription(children[i]); if (description) return description; } }
Fix first error description when there are missing tokens
diff --git a/library/CM/FormField/Textarea.js b/library/CM/FormField/Textarea.js index <HASH>..<HASH> 100644 --- a/library/CM/FormField/Textarea.js +++ b/library/CM/FormField/Textarea.js @@ -8,6 +8,7 @@ var CM_FormField_Textarea = CM_FormField_Text.extend({ events: { 'blur [contenteditable]': function() { this.trigger('blur'); + this.triggerChange(); }, 'focus [contenteditable]': function() { this.trigger('focus'); @@ -87,6 +88,12 @@ var CM_FormField_Textarea = CM_FormField_Text.extend({ this.setValue(''); }, + disableTriggerChangeOnInput: function() { + this.delegateEvents( + _(this.events).omit('input [contenteditable]') + ); + }, + /** * @param {String} text * @returns {string}
Introduce "disableTriggerChangeOnInput" for Textarea, trigger change on "blur" event
diff --git a/spec/helpers/fortitude_rails_helpers.rb b/spec/helpers/fortitude_rails_helpers.rb index <HASH>..<HASH> 100644 --- a/spec/helpers/fortitude_rails_helpers.rb +++ b/spec/helpers/fortitude_rails_helpers.rb @@ -9,7 +9,6 @@ module Spec out = [ "gem 'fortitude', :path => '#{rails_server_project_root}'" ] - out << "gem 'i18n', '< 0.7.0'" if RUBY_VERSION =~ /^1\.8\./ out end
Try not spec'ing any i<I>n gem version at all on the server itself.
diff --git a/mithril.js b/mithril.js index <HASH>..<HASH> 100644 --- a/mithril.js +++ b/mithril.js @@ -553,10 +553,11 @@ var m = (function app(window, undefined) { //routing var modes = {pathname: "", hash: "#", search: "?"}; - var redirect = function() {}, routeParams = {}, currentRoute; + var redirect = function() {}, routeParams, currentRoute; m.route = function() { //m.route() if (arguments.length === 0) return currentRoute; + //m.route(el, defaultRoute, routes) else if (arguments.length === 3 && type.call(arguments[1]) == STRING) { var root = arguments[0], defaultRoute = arguments[1], router = arguments[2]; redirect = function(source) { @@ -606,7 +607,10 @@ var m = (function app(window, undefined) { else $location[m.route.mode] = currentRoute } }; - m.route.param = function(key) {return routeParams[key]}; + m.route.param = function(key) { + if (!routeParams) throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()") + return routeParams[key] + }; m.route.mode = "search"; function normalizeRoute(route) {return route.slice(modes[m.route.mode].length)} function routeByValue(root, router, path) {
show error message if m.route.param is called before m.route(el, defRoute, routes)
diff --git a/src/Synapse/Mapper/AbstractMapper.php b/src/Synapse/Mapper/AbstractMapper.php index <HASH>..<HASH> 100644 --- a/src/Synapse/Mapper/AbstractMapper.php +++ b/src/Synapse/Mapper/AbstractMapper.php @@ -158,17 +158,20 @@ abstract class AbstractMapper implements LoggerAwareInterface return $this; } + /** + * Set up the hydrator and prototype of this mapper if not yet set + */ protected function initialize() { if ($this->initialized) { return; } - if (!is_object($this->prototype)) { + if (! is_object($this->prototype)) { $this->prototype = new ArrayObject; } - if (!$this->hydrator instanceof HydratorInterface) { + if (! $this->hydrator instanceof HydratorInterface) { $this->hydrator = new ArraySerializable; } @@ -221,6 +224,12 @@ abstract class AbstractMapper implements LoggerAwareInterface return new EntityIterator($entities); } + /** + * Execute the given query and return the result as an array of arrays + * + * @param PreparableSqlInterface $query Query to be executed + * @return array + */ protected function executeAndGetResultsAsArray(PreparableSqlInterface $query) { $statement = $this->getSqlObject()->prepareStatementForSqlObject($query);
Refs #<I> - Add missing DocBlocks and fix coding standards.
diff --git a/Command/DebugRouterCommand.php b/Command/DebugRouterCommand.php index <HASH>..<HASH> 100644 --- a/Command/DebugRouterCommand.php +++ b/Command/DebugRouterCommand.php @@ -8,6 +8,8 @@ use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\HttpKernel\Kernel; + class DebugRouterCommand extends Command { @@ -50,7 +52,14 @@ class DebugRouterCommand extends Command $router = $this->routers[$rname]; $collection = $router->getCollection(); - $table = new Table($output); + + $version = Kernel::VERSION_ID; + if ($version < 30000) { + $table = $this->getHelperSet()->get('table'); + } else { + $table = new Table($output); + } + $table->setHeaders(['Name', 'Pattern', 'Callback']); $rows = [];
Update DebugRouterCommand.php I get VERSION_ID from Kernel, hope this is a right way.
diff --git a/bin/fasta-subset.py b/bin/fasta-subset.py index <HASH>..<HASH> 100755 --- a/bin/fasta-subset.py +++ b/bin/fasta-subset.py @@ -1,7 +1,7 @@ #!/usr/bin/env python """ -Given a set of FASTA sequence identifiers from sys.argv or in a file, read +Given a set of FASTA sequence identifiers from sys.argv and/or in a file, read FASTA from stdin, and print FASTA to stdout for the given sequence ids. """
Tiny change to docstring.
diff --git a/src/Component/Filter/StringFilter.php b/src/Component/Filter/StringFilter.php index <HASH>..<HASH> 100644 --- a/src/Component/Filter/StringFilter.php +++ b/src/Component/Filter/StringFilter.php @@ -53,18 +53,17 @@ class StringFilter implements FilterInterface } if (1 === count($fields)) { - $expression = $this->getExpression($expressionBuilder, $type, $fields[0], $value); - } else { - $expressions = []; + $dataSource->restrict($this->getExpression($expressionBuilder, $type, current($fields), $value)); - foreach ($fields as $field) { - $expressions[] = $this->getExpression($expressionBuilder, $type, $field, $value); - } + return; + } - $expression = $expressionBuilder->orX(...$expressions); + $expressions = []; + foreach ($fields as $field) { + $expressions[] = $this->getExpression($expressionBuilder, $type, $field, $value); } - $dataSource->restrict($expression); + $dataSource->restrict($expressionBuilder->orX(...$expressions)); } /**
[Grid] Decrease nesting level in StringFilter
diff --git a/errors.go b/errors.go index <HASH>..<HASH> 100644 --- a/errors.go +++ b/errors.go @@ -14,6 +14,10 @@ type Error struct { } func (e Error) Error() string { + if e.Type == "genericError" { + return e.Message + } + return fmt.Sprintf("kite error %s - %s - %s", e.Type, e.Message, e.Code) }
kite/errors: return user errors as it is
diff --git a/restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/telephony/DialRecordingTest.java b/restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/telephony/DialRecordingTest.java index <HASH>..<HASH> 100644 --- a/restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/telephony/DialRecordingTest.java +++ b/restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/telephony/DialRecordingTest.java @@ -190,7 +190,7 @@ public class DialRecordingTest { } Thread.sleep(1000); wireMockRule.resetRequests(); - wireMockRule.resetMappings(); + //do not use this as it requires Java8 wireMockRule.resetMappings(); Thread.sleep(4000); }
removed resetMappings as it requires java8
diff --git a/txkoji/task.py b/txkoji/task.py index <HASH>..<HASH> 100644 --- a/txkoji/task.py +++ b/txkoji/task.py @@ -163,7 +163,7 @@ class Task(Munch): return self.params[0] # params[0] is the source URL for these tasks: if self.method not in ('build', 'buildArch', 'buildContainer', - 'buildMaven', 'buildSRPMFromSCM'): + 'buildMaven', 'buildSRPMFromSCM', 'maven'): return None # (I wish there was a better way to do this.) source = self.params[0] @@ -225,7 +225,7 @@ class Task(Munch): @property def target(self): - if self.method in ('build', 'buildContainer'): + if self.method in ('build', 'buildContainer', 'maven'): return self.params[1] if self.method == 'buildNotification': if self.params[2]:
task: add .target and .package support for maven tasks Populate .target and .package for maven tasks
diff --git a/apiserver/facades/client/applicationoffers/state.go b/apiserver/facades/client/applicationoffers/state.go index <HASH>..<HASH> 100644 --- a/apiserver/facades/client/applicationoffers/state.go +++ b/apiserver/facades/client/applicationoffers/state.go @@ -62,7 +62,6 @@ type Backend interface { OfferConnections(string) ([]OfferConnection, error) SpaceByName(string) (Space, error) User(names.UserTag) (User, error) - UserPermission(subject names.UserTag, target names.Tag) (permission.Access, error) CreateOfferAccess(offer names.ApplicationOfferTag, user names.UserTag, access permission.Access) error UpdateOfferAccess(offer names.ApplicationOfferTag, user names.UserTag, access permission.Access) error
Remove the duplicated function The function UserPermission was duplicated in both commoncrossmodel.Backend and Backend, which emits a warning. Static analysis should have picked this up, but for some reason it hasn't. This fixes the issue, but we need to work out why it wasn't caught.
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,9 +16,9 @@ import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath(os.path.join('..', '..'))) sys.path.insert(0, os.path.abspath('..')) +import pulsar # -- General configuration ----------------------------------------------------- @@ -50,9 +50,9 @@ copyright = u'2014, Galaxy Project' # built documents. # # The short X.Y version. -version = '0.2.0' +version = pulsar.__version__ # The full version, including alpha/beta/rc tags. -release = '0.2.0' +release = pulsar.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.
Dynamically set pulsar version from docs.
diff --git a/tests/Symfony/Tests/Component/Form/AbstractDivLayoutTest.php b/tests/Symfony/Tests/Component/Form/AbstractDivLayoutTest.php index <HASH>..<HASH> 100644 --- a/tests/Symfony/Tests/Component/Form/AbstractDivLayoutTest.php +++ b/tests/Symfony/Tests/Component/Form/AbstractDivLayoutTest.php @@ -409,20 +409,4 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest ' ); } - - public function testFileLabelAccessibility() - { - $form = $this->factory->createNamed('file', 'name'); - $html = $this->renderRow($form->createView()); - - $this->assertMatchesXpath($html, -'/div - [ - ./label[@for="name"] - /following-sibling::input[@id="name"][@type="file"] - ] -' - ); - } - }
[Form] Remove a test which is no more relevant (after recent FileType refactoring)
diff --git a/wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/html5/stylesandsemantics/Summary.java b/wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/html5/stylesandsemantics/Summary.java index <HASH>..<HASH> 100644 --- a/wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/html5/stylesandsemantics/Summary.java +++ b/wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/html5/stylesandsemantics/Summary.java @@ -75,6 +75,7 @@ public class Summary extends AbstractHtml { * @since 1.0.0 */ protected void init() { + // to override and use this method } }
Code formatting improvement Added needful comment in empty method body
diff --git a/otsrdflib/ots.py b/otsrdflib/ots.py index <HASH>..<HASH> 100644 --- a/otsrdflib/ots.py +++ b/otsrdflib/ots.py @@ -29,7 +29,7 @@ class OrderedTurtleSerializer(TurtleSerializer): # Instance order: self.sorters = [ - ('.*?([0-9]+)$', lambda x: int(x[0])) + ('.*?/[A-Za-z]+([0-9]+)$', lambda x: int(x[0])) ] # Order of instances:
Fix so default sorter doesn't match uuids
diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index <HASH>..<HASH> 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -9,3 +9,23 @@ docker = '{{ cookiecutter.use_docker }}'.lower() if elasticbeanstalk == 'y' and (heroku == 'y' or docker == 'y'): raise Exception("Cookiecutter Django's EXPERIMENTAL Elastic Beanstalk support is incompatible with Heroku and Docker setups.") + +if docker == 'n': + import sys + + python_major_version = sys.version_info[0] + + if python_major_version == 2: + sys.stdout.write("WARNING: Cookiecutter Django does not support Python 2! Stability is guaranteed with Python 3.4+ only. Are you sure you want to proceed? (y/n)") + + yes_options = set(['y']) + no_options = set(['n', '']) + choice = raw_input().lower() + if choice in no_options: + sys.exit(1) + elif choice in yes_options: + pass + else: + sys.stdout.write("Please respond with %s or %s" + % (', '.join([o for o in yes_options if not o == '']) + , ', '.join([o for o in no_options if not o == ''])))
Add a pre-hook that checks the python version (#<I>) Closes #<I>
diff --git a/lib/sass/plugin.rb b/lib/sass/plugin.rb index <HASH>..<HASH> 100644 --- a/lib/sass/plugin.rb +++ b/lib/sass/plugin.rb @@ -75,7 +75,7 @@ module Sass template_location_array.each do |template_location, css_location| - Dir.glob(File.join(template_location, "**", "*.s[ca]ss")).each do |file| + Dir.glob(File.join(template_location, "**", "*.s[ca]ss")).sort.each do |file| # Get the relative path to the file name = file.sub(template_location.sub(/\/*$/, '/'), "") css = css_filename(name, css_location)
[Sass] Sort files for consistent compilation order.
diff --git a/lib/dm-core/resource.rb b/lib/dm-core/resource.rb index <HASH>..<HASH> 100644 --- a/lib/dm-core/resource.rb +++ b/lib/dm-core/resource.rb @@ -299,9 +299,11 @@ module DataMapper # true if resource and storage state match # # @api public - def update(attributes = {}) - self.attributes = attributes - _update + chainable do + def update(attributes = {}) + self.attributes = attributes + _update + end end ## @@ -379,8 +381,10 @@ module DataMapper # true if resource was destroyed # # @api public - def destroy - _destroy + chainable do + def destroy + _destroy + end end ##
Wrap Resource#update in a chainable block to allow overriding in modules
diff --git a/test/util.js b/test/util.js index <HASH>..<HASH> 100644 --- a/test/util.js +++ b/test/util.js @@ -172,7 +172,11 @@ var setupTest = function setupTest(refImageId) { getRefImage(refImageId, function gotRefImage(refImgData) { if (!refImgData && ALLOWNOREF) { - ok(true, 'Skip the test; no reference image and ALLOWNOREF is turned on.'); + ok(true, 'Skip the test with ALLOWNOREF.'); + console.log( + 'Skip the test with ALLOWNOREF. Please manually confirm \n' + + 'the test result of "' + currentTestDetails.name + '"'); + console.log(canvas.toDataURL()); start();
Print data URL if there is no reference image
diff --git a/lib/loaders/base_js.js b/lib/loaders/base_js.js index <HASH>..<HASH> 100644 --- a/lib/loaders/base_js.js +++ b/lib/loaders/base_js.js @@ -115,6 +115,7 @@ module.exports = class BaseJavascriptModule { async _completeLoading(deviceClass) { if (this._config) this._config.install(deviceClass); + deviceClass.manifest = this._manifest; deviceClass.metadata = makeBaseDeviceMetadata(this._manifest); for (let action in this._manifest.actions) { diff --git a/test/test_v2_device.js b/test/test_v2_device.js index <HASH>..<HASH> 100644 --- a/test/test_v2_device.js +++ b/test/test_v2_device.js @@ -42,7 +42,9 @@ async function testPreloaded() { const factory = await module.getDeviceClass(); + assert.strictEqual(factory, MyDevice); + assert.strictEqual(factory.manifest, metadata); //assert.strictEqual(factory.metadata, metadata); assert.deepStrictEqual(factory.require('package.json'), {"name":"org.thingpedia.test.mydevice", "main": "index.js",
Expose Thingpedia manifests to JS devices Expose it as "deviceClass.manifest" (aka this.constructor.manifest). This allows devices to access their own Thingpedia definition for reflection, and allows writing generic JS packages that can be instantiated with multiple JS classes (e.g. for schema.org). It can be an alternative to a custom loader.
diff --git a/src/graphql_relay/connection/connection.py b/src/graphql_relay/connection/connection.py index <HASH>..<HASH> 100644 --- a/src/graphql_relay/connection/connection.py +++ b/src/graphql_relay/connection/connection.py @@ -106,8 +106,6 @@ def connection_definitions( The nodes of the returned object types will be of the specified type. """ name = name or get_named_type(node_type).name - edge_fields = edge_fields or {} - connection_fields = connection_fields or {} edge_type = GraphQLObjectType( name + "Edge", @@ -123,7 +121,7 @@ def connection_definitions( resolve=resolve_cursor, description="A cursor for use in pagination", ), - **resolve_maybe_thunk(edge_fields), + **resolve_maybe_thunk(edge_fields or {}), }, ) @@ -138,7 +136,7 @@ def connection_definitions( "edges": GraphQLField( GraphQLList(edge_type), description="A list of edges." ), - **resolve_maybe_thunk(connection_fields), + **resolve_maybe_thunk(connection_fields or {}), }, )
Minor simplification Replicates graphql/graphql-relay-js@8b5a9a<I>f<I>fddd8b<I>fe<I>e7fdf<I>
diff --git a/lib/collection.js b/lib/collection.js index <HASH>..<HASH> 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -2039,7 +2039,7 @@ Collection.prototype.mapReduce = function(map, reduce, options, callback) { }; /** - * Initiate a Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order. + * Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order. * * @method * @param {object} [options] Optional settings. @@ -2056,7 +2056,7 @@ Collection.prototype.initializeUnorderedBulkOp = function(options) { }; /** - * Initiate an In order bulk write operation, operations will be serially executed in the order they are added, creating a new operation for each switch in types. + * Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types. * * @method * @param {object} [options] Optional settings.
docs(collection): fix typo & run-on sentence for initializeOrderedBulkOp
diff --git a/View/Helper/QrCodeHelper.php b/View/Helper/QrCodeHelper.php index <HASH>..<HASH> 100644 --- a/View/Helper/QrCodeHelper.php +++ b/View/Helper/QrCodeHelper.php @@ -86,7 +86,7 @@ class QrCodeHelper extends AppHelper { * Note: cannot be url() due to AppHelper conflicts * * @param string $text - * @return string $url + * @return string Url * 2010-02-25 ms */ public function uri($text) { @@ -96,14 +96,8 @@ class QrCodeHelper extends AppHelper { } /** - * @deprecated - * old method - use uri() instead + * @return string Url */ - public function url($url = null, $full = false) { - //trigger_error('use uri() instead', E_DEPRECATED); - return $this->uri($url); - } - protected function _uri($params = array()) { $params = array_merge($this->options, $params); $pieces = array();
remove deprecated method that is not E_STRICT
diff --git a/bugtool/cmd/configuration.go b/bugtool/cmd/configuration.go index <HASH>..<HASH> 100644 --- a/bugtool/cmd/configuration.go +++ b/bugtool/cmd/configuration.go @@ -333,6 +333,7 @@ func copyCiliumInfoCommands(cmdDir string, k8sPods []string) []string { "cilium bpf bandwidth list", "cilium bpf tunnel list", "cilium bpf lb list", + "cilium bpf egress list", "cilium bpf endpoint list", "cilium bpf ct list global", "cilium bpf nat list",
bugtool: Include listing of egress gateway map
diff --git a/aeron-driver/src/main/java/io/aeron/driver/media/UdpChannel.java b/aeron-driver/src/main/java/io/aeron/driver/media/UdpChannel.java index <HASH>..<HASH> 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/media/UdpChannel.java +++ b/aeron-driver/src/main/java/io/aeron/driver/media/UdpChannel.java @@ -31,7 +31,7 @@ import static java.lang.System.lineSeparator; import static java.net.InetAddress.getByAddress; /** - * The media configuration for a Aeron UDP channel as an instantiation of the socket addresses for a {@link ChannelUri}. + * The media configuration for Aeron UDP channels as an instantiation of the socket addresses for a {@link ChannelUri}. * * @see ChannelUri * @see io.aeron.ChannelUriStringBuilder
[Java] Tidy up constants used for media type.
diff --git a/flask_mobility/mobility.py b/flask_mobility/mobility.py index <HASH>..<HASH> 100644 --- a/flask_mobility/mobility.py +++ b/flask_mobility/mobility.py @@ -8,10 +8,9 @@ class Mobility(object): self.app = app if self.app is not None: - self.init_app(self.app) + self.init_app(app) def init_app(self, app): - self.app = app app.config.setdefault("MOBILE_USER_AGENTS", "android|fennec|iemobile|iphone|opera (?:mini|mobi)|mobile") app.config.setdefault("MOBILE_COOKIE", "mobile") @@ -21,10 +20,10 @@ class Mobility(object): def before_request(): ctx = stack.top if ctx is not None and hasattr(ctx, "request"): - self.process_request(ctx.request) + self.process_request(ctx.request, app) - def process_request(self, request): + def process_request(self, request, app): ua = request.user_agent.string.lower() - mc = request.cookies.get(self.app.config.get("MOBILE_COOKIE")) + mc = request.cookies.get(app.config.get("MOBILE_COOKIE")) request.MOBILE = mc == "on" or (mc != "off" and self.USER_AGENTS.search(ua))
Tweaks to get in line with Flask doc recommendations
diff --git a/test/e2e/util.go b/test/e2e/util.go index <HASH>..<HASH> 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -723,13 +723,17 @@ func RunRC(config RCConfig) error { image := config.Image replicas := config.Replicas interval := config.PollInterval - maxContainerFailures := int(math.Max(1.0, float64(replicas)*.01)) current := 0 same := 0 label := labels.SelectorFromSet(labels.Set(map[string]string{"name": name})) podLists := newFifoQueue() + // Default to 10 second polling/check interval + if interval <= 0 { + interval = 10 + } + By(fmt.Sprintf("%v Creating replication controller %s", time.Now(), name)) rc := &api.ReplicationController{ ObjectMeta: api.ObjectMeta{
Default RunRC to check every <I> seconds if an internval isn't provided. #<I>
diff --git a/chevron/renderer.py b/chevron/renderer.py index <HASH>..<HASH> 100644 --- a/chevron/renderer.py +++ b/chevron/renderer.py @@ -292,7 +292,7 @@ def render(template='', data={}, partials_path='.', partials_ext='mustache', padding=padding, def_ldel=def_ldel, def_rdel=def_rdel, scopes=data and [data]+scopes or scopes, - warn=warn)) + warn=warn, keep=keep)) if python3: output += rend @@ -329,7 +329,7 @@ def render(template='', data={}, partials_path='.', partials_ext='mustache', partials_ext=partials_ext, partials_dict=partials_dict, def_ldel=def_ldel, def_rdel=def_rdel, - warn=warn) + warn=warn, keep=keep) if python3: output += rend @@ -364,7 +364,7 @@ def render(template='', data={}, partials_path='.', partials_ext='mustache', partials_dict=partials_dict, def_ldel=def_ldel, def_rdel=def_rdel, padding=part_padding, scopes=scopes, - warn=warn) + warn=warn, keep=keep) # If the partial was indented if left.isspace():
Pass `keep` to recursive calls of `chevron.renderer.render()`
diff --git a/test/test-cli.js b/test/test-cli.js index <HASH>..<HASH> 100644 --- a/test/test-cli.js +++ b/test/test-cli.js @@ -19,6 +19,9 @@ function runWithInputAndExpect (input, args, expectedOutput, done) { } describe('cli arguments', function () { + + this.timeout(5000); + it('should output nothing with empty input', function (done) { runWithInputAndExpect('', '', '', done); });
Let CLI tests more time for slow machines
diff --git a/Classes/SolrService.php b/Classes/SolrService.php index <HASH>..<HASH> 100644 --- a/Classes/SolrService.php +++ b/Classes/SolrService.php @@ -553,8 +553,8 @@ class Tx_Solr_SolrService extends Apache_Solr_Service { $language = 'english'; $schema = $this->getSchema(); - - if(is_array($schema)){ + + if (!is_null($schema) && isset($schema->fieldTypes)) { foreach ($schema->fieldTypes as $fieldType) { if ($fieldType->name === 'text') { foreach ($fieldType->indexAnalyzer->filters as $filter) { @@ -565,6 +565,7 @@ class Tx_Solr_SolrService extends Apache_Solr_Service { } } } + return $language; } @@ -676,8 +677,8 @@ class Tx_Solr_SolrService extends Apache_Solr_Service { $synonyms = $decodedResponse->{$baseWord}; } } else { - if (is_array($decodedResponse->synonymMappings->managedMap)) { - $synonyms = $decodedResponse->synonymMappings->managedMap; + if (isset($decodedResponse->synonymMappings->managedMap)) { + $synonyms = (array)$decodedResponse->synonymMappings->managedMap; } }
[BUGFIX] SolrService checks synonyms for wrong type It checked for an array, but json_decode provides a stdClass. In test it worked, because the fallback to default language matched. Resolves: #<I> Change-Id: Ia<I>c6af<I>a<I>d5e0cb<I>bfe1b<I> Reviewed-on: <URL>
diff --git a/tracer.go b/tracer.go index <HASH>..<HASH> 100644 --- a/tracer.go +++ b/tracer.go @@ -21,6 +21,7 @@ import ( ) var TraceBufferSize = 1 << 16 // 64K ought to be enough for everyone; famous last words. +var MinTraceBatchSize = 16 type basicTracer struct { ch chan struct{} @@ -187,10 +188,17 @@ func (t *RemoteTracer) doWrite() { for { _, ok := <-t.ch - // wait a bit to accumulate a batch - time.Sleep(time.Second) + // deadline for batch accumulation + deadline := time.Now().Add(time.Second) + again: t.mx.Lock() + if len(t.buf) < MinTraceBatchSize && time.Now().Before(deadline) { + t.mx.Unlock() + time.Sleep(100 * time.Millisecond) + goto again + } + tmp := t.buf t.buf = buf[:0] buf = tmp
don't blanket wait for 1s to accumulate a batch. Instead check the batch size and poll every <I>ms (up to 1s) until the minimum batch size is accumulated.
diff --git a/cmd/juju/model/destroy.go b/cmd/juju/model/destroy.go index <HASH>..<HASH> 100644 --- a/cmd/juju/model/destroy.go +++ b/cmd/juju/model/destroy.go @@ -338,9 +338,11 @@ func newTimedModelStatus(ctx *cmd.Context, api DestroyModelAPI, tag names.ModelT return nil } if status[0].Error != nil { - // This most likely occurred because a model was - // destroyed half-way through the call. - ctx.Infof("Could not get the model status from the API: %v.", status[0].Error) + if !errors.IsNotFound(status[0].Error) { + // No need to give the user a warning that the model they asked + // to destroy is no longer there. + ctx.Infof("Could not get the model status from the API: %v.", status[0].Error) + } return nil } return &modelData{
Address bug #<I>, don't tread model NotFound as an error when destroying that model
diff --git a/molgenis-app/src/main/java/org/molgenis/app/WebAppInitializer.java b/molgenis-app/src/main/java/org/molgenis/app/WebAppInitializer.java index <HASH>..<HASH> 100644 --- a/molgenis-app/src/main/java/org/molgenis/app/WebAppInitializer.java +++ b/molgenis-app/src/main/java/org/molgenis/app/WebAppInitializer.java @@ -11,7 +11,7 @@ public class WebAppInitializer extends MolgenisWebAppInitializer implements WebA @Override public void onStartup(ServletContext servletContext) throws ServletException { - super.onStartup(servletContext, WebAppConfig.class, true, 150); + super.onStartup(servletContext, WebAppConfig.class, true, Integer.MAX_VALUE); // TODO : Add a session expire lister for omx biobankconnect // servletContext.addListener(new SessionExpireListener());
Increased the maximum upload size to accomodate bigger files
diff --git a/api/authz.go b/api/authz.go index <HASH>..<HASH> 100644 --- a/api/authz.go +++ b/api/authz.go @@ -82,6 +82,9 @@ func buildAuthz(ctx context.Context, reqs ...buildReq) error { } } } + if len(accountIDs) == 0 { + return nil + } projects, err := appdb.ProjectsByAccount(ctx, accountIDs...) if err != nil { return err
api: fix authz for build with no account ids Closes chain/chainprv#<I>. Reviewers: @jeffomatic
diff --git a/src/main/java/org/graylog2/database/MongoConnection.java b/src/main/java/org/graylog2/database/MongoConnection.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/graylog2/database/MongoConnection.java +++ b/src/main/java/org/graylog2/database/MongoConnection.java @@ -142,6 +142,7 @@ public final class MongoConnection { .get()); } + coll.ensureIndex(new BasicDBObject("_id", 1)); coll.ensureIndex(new BasicDBObject("created_at", 1)); coll.ensureIndex(new BasicDBObject("host", 1)); coll.ensureIndex(new BasicDBObject("streams", 1));
_id is a standard index #NO_ISSUE
diff --git a/core/common/src/main/java/alluxio/network/netty/NettyRPC.java b/core/common/src/main/java/alluxio/network/netty/NettyRPC.java index <HASH>..<HASH> 100644 --- a/core/common/src/main/java/alluxio/network/netty/NettyRPC.java +++ b/core/common/src/main/java/alluxio/network/netty/NettyRPC.java @@ -84,14 +84,21 @@ public final class NettyRPC { public static void fireAndForget(final NettyRPCContext context, ProtoMessage request) throws IOException { Channel channel = Preconditions.checkNotNull(context.getChannel()); + Object condition = new Object(); channel.writeAndFlush(new RPCProtoMessage(request)).addListener((ChannelFuture future) -> { if (future.cause() != null) { future.channel().close(); } - request.notify(); + synchronized (condition) { + condition.notify(); + } }); try { - request.wait(); + synchronized (condition) { + while (channel.isOpen()) { + condition.wait(); + } + } } catch (InterruptedException e) { CommonUtils.closeChannel(channel); throw new RuntimeException(e);
[SMALLFIX] Correct the use of monitor
diff --git a/tests/express-test-harness.js b/tests/express-test-harness.js index <HASH>..<HASH> 100644 --- a/tests/express-test-harness.js +++ b/tests/express-test-harness.js @@ -45,6 +45,33 @@ describe('express-http-context', function () { }); }); + it('returns undefined when key is not found', function (done) { + // ARRANGE + const app = express(); + + app.use(httpContext.middleware); + + app.get('/test', (req, res) => { + httpContext.set('existing-key', 'some value'); + + setTimeout(() => { + const valueFromContext = httpContext.get('missing-key'); + res.status(200).json({ + typeOfValueFromContext: typeof (valueFromContext) + }); + }, 5); + }); + + const sut = supertest(app); + + // ACT + sut.get('/test').end((err, res) => { + // ASSERT + assert.equal(res.body.typeOfValueFromContext, 'undefined'); + done(); + }); + }); + it('does not store or return context outside of request', function () { // ARRANGE const key = 'key';
test: assert that missing keys return undefined
diff --git a/mod/forum/lib.php b/mod/forum/lib.php index <HASH>..<HASH> 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -5957,7 +5957,7 @@ function forum_remove_user_tracking($userid, $context) { if (!is_enrolled($context, $userid)) { if ($course = $DB->get_record('course', array('id' => $context->instanceid), 'id')) { // find all forums in which this user has reading tracked - if ($forums = $DB->get_records_sql("SELECT f.id, cm.id as coursemodule + if ($forums = $DB->get_records_sql("SELECT DISTINCT f.id, cm.id as coursemodule FROM {forum} f, {modules} m, {course_modules} cm,
"MDL-<I>, added DISTINCT statements"
diff --git a/graph/history.go b/graph/history.go index <HASH>..<HASH> 100644 --- a/graph/history.go +++ b/graph/history.go @@ -27,8 +27,7 @@ func (graph *Graph) WalkHistory(img *image.Image, handler func(image.Image) erro return nil } -// depth returns the number of parents for a -// current image +// depth returns the number of parents for the current image func (graph *Graph) depth(img *image.Image) (int, error) { var ( count = 0 @@ -38,8 +37,7 @@ func (graph *Graph) depth(img *image.Image) (int, error) { for parent != nil { count++ - parent, err = graph.GetParent(parent) - if err != nil { + if parent, err = graph.GetParent(parent); err != nil { return -1, err } }
Refactor some code to use simply format
diff --git a/database.py b/database.py index <HASH>..<HASH> 100644 --- a/database.py +++ b/database.py @@ -5,6 +5,9 @@ import types from collection import Collection from errors import InvalidName +ASCENDING = 1 +DESCENDING = -1 + class Database(object): """A Mongo database. """ diff --git a/mongo.py b/mongo.py index <HASH>..<HASH> 100644 --- a/mongo.py +++ b/mongo.py @@ -7,17 +7,17 @@ import types import traceback import struct -from database import Database +import database from connection import Connection from son import SON from objectid import ObjectId from dbref import DBRef from cursor_manager import BatchCursorManager -ASCENDING = 1 -DESCENDING = -1 +ASCENDING = database.ASCENDING +DESCENDING = database.DESCENDING -class Mongo(Database): +class Mongo(database.Database): """A connection to a Mongo database. """ def __init__(self, name, host="localhost", port=27017, settings={}): @@ -50,7 +50,7 @@ class Mongo(Database): connection = Connection(host, port) connection.set_cursor_manager(BatchCursorManager) - Database.__init__(self, connection, name) + database.Database.__init__(self, connection, name) def __repr__(self): return "Mongo(%r, %r, %r)" % (self.name(), self.connection().host(), self.connection().port())
move ASC and DESC constants to the base db class. mirror them in the enhanced class
diff --git a/src/main/java/org/openqa/selenium/WebElement.java b/src/main/java/org/openqa/selenium/WebElement.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/openqa/selenium/WebElement.java +++ b/src/main/java/org/openqa/selenium/WebElement.java @@ -1,7 +1,7 @@ /* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. -Portions copyright 2011 Software Freedom Conservatory +Portions copyright 2011 Software Freedom Conservancy Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
DanielWagnerHall: s/Conservatory/Conservancy/g r<I>
diff --git a/Tests/Command/Ec2/AuthenticationCommandsTest.php b/Tests/Command/Ec2/AuthenticationCommandsTest.php index <HASH>..<HASH> 100644 --- a/Tests/Command/Ec2/AuthenticationCommandsTest.php +++ b/Tests/Command/Ec2/AuthenticationCommandsTest.php @@ -6,9 +6,8 @@ use Guzzle\Common\Event; use Guzzle\Http\Plugin\CookiePlugin; use Guzzle\Http\CookieJar\ArrayCookieJar; use Guzzle\Http\Message\Response; -use RGeyer\Guzzle\Rs\Tests\Utils\ClientCommandsBase; -class AuthenticationCommandsTest extends ClientCommandsBase { +class AuthenticationCommandsTest extends \Guzzle\Tests\GuzzleTestCase { /** * @group unit
Refactored Ec2\AuthenticationCommands to be proper unit tests
diff --git a/runtests.py b/runtests.py index <HASH>..<HASH> 100644 --- a/runtests.py +++ b/runtests.py @@ -32,6 +32,7 @@ DEFAULT_SETTINGS = { ), 'ROOT_URLCONF': 'tests.urls', 'STATIC_URL': '/static/', + 'SPATIALITE_LIBRARY_PATH': 'mod_spatialite.so', 'TEMPLATES': [{ 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True,
Need to force loading of mod_spatialite, not libspatialite
diff --git a/tests/test-merge.js b/tests/test-merge.js index <HASH>..<HASH> 100644 --- a/tests/test-merge.js +++ b/tests/test-merge.js @@ -1,5 +1,6 @@ /* eslint-env mocha */ const assert = require('assert'); +const webpack = require('webpack'); const webpackMerge = require('..'); const mergeTests = require('./merge-tests'); const loadersKeys = require('./loaders-keys'); @@ -259,6 +260,37 @@ function customizeMergeTests(merge) { assert.equal(receivedKey, 'entry'); assert.deepEqual(result, first); }); + + it('should customize plugins', function () { + let receivedKey; + const config1 = { + plugins: [ + new webpack.DefinePlugin({ + 'process.env': { + NODE_ENV: JSON.stringify('development') + } + }), + new webpack.HotModuleReplacementPlugin() + ] + }; + const config2 = { + plugins: [ + new webpack.DefinePlugin({ + __CLIENT__: true + }), + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + new webpack.HotModuleReplacementPlugin() + ] + }; + + merge({ + customizeArray(a, b, key) { + receivedKey = key; + } + })(config1, config2); + + assert.equal(receivedKey, 'plugins'); + }); } module.exports = normalMergeTests;
test - Add plugin customization test This could be better, but good enough for now.
diff --git a/lib/rambling/trie/version.rb b/lib/rambling/trie/version.rb index <HASH>..<HASH> 100644 --- a/lib/rambling/trie/version.rb +++ b/lib/rambling/trie/version.rb @@ -1,6 +1,6 @@ module Rambling module Trie # Current version of the rambling-trie. - VERSION = '0.5.0' + VERSION = '0.5.1' end end
Bumped to version <I>.
diff --git a/packages/webiny-ui/src/List/DataList/DataList.js b/packages/webiny-ui/src/List/DataList/DataList.js index <HASH>..<HASH> 100644 --- a/packages/webiny-ui/src/List/DataList/DataList.js +++ b/packages/webiny-ui/src/List/DataList/DataList.js @@ -246,7 +246,7 @@ const Pagination = (props: Props) => { return ( <React.Fragment> - {meta.totalCount && + {typeof meta.totalCount !== "undefined" && meta.totalCount > 0 && meta.from && meta.to && (
fix: Fix incorrect pagination info in DataList component (#<I>) A "0" would be outputted in the pagination section if there were no records to show.
diff --git a/js/impress.js b/js/impress.js index <HASH>..<HASH> 100644 --- a/js/impress.js +++ b/js/impress.js @@ -185,6 +185,7 @@ // making given step active var active = null; + var hashTimeout = null; var select = function ( el ) { if ( !el || !el.stepData || el == active) { @@ -216,7 +217,8 @@ // // and it has to be set after animation finishes, because in chrome it // causes transtion being laggy - window.setTimeout(function () { + window.clearTimeout( hashTimeout ); + hashTimeout = window.setTimeout(function () { window.location.hash = "#/" + el.id; }, 1000);
yeah, that's what happens when you do quick fixes using timeouts...
diff --git a/worker/agent.go b/worker/agent.go index <HASH>..<HASH> 100644 --- a/worker/agent.go +++ b/worker/agent.go @@ -159,8 +159,9 @@ func (a *agent) reconnect() error { a.conn = conn a.rw = bufio.NewReadWriter(bufio.NewReader(a.conn), bufio.NewWriter(a.conn)) - a.grab() + a.worker.reRegisterFuncsForAgent(a) + a.grab() go a.work() return nil
fix worker reconnect errors, send cando after reconnection. * fix worker reconnect errors, send cando after reconnection.
diff --git a/helpers/api.js b/helpers/api.js index <HASH>..<HASH> 100644 --- a/helpers/api.js +++ b/helpers/api.js @@ -1,5 +1,5 @@ exports.getBaseUrl = () => { - // If DDENV is defined, use it, otherwise default to prod - const env = process.env.DDENV ? "_" + process.env.DDENV : ""; - return `https://api${env}.dronedeploy.com` + const env = process.env.DDENV || "prod"; // default to prod + const envUrlPart = env === "prod" ? "" : "_" + env; + return `https://api${envUrlPart}.dronedeploy.com` }
Minor adjustment for when env is explicitly prod
diff --git a/lib/addMethod/index.js b/lib/addMethod/index.js index <HASH>..<HASH> 100644 --- a/lib/addMethod/index.js +++ b/lib/addMethod/index.js @@ -3,7 +3,7 @@ const _ = require('lodash'); const addMethodREST = require('./addMethodREST'); const addMethodSOAP = require('./addMethodSOAP'); -const INVALID_TYPE_ERROR_MESSAGE = '`type` must be strings \'REST\' or \'SOAP\''; +const INVALID_TYPE_ERROR_MESSAGE = `\`type\` must be strings 'REST' or 'SOAP'`; function validateAndGetType ([ methodName, config ]) { const { type } = config;
review feedback - changed main string to backticks
diff --git a/go/cmd/vtbackup/vtbackup.go b/go/cmd/vtbackup/vtbackup.go index <HASH>..<HASH> 100644 --- a/go/cmd/vtbackup/vtbackup.go +++ b/go/cmd/vtbackup/vtbackup.go @@ -281,13 +281,6 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back // to the goal position). backupTime := time.Now() - if restorePos.Equal(masterPos) { - // Nothing has happened on the master since the last backup, so there's - // no point taking a new backup since it would be identical. - log.Infof("No backup is necessary. The latest backup is up-to-date with the master.") - return nil - } - // Wait for replication to catch up. waitStartTime := time.Now() for {
Still take a new backup even if nothing changed. We need to create a backup with the new timestamp so we know that our backups are fresh.
diff --git a/test/javascript/test_oracles.js b/test/javascript/test_oracles.js index <HASH>..<HASH> 100644 --- a/test/javascript/test_oracles.js +++ b/test/javascript/test_oracles.js @@ -148,6 +148,13 @@ contract('Oracle', function (accounts) { await etherToken.approve(ultimateOracle.address, 100, { from: accounts[sender1] }) await ultimateOracle.challengeOutcome(2) + // Sender 1 tries to increase their bid but can't + await etherToken.deposit({value: 50, from: accounts[sender1]}) + await etherToken.approve(ultimateOracle.address, 50, { from: accounts[sender1] }) + await utils.assertRejects( + ultimateOracle.voteForOutcome(2, 50, { from: accounts[sender1] }), + 'increase leading vote after challenge') + // Sender 2 overbids sender 1 const sender2 = 1 await etherToken.deposit({value: 150, from: accounts[sender2]})
added testcase to test increase leading vote after challenge
diff --git a/src/Generator.php b/src/Generator.php index <HASH>..<HASH> 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -18,7 +18,7 @@ class Generator } File::makeDirectory($docDir); $excludeDirs = config('l5-swagger.paths.excludes'); - $swagger = \Swagger\scan($appDir, $excludeDirs); + $swagger = \Swagger\scan($appDir, ['exclude' => $excludeDirs]); $filename = $docDir.'/api-docs.json'; $swagger->saveAs($filename);
Fixes excluded directories Excluded directories were not being correctly passed to the $options of Swagger\scan()
diff --git a/charcoal/charcoal.py b/charcoal/charcoal.py index <HASH>..<HASH> 100644 --- a/charcoal/charcoal.py +++ b/charcoal/charcoal.py @@ -219,9 +219,9 @@ class Charcoal(object): else: message, status = self.warn_test("Insecure request made and ignored") self.add_output("SecureRequest", message, status) - self.output.append(dict(self.req.headers), sec='response_headers') - self.output.append(self.req.status_code, sec='response_status_code') if self.test["protocol"] != 'tcp': + self.output.append(dict(self.req.headers), sec='response_headers') + self.output.append(self.req.status_code, sec='response_status_code') if 'show_body' in self.test: try: req_content = self.req.content.decode()
Do not record request output in TCP test TCP tests will not have request status code or header data so only add them to output if the test is not TCP. Previously, trying to add the data was resulting in a stacktrace as the req object did not exist.
diff --git a/lib/couchrest/model/persistence.rb b/lib/couchrest/model/persistence.rb index <HASH>..<HASH> 100644 --- a/lib/couchrest/model/persistence.rb +++ b/lib/couchrest/model/persistence.rb @@ -118,8 +118,8 @@ module CouchRest # # ==== Returns # returns the reloaded document - def create(attributes = {}) - instance = new(attributes) + def create(attributes = {}, &block) + instance = new(attributes, &block) instance.create instance end @@ -128,8 +128,8 @@ module CouchRest # # ==== Returns # returns the reloaded document or raises an exception - def create!(attributes = {}) - instance = new(attributes) + def create!(attributes = {}, &block) + instance = new(attributes, &block) instance.create! instance end
add init block support to #create and #create!
diff --git a/zipline/utils/sentinel.py b/zipline/utils/sentinel.py index <HASH>..<HASH> 100644 --- a/zipline/utils/sentinel.py +++ b/zipline/utils/sentinel.py @@ -13,6 +13,10 @@ class _Sentinel(object): __slots__ = ('__weakref__',) +def is_sentinel(obj): + return isinstance(obj, _Sentinel) + + def sentinel(name, doc=None): try: value = sentinel._cache[name] # memoized @@ -64,8 +68,4 @@ def sentinel(name, doc=None): return Sentinel -def is_sentinel(obj): - return isinstance(obj, _Sentinel) - - sentinel._cache = {}
MAINT: Move is_sentinel up to top of file.
diff --git a/lib/guard/jasmine/inspector.rb b/lib/guard/jasmine/inspector.rb index <HASH>..<HASH> 100644 --- a/lib/guard/jasmine/inspector.rb +++ b/lib/guard/jasmine/inspector.rb @@ -37,7 +37,7 @@ module Guard # @return [Boolean] when the file valid # def jasmine_spec?(path) - path =~ /(?:_s|S)pec\.(js|coffee|js\.coffee)$/ && File.exist?(path) + path =~ /(?:_s|S)pec\.(js|coffee|js\.coffee|cjsx|js\.cjsx)$/ && File.exist?(path) end end end
Support cjsx (react jsx flavored coffeescript)
diff --git a/twitter_scraper.py b/twitter_scraper.py index <HASH>..<HASH> 100644 --- a/twitter_scraper.py +++ b/twitter_scraper.py @@ -17,7 +17,7 @@ def get_tweets(user, pages=25): while pages > 0: d = pq(r.json()['items_html']) - tweets = [tweet.text for tweet in d('.tweet-text')] + tweets = [tweet.text_content() for tweet in d('.tweet-text')] last_tweet = d('.stream-item')[-1].attrib['data-item-id'] for tweet in tweets:
Use `text_content()` instead of text Returns text content of '.tweet-text' including text of children (links)
diff --git a/mod/forum/lib.php b/mod/forum/lib.php index <HASH>..<HASH> 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1475,7 +1475,7 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC", } //TODO: there must be a nice way to do this that keeps both postgres and mysql 3.2x happy but I can't find it right now. - if ($CFG->dbtype == 'postgres7') { + if ($CFG->dbtype == 'postgres7' || $CFG->dbtype == 'mssql' || $CFG->dbtype == 'oci8po') { return get_records_sql("SELECT $postdata, d.name, d.timemodified, d.usermodified, d.groupid, u.firstname, u.lastname, u.email, u.picture $umfields FROM {$CFG->prefix}forum_discussions d
Adding support for MSSQL and Oracle in this select. Not really sure why we need one OUTER join there, if every discussion has one usermodified but.....not time now.
diff --git a/spec/lib/appsignal/transaction_spec.rb b/spec/lib/appsignal/transaction_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/appsignal/transaction_spec.rb +++ b/spec/lib/appsignal/transaction_spec.rb @@ -971,7 +971,7 @@ describe Appsignal::Transaction do end context "when there is a session" do - let(:foo_filter) { { filter_parameters: %w[foo] } } + let(:foo_filter) { { :filter_parameters => %w[foo] } } before do expect(transaction).to respond_to(:request)
Honor filter_parameters keys for session data (linting) - adhere to hash rocket hash syntax
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,11 +9,22 @@ with open('README.rst') as readme_file: with open('HISTORY.rst') as history_file: history = history_file.read() -with open('requirements.txt') as req_dev_file: - requirements = req_dev_file.read().splitlines() +requirements = [ + 'fs==0.5.4' +] -with open('requirements_dev.txt') as req_dev_file: - test_requirements = req_dev_file.read().splitlines() +test_requirements = [ + 'pip==9.0.1', + 'watchdog==0.8.3', + 'flake8==3.2.0', + 'tox==2.5.0', + 'coverage==4.2', + 'cryptography==1.5.3', + 'PyYAML==3.12', + 'pytest==3.0.4', + 'fs==0.5.4', + 'pymongo==3.3.1' +] setup( name='datafs',
return to manual setup.py requirements
diff --git a/phraseapp/lib.go b/phraseapp/lib.go index <HASH>..<HASH> 100644 --- a/phraseapp/lib.go +++ b/phraseapp/lib.go @@ -2991,5 +2991,5 @@ func (client *Client) VersionsList(project_id, translation_id string, page, perP } func GetUserAgent() string { - return "PhraseApp go (test)" + return "PhraseApp go (1.0.0.rc15)" }
<I>.rc<I> No more panics in wizard, minor wording changes
diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index <HASH>..<HASH> 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -19,7 +19,6 @@ package main import ( - "bufio" "bytes" "encoding/hex" "flag" @@ -67,7 +66,7 @@ func main() { die(err) } defer fd.Close() - r = bufio.NewReader(fd) + r = fd default: fmt.Fprintln(os.Stderr, "Error: too many arguments")
cmd/rlpdump: remove extra buffer
diff --git a/lib/discordrb/bot.rb b/lib/discordrb/bot.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/bot.rb +++ b/lib/discordrb/bot.rb @@ -16,13 +16,15 @@ module Discordrb @email = email @password = password - @token = login() - - Thread.new { websocket_connect() } + @token = login @event_handlers = {} end + def run + websocket_connect + end + def message(attributes = {}, &block) @event_handlers[MessageEvent] ||= [] @event_handlers[MessageEvent] << MessageEventHandler.new(attributes, block)
Extegrate the websocket connection into a separate method
diff --git a/test/active_record_monkey_test.rb b/test/active_record_monkey_test.rb index <HASH>..<HASH> 100644 --- a/test/active_record_monkey_test.rb +++ b/test/active_record_monkey_test.rb @@ -10,7 +10,7 @@ class DatabaseRewinder::InsertRecorderTest < ActiveSupport::TestCase end test '#execute' do - cleaner = DatabaseRewinder.instance_variable_get(:'@cleaners').detect {|c| c.db == 'test.sqlite3'} + cleaner = DatabaseRewinder.instance_variable_get(:'@cleaners').detect {|c| c.db == (ENV['DB'] == 'sqlite3' ? 'test.sqlite3' : 'test')} assert_equal %w(foos bars), cleaner.inserted_tables assert_not_nil cleaner.pool
SQLite3 has .sqlite3 suffix to its DB name
diff --git a/tests/conftest.py b/tests/conftest.py index <HASH>..<HASH> 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -37,17 +37,17 @@ def sub_cmds(request): @pytest.fixture def cfile(tmpdir): from pathlib import Path - return Path(tmpdir) / 'config.toml' + return Path(str(tmpdir)) / 'config.toml' @pytest.fixture def nonexistent_file(tmpdir): from pathlib import Path - return Path(tmpdir) / 'dummy.toml' + return Path(str(tmpdir)) / 'dummy.toml' @pytest.fixture def illtoml(tmpdir): from pathlib import Path - path = Path(tmpdir) / 'ill.toml' + path = Path(str(tmpdir)) / 'ill.toml' with path.open('w') as ift: ift.write('not}valid[toml\n') return path
Convert tmpdir to str to make Path (py<I> and py<I>)
diff --git a/plugin/exo/Library/Options/Transfer.php b/plugin/exo/Library/Options/Transfer.php index <HASH>..<HASH> 100644 --- a/plugin/exo/Library/Options/Transfer.php +++ b/plugin/exo/Library/Options/Transfer.php @@ -2,6 +2,8 @@ namespace UJM\ExoBundle\Library\Options; +use Claroline\AppBundle\API\Options as ApiOptions; + /** * Defines Serializers options. */ @@ -50,7 +52,7 @@ final class Transfer * * @var string */ - const NO_FETCH = 'noFetch'; + const NO_FETCH = ApiOptions::NO_FETCH; /** * Persist the tags of the question. @@ -64,5 +66,5 @@ final class Transfer * * @var string */ - const REFRESH_UUID = 'refreshUuid'; + const REFRESH_UUID = ApiOptions::REFRESH_UUID; }
[ExoBundle] fixes copy (#<I>)
diff --git a/test/command-mapper.js b/test/command-mapper.js index <HASH>..<HASH> 100644 --- a/test/command-mapper.js +++ b/test/command-mapper.js @@ -13,7 +13,7 @@ var expect = require("chai").expect, suite("CommandMapper", function() { test("should look like a CommandMapper object", function(){ - expect(CommandMapper).to.respondTo("map"); + expect(CommandMapper).itself.to.respondTo("map"); expect(new CommandMapper(mapping)).to.respondTo("map"); });
Use the 'itself' flag for 'respondTo' assertion. This will check that the CommandMapper constructor itself responds to the static method 'map' instead of the method on its prototype.
diff --git a/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java b/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java index <HASH>..<HASH> 100644 --- a/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java +++ b/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java @@ -69,7 +69,6 @@ public class TestSmoke extends JavadocTester { {BUG_ID + FS + "pkg" + FS + "T0x01.html", "@A"}, {BUG_ID + FS + "pkg" + FS + "T0x02.html", "@A"}, {BUG_ID + FS + "pkg" + FS + "T0x04.html", "@A"}, - {BUG_ID + FS + "pkg" + FS + "T0x1E.html", "@A"}, {BUG_ID + FS + "pkg" + FS + "T0x08.html", "@A"}, {BUG_ID + FS + "pkg" + FS + "T0x0D.html", "@A"}, {BUG_ID + FS + "pkg" + FS + "T0x06.html", "@A"},
Remove case that was removed from the underlying example: annotations on .class expressions.
diff --git a/tests/test_tokenizer.py b/tests/test_tokenizer.py index <HASH>..<HASH> 100644 --- a/tests/test_tokenizer.py +++ b/tests/test_tokenizer.py @@ -112,6 +112,8 @@ def test_no_ssplit(): def test_spacy(): nlp = stanza.Pipeline(processors='tokenize', dir=TEST_MODELS_DIR, lang='en', tokenize_with_spacy=True) + assert nlp.processors['tokenize']._variant is not None + assert nlp.processors['tokenize']._trainer is None doc = nlp(EN_DOC) assert EN_DOC_GOLD_TOKENS == '\n\n'.join([sent.tokens_string() for sent in doc.sentences]) assert all([doc.text[token._start_char: token._end_char] == token.text for sent in doc.sentences for token in sent.tokens])
change unittest test_spacy
diff --git a/tests/__init__.py b/tests/__init__.py index <HASH>..<HASH> 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -25,6 +25,10 @@ class MemcachedTests(unittest.TestCase): self.client.set('test_key', 'test') self.assertEqual('test', self.client.get('test_key')) + def testGetEmptyString(self): + self.client.set('test_key', '') + self.assertEqual('', self.client.get('test_key')) + def testGetMulti(self): self.assertTrue(self.client.set_multi({'test_key': 'value', 'test_key2': 'value2'}))
added a test to add empty strings
diff --git a/aiomanhole/__init__.py b/aiomanhole/__init__.py index <HASH>..<HASH> 100644 --- a/aiomanhole/__init__.py +++ b/aiomanhole/__init__.py @@ -60,8 +60,7 @@ class InteractiveInterpreter: raise ValueError("Cannot handle unknown banner type {!}, expected str or bytes".format(banner.__class__.__name__)) def attempt_compile(self, line): - codeobj = self.compiler(line) - return codeobj + return self.compiler(line) def send_exception(self): """When an exception has occurred, write the traceback to the user."""
Pointless indirection, be gone!
diff --git a/lib/deliver/deliverfile/deliverfile_creator.rb b/lib/deliver/deliverfile/deliverfile_creator.rb index <HASH>..<HASH> 100644 --- a/lib/deliver/deliverfile/deliverfile_creator.rb +++ b/lib/deliver/deliverfile/deliverfile_creator.rb @@ -81,6 +81,10 @@ module Deliver FileUtils.mkdir_p metadata_path json = create_json_based_on_xml(app, metadata_path) + + json.each do |key, value| + json[key].delete(:version_whats_new) + end meta_path = "#{metadata_path}metadata.json" File.write(meta_path, JSON.pretty_generate(json))
Removed changelog from deliver generated app metadata
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -25,7 +25,7 @@ function sortMentions(mentions) { * @return {RegExp} */ function mentionRegExp(mention) { - return new RegExp(`^${escapeStringRegExp(mention)}(?:\\b|\\s|$)`, 'i'); + return new RegExp(`^${escapeStringRegExp(mention)}(?:\\b|\\s|\\W|$)`, 'i'); } /** diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -215,5 +215,15 @@ describe('utils/parseChatMarkup', () => { { type: 'mention', mention: 'user[afk]', raw: 'user[AFK]' }, ]); }); + + it('parses @-mentions with no clear word boundary', () => { + expect(parseChatMarkup('hello @ReAnna!!!', { + mentions: ['ReAnna!!'], + })).to.eql([ + 'hello ', + { type: 'mention', mention: 'reanna!!', raw: 'ReAnna!!' }, + '!', + ]); + }); }); });
fix mentions when username ends in punctuation. (#<I>)
diff --git a/core-bundle/src/Resources/contao/classes/Versions.php b/core-bundle/src/Resources/contao/classes/Versions.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/Resources/contao/classes/Versions.php +++ b/core-bundle/src/Resources/contao/classes/Versions.php @@ -452,6 +452,7 @@ class Versions extends \Backend $arrRow['to'] = $objVersions->version; $arrRow['date'] = date($GLOBALS['TL_CONFIG']['datimFormat'], $objVersions->tstamp); $arrRow['description'] = \String::substr($arrRow['description'], 32); + $arrRow['fromTable'] = \String::substr($arrRow['fromTable'], 18); // see #5769 if ($arrRow['editUrl'] != '') {
[Core] Limit the width of the table names in the version overview (see #<I>)
diff --git a/src/geshi/tcl.php b/src/geshi/tcl.php index <HASH>..<HASH> 100644 --- a/src/geshi/tcl.php +++ b/src/geshi/tcl.php @@ -187,9 +187,6 @@ $language_data = array ( 'PARSER_CONTROL' => array( 'COMMENTS' => array( 'DISALLOWED_BEFORE' => '\\' - ), - 'ENABLE_FLAGS' => array( -// 'KEYWORDS' => GESHI_NEVER, ) ) );
fix: Removed superfluous ENABLE_FLAGS entry from tcl.php
diff --git a/src/services/decoratelayer.js b/src/services/decoratelayer.js index <HASH>..<HASH> 100644 --- a/src/services/decoratelayer.js +++ b/src/services/decoratelayer.js @@ -1,3 +1,12 @@ +/** + * @fileoverview Provides a function that adds properties (using + * `Object.defineProperty`) to the layer, making it possible to control layer + * properties with ngModel. + * + * Example: + * <input type="checkbox" ngModel="layer.visible" /> + */ + goog.provide('ngeo.DecorateLayer'); goog.require('goog.asserts'); @@ -11,13 +20,6 @@ ngeo.DecorateLayer; /** - * This service provides a function that adds properties (using - * `Object.defineProperty`) to the layer, making it possible to - * control layer properties with ngModel. - * - * Example: - * <input type="checkbox" ngModel="layer.visible" /> - * * @param {ol.layer.Layer} layer Layer to decorate. */ ngeo.decorateLayer = function(layer) {
Add @fileoverview to decoratelayer.js
diff --git a/egcd/egcd.py b/egcd/egcd.py index <HASH>..<HASH> 100644 --- a/egcd/egcd.py +++ b/egcd/egcd.py @@ -15,9 +15,9 @@ def egcd(b: int, n: int) -> Tuple[int, int, int]: This implementation is adapted from the sources below: * `Extended Euclidean Algorithm <https://brilliant.org/wiki/extended-euclidean-algorithm/>`__ - on `Brilliant.org <https://brilliant.org>`__, + on `Brilliant.org <https://brilliant.org>`__, * `Modular inverse <https://rosettacode.org/wiki/Modular_inverse>`__ - on `Rosetta Code <https://rosettacode.org>`__, + on `Rosetta Code <https://rosettacode.org>`__, * `Algorithm Implementation/Mathematics/Extended Euclidean algorithm <https://en.wikibooks.org/wiki/Algorithm_Implementation/Mathematics/Extended_Euclidean_algorithm>`__ on `Wikibooks <https://en.wikibooks.org>`__, and * `Euclidean algorithm <https://en.wikipedia.org/wiki/Euclidean_algorithm>`__
Fix formatting issue caused by errant whitespace in docstring.
diff --git a/mod/quiz/export.php b/mod/quiz/export.php index <HASH>..<HASH> 100644 --- a/mod/quiz/export.php +++ b/mod/quiz/export.php @@ -4,6 +4,10 @@ require_once("../../config.php"); require_once("locallib.php"); + // list formats that are supported for export + // need to change this if you add something! + $fileformats = array( 'gift', 'xml', 'qti' ); + require_variable($category); optional_variable($format); @@ -87,8 +91,7 @@ error("No categories!"); } - $fileformats = get_list_of_plugins("mod/quiz/format"); - $fileformatname = array(); + // iterate over valid formats to generate dropdown list foreach ($fileformats as $key => $fileformat) { $formatname = get_string($fileformat, 'quiz'); if ($formatname == "[[$fileformat]]") {
Now only displays available export formats. List is now hard-coded in this file.
diff --git a/lib/flag_shih_tzu.rb b/lib/flag_shih_tzu.rb index <HASH>..<HASH> 100644 --- a/lib/flag_shih_tzu.rb +++ b/lib/flag_shih_tzu.rb @@ -68,7 +68,7 @@ module FlagShihTzu def check_flag_column unless columns.any? { |column| column.name == flag_column && column.type == :integer } - raise "Table '#{table_name}' must have an integer column named '#{flag_column}' in order to use FlagShihTzu" + puts "Error: Table '#{table_name}' must have an integer column named '#{flag_column}' in order to use FlagShihTzu" end end
Changed flags column check to print an error instead of raising an exception. It avoids raising an error when installing the plugin in an existing application.
diff --git a/lib/ezutils/classes/ezsession.php b/lib/ezutils/classes/ezsession.php index <HASH>..<HASH> 100644 --- a/lib/ezutils/classes/ezsession.php +++ b/lib/ezutils/classes/ezsession.php @@ -56,12 +56,18 @@ function &eZSessionRead( $key ) $key =& $db->escapeString( $key ); - $sessionRes =& $db->arrayQuery( "SELECT data, user_id FROM ezsession WHERE session_key='$key'" ); + $sessionRes =& $db->arrayQuery( "SELECT data, user_id, expiration_time FROM ezsession WHERE session_key='$key'" ); if ( count( $sessionRes ) == 1 ) { + $ini =& eZINI::instance(); + + $sessionUpdatesTime = $sessionRes[0]['expiration_time'] - $ini->variable( 'Session', 'SessionTimeout' ); + $sessionIdle = time() - $sessionUpdatesTime; + $data =& $sessionRes[0]['data']; $GLOBALS['eZSessionUserID'] = $sessionRes[0]['user_id']; + $GLOBALS['eZSessionIdleTime'] = $sessionIdle; return $data; }
- Fixed missing patch to ezsession for handling user idle time. Needed to make new content search work properly. git-svn-id: file:///home/patrick.allaert/svn-git/ezp-repo/ezpublish/trunk@<I> a<I>eee8c-daba-<I>-acae-fa<I>f<I>
diff --git a/pkg/option/monitor.go b/pkg/option/monitor.go index <HASH>..<HASH> 100644 --- a/pkg/option/monitor.go +++ b/pkg/option/monitor.go @@ -52,7 +52,7 @@ const ( // MonitorAggregationLevelMax is the maximum level of aggregation // currently supported. - MonitorAggregationLevelMax = MonitorAggregationLevelMedium + MonitorAggregationLevelMax OptionSetting = 4 ) // monitorAggregationOption maps a user-specified string to a monitor @@ -81,6 +81,7 @@ var monitorAggregationFormat = map[OptionSetting]string{ MonitorAggregationLevelLowest: "Lowest", MonitorAggregationLevelLow: "Low", MonitorAggregationLevelMedium: "Medium", + MonitorAggregationLevelMax: "Max", } // VerifyMonitorAggregationLevel validates the specified key/value for a
Fix setting monitorAggregationLevel to max reflects via CLI This PR fixes setting MonitorAggregationLevel to max to correctly reflect through CLI. Fixes: #<I>
diff --git a/brother_ql/__init__.py b/brother_ql/__init__.py index <HASH>..<HASH> 100644 --- a/brother_ql/__init__.py +++ b/brother_ql/__init__.py @@ -4,3 +4,7 @@ class BrotherQLUnsupportedCmd(BrotherQLError): pass class BrotherQLUnknownModel(BrotherQLError): pass class BrotherQLRasterError(BrotherQLError): pass +from .raster import BrotherQLRaster + +from .brother_ql_create import create_label +
make BrotherQLRaster & create_label avail. at package level
diff --git a/asana/version.py b/asana/version.py index <HASH>..<HASH> 100644 --- a/asana/version.py +++ b/asana/version.py @@ -1 +1 @@ -VERSION = '0.2.1' +VERSION = '0.2.2'
Releasing version <I>
diff --git a/src/core/TSDB.java b/src/core/TSDB.java index <HASH>..<HASH> 100644 --- a/src/core/TSDB.java +++ b/src/core/TSDB.java @@ -651,7 +651,7 @@ public final class TSDB { } Bytes.setInt(row, (int) base_time, metrics.width() + Const.SALT_WIDTH()); - Internal.prefixKeyWithSalt(row); + RowKey.prefixKeyWithSalt(row); scheduleForCompaction(row, (int) base_time); final PutRequest point = new PutRequest(table, row, FAMILY, qualifier, value);
Point the TSDB to use the RowKey class for salting support
diff --git a/test/run.js b/test/run.js index <HASH>..<HASH> 100644 --- a/test/run.js +++ b/test/run.js @@ -16,14 +16,14 @@ describe('routes', function(){ it('should configure the module correctly', function(){ routes.configure({ basePath: 'http://local.host', - prefix: '/app/', + prefix: '/site/', helpers: { generateUrl: 'genUrl' } }); assert.equal('http://local.host', routes.config.basePath); - assert.equal('/app/', routes.config.prefix); + assert.equal('/site/', routes.config.prefix); assert.equal('genUrl', routes.config.helpers.generateUrl); }); @@ -39,7 +39,9 @@ describe('routes', function(){ describe('express helper', function(){ it('should not error when calling the helper', function(){ - routes(app); + routes(app, { + prefix: '/app/' + }); }); });
Updated tests Updated the tests to account for the new options parameter in the helper