diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/godaddypy/client.py b/godaddypy/client.py index <HASH>..<HASH> 100644 --- a/godaddypy/client.py +++ b/godaddypy/client.py @@ -235,6 +235,8 @@ class Client(object): """ records = self.get_records(domain) + if records is None: + return False # we don't want to replace the records with nothing at all save = list() deleted = 0 for record in records:
Added null check to the delete method, so if client.get_records fails, existing records won't be removed...
diff --git a/resources/lang/es-ES/forms.php b/resources/lang/es-ES/forms.php index <HASH>..<HASH> 100644 --- a/resources/lang/es-ES/forms.php +++ b/resources/lang/es-ES/forms.php @@ -156,7 +156,7 @@ return [ 'time_before_refresh' => 'Tasa de actualización de la página de estado (en segundos)', 'major_outage_rate' => 'Major outage threshold (in %)', 'banner' => 'Imagen del banner', - 'banner-help' => 'Se recomienda subir una imagen no más grande de 930px de ancho', + 'banner-help' => "Se recomienda subir una imagen no más grande de 930px de ancho", 'subscribers' => '¿Permitir a la gente inscribirse mediante noficiacion por correo electronico?', 'suppress_notifications_in_maintenance' => '¿Suprimir notificaciones cuando el incidente ocurra durante el período de mantenimiento?', 'skip_subscriber_verification' => '¿Omitir verificación de usuarios? (Advertencia, podrías ser spammeado)',
New translations forms.php (Spanish)
diff --git a/lib/beaker-answers/version.rb b/lib/beaker-answers/version.rb index <HASH>..<HASH> 100644 --- a/lib/beaker-answers/version.rb +++ b/lib/beaker-answers/version.rb @@ -1,5 +1,5 @@ module BeakerAnswers module Version - STRING = '0.13.0' + STRING = '0.14.0' end end
(GEM) update beaker-answers version to <I>
diff --git a/lib/extensions/array.rb b/lib/extensions/array.rb index <HASH>..<HASH> 100644 --- a/lib/extensions/array.rb +++ b/lib/extensions/array.rb @@ -2,8 +2,4 @@ class Array def rand self[Kernel.rand(length)] end - - def shuffle - self.sort_by{Kernel.rand} - end -end \ No newline at end of file +end
shuffle exists in <I> and <I>, so remove it
diff --git a/test/phonopy/unfolding/test_unfolding.py b/test/phonopy/unfolding/test_unfolding.py index <HASH>..<HASH> 100644 --- a/test/phonopy/unfolding/test_unfolding.py +++ b/test/phonopy/unfolding/test_unfolding.py @@ -60,7 +60,7 @@ class TestUnfolding(unittest.TestCase): with open(filename) as f: bin_data_in_file = np.loadtxt(f) np.testing.assert_allclose(bin_data, bin_data_in_file, - atol=1e-3, rtol=0) + atol=1e-2, rtol=0) def _prepare_unfolding(self, qpoints, unfolding_supercell_matrix): supercell = get_supercell(self._cell, np.diag([2, 2, 2]))
Tolerance to be 1e-2. This error is probably coming from different eigensolvers of different system for handling degeneracy.
diff --git a/indra/explanation/pathfinding/pathfinding.py b/indra/explanation/pathfinding/pathfinding.py index <HASH>..<HASH> 100644 --- a/indra/explanation/pathfinding/pathfinding.py +++ b/indra/explanation/pathfinding/pathfinding.py @@ -373,7 +373,7 @@ def bfs_search_multiple_nodes(g, source_nodes, path_limit=None, **kwargs): break -def get_path_iter(graph, source, target, path_length, loop): +def get_path_iter(graph, source, target, path_length, loop, dummy_target): """Return a generator of paths with path_length cutoff from source to target.""" path_iter = nx.all_simple_paths(graph, source, target, path_length)
Fix a bug caused by rebase
diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-embed.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-embed.js index <HASH>..<HASH> 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-embed.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-embed.js @@ -151,7 +151,7 @@ export default Component.extend({ throw 'No HTML returned'; } - set(this.payload.linkOnError, undefined); + set(this.payload, 'linkOnError', undefined); set(this.payload, 'html', response.html); set(this.payload, 'type', response.type); this.saveCard(this.payload, false);
Koenig - Fixed embeds cards no issue - `set` call to remove `linkOnError` from the embed card payload was malformed
diff --git a/girder/utility/acl_mixin.py b/girder/utility/acl_mixin.py index <HASH>..<HASH> 100644 --- a/girder/utility/acl_mixin.py +++ b/girder/utility/acl_mixin.py @@ -20,7 +20,7 @@ import itertools import six -from ..models.model_base import Model +from ..models.model_base import Model, AccessException from ..constants import AccessType @@ -78,6 +78,26 @@ class AccessControlMixin(object): return self.model(self.resourceColl).hasAccess(resource, user=user, level=level) + def requireAccess(self, doc, user=None, level=AccessType.READ): + """ + This wrapper just provides a standard way of throwing an + access denied exception if the access check fails. + """ + if not self.hasAccess(doc, user, level): + if level == AccessType.READ: + perm = 'Read' + elif level == AccessType.WRITE: + perm = 'Write' + else: + perm = 'Admin' + if user: + userid = str(user.get('_id', '')) + else: + userid = None + raise AccessException("%s access denied for %s %s (user %s)." % + (perm, self.name, doc.get('_id', 'unknown'), + userid)) + def filterResultsByPermission(self, cursor, user, level, limit, offset, removeKeys=()): """
implement requireAccess() in AccessControlMixin
diff --git a/lib/celluloid_benchmark/visitor.rb b/lib/celluloid_benchmark/visitor.rb index <HASH>..<HASH> 100644 --- a/lib/celluloid_benchmark/visitor.rb +++ b/lib/celluloid_benchmark/visitor.rb @@ -30,14 +30,7 @@ module CelluloidBenchmark begin instance_eval session rescue Mechanize::ResponseCodeError => e - self.request_end_time = Time.now - benchmark_run.async.log( - e.response_code, - request_start_time, - request_end_time, - current_request_label, - current_request_threshold - ) + log_response_code_error e end elapsed_time = Time.now - started_at @@ -81,5 +74,16 @@ module CelluloidBenchmark benchmark_run.async.log response.code, request_start_time, request_end_time, current_request_label, current_request_threshold end end + + def log_response_code_error(error) + self.request_end_time = Time.now + benchmark_run.async.log( + e.response_code, + request_start_time, + request_end_time, + current_request_label, + current_request_threshold + ) + end end end
Extract complicated error logging into its own method
diff --git a/lib/watir-webdriver/extensions/wait.rb b/lib/watir-webdriver/extensions/wait.rb index <HASH>..<HASH> 100644 --- a/lib/watir-webdriver/extensions/wait.rb +++ b/lib/watir-webdriver/extensions/wait.rb @@ -97,10 +97,9 @@ module Watir end def wait_while_present(timeout = 30) - begin - Watir::Wait.while(timeout) { self.present? } - rescue Selenium::WebDriver::Error::ObsoleteElementError - end + Watir::Wait.while(timeout) { self.present? } + rescue Selenium::WebDriver::Error::ObsoleteElementError + # it's not present end end # Element
Fix rescue in wait_while_present.
diff --git a/project_generator/exporters/uvision_definitions.py b/project_generator/exporters/uvision_definitions.py index <HASH>..<HASH> 100644 --- a/project_generator/exporters/uvision_definitions.py +++ b/project_generator/exporters/uvision_definitions.py @@ -20,9 +20,8 @@ class uVisionDefinitions(): try: return self.mcu_def[name] except KeyError: - pass - # raise RuntimeError( - # "Mcu was not recognized for uvision. Please check mcu_def dictionary.") + raise RuntimeError( + "Mcu was not recognized for uvision. Please check mcu_def dictionary.") # MCU definitions which are currently supported. Add a new one, define a name as it is # in uVision, create an empty project for that MCU, open the project file (uvproj) in any text
uvision def - error uncommented, mcu has to be defined, via board or mcu
diff --git a/src/main/java/net/snowflake/client/core/SFSession.java b/src/main/java/net/snowflake/client/core/SFSession.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/snowflake/client/core/SFSession.java +++ b/src/main/java/net/snowflake/client/core/SFSession.java @@ -600,7 +600,7 @@ public class SFSession logger.debug( "input: server={}, account={}, user={}, password={}, role={}, " + "database={}, schema={}, warehouse={}, validate_default_parameters={}, authenticator={}, ocsp_mode={}, " + - "passcode_in_passward={}, passcode={}, private_key={}, " + + "passcode_in_password={}, passcode={}, private_key={}, " + "use_proxy={}, proxy_host={}, proxy_port={}, proxy_user={}, proxy_password={}, disable_socks_proxy={}, " + "application={}, app_id={}, app_version={}, " + "login_timeout={}, network_timeout={}, query_timeout={}, tracing={}, private_key_file={}, private_key_file_pwd={}. " +
try a robust way to use smiley face
diff --git a/lib/celluloid/actor.rb b/lib/celluloid/actor.rb index <HASH>..<HASH> 100644 --- a/lib/celluloid/actor.rb +++ b/lib/celluloid/actor.rb @@ -116,6 +116,9 @@ module Celluloid while @running begin message = @mailbox.receive + rescue MailboxShutdown + # If the mailbox detects shutdown, exit the actor + @running = false rescue ExitEvent => exit_event fiber = Fiber.new do initialize_thread_locals diff --git a/lib/celluloid/io/mailbox.rb b/lib/celluloid/io/mailbox.rb index <HASH>..<HASH> 100644 --- a/lib/celluloid/io/mailbox.rb +++ b/lib/celluloid/io/mailbox.rb @@ -45,7 +45,7 @@ module Celluloid message rescue DeadWakerError shutdown # force shutdown of the mailbox - raise MailboxError, "mailbox shutdown called during receive" + raise MailboxShutdown, "mailbox shutdown called during receive" end # Cleanup any IO objects this Mailbox may be using diff --git a/lib/celluloid/mailbox.rb b/lib/celluloid/mailbox.rb index <HASH>..<HASH> 100644 --- a/lib/celluloid/mailbox.rb +++ b/lib/celluloid/mailbox.rb @@ -2,6 +2,7 @@ require 'thread' module Celluloid class MailboxError < StandardError; end # you can't message the dead + class MailboxShutdown < StandardError; end # raised if the mailbox can no longer be used # Actors communicate with asynchronous messages. Messages are buffered in # Mailboxes until Actors can act upon them.
Detect mailbox shutdowns and handle them gracefully
diff --git a/addon/components/sl-menu.js b/addon/components/sl-menu.js index <HASH>..<HASH> 100644 --- a/addon/components/sl-menu.js +++ b/addon/components/sl-menu.js @@ -281,6 +281,10 @@ export default Ember.Component.extend( StreamEnabled, { * @returns {undefined} */ select( index ) { + if ( this.get( 'showingAll' ) ) { + this.hideAll(); + } + const selections = this.get( 'selections' ); const selectionsLength = selections.length; let item;
Add handling of showingAll state in select()
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ if sys.version_info[:2] < (2, 7) or ((3,0) <= sys.version_info[:2] < (3,2)): setup( name='gridtk', - version='1.0.0', + version='1.0.1a1', description='SGE Grid and Local Submission and Monitoring Tools for Idiap', url='https://github.com/idiap/gridtk',
Increased version number (hopefully this helps tracking the nightlies problem).
diff --git a/tests/test_foreign.py b/tests/test_foreign.py index <HASH>..<HASH> 100644 --- a/tests/test_foreign.py +++ b/tests/test_foreign.py @@ -76,7 +76,7 @@ class MyTestCase(unittest.TestCase): prolog = Prolog() result = list(prolog.query("get_list_of_lists(Result)")) - self.assertTrue({'Result': [[1], [2]]} in result, 'A string return value should not be converted to an atom.') + self.assertTrue({'Result': [[1], [2]]} in result, 'Nested lists should be unified correctly as return value.') def test_register_with_module(self): def get_int(result):
Fixed wrong explanation string for unit test.
diff --git a/src/zsl/interface/webservice/performers/method.py b/src/zsl/interface/webservice/performers/method.py index <HASH>..<HASH> 100644 --- a/src/zsl/interface/webservice/performers/method.py +++ b/src/zsl/interface/webservice/performers/method.py @@ -7,7 +7,7 @@ from __future__ import unicode_literals import logging -from importlib import import_module, reload +from importlib import import_module import sys
Remove the unused import and fix testing library
diff --git a/src/basis/data.js b/src/basis/data.js index <HASH>..<HASH> 100644 --- a/src/basis/data.js +++ b/src/basis/data.js @@ -1501,11 +1501,39 @@ }, /** - * Proxy method for contained dataset. If no dataset, returns empty array. - * @return {Array.<basis.data.Object>} + * Proxy method for contained dataset. + */ + has: function(object){ + return this.dataset ? this.dataset.has(object) : null; + }, + + /** + * Proxy method for contained dataset. */ getItems: function(){ - return this.dataset ? this.dataset.getItems() : [] + return this.dataset ? this.dataset.getItems() : []; + }, + + /** + * Proxy method for contained dataset. + */ + pick: function(){ + return this.dataset ? this.dataset.pick() : null; + }, + + /** + * Proxy method for contained dataset. + */ + top: function(count){ + return this.dataset ? this.dataset.top(count) : []; + }, + + /** + * Proxy method for contained dataset. + */ + forEach: function(fn){ + if (this.dataset) + return this.dataset.forEach(fn); }, /**
extend basis.data.DatasetWrapper with has/pick/top/forEach proxy methods
diff --git a/src/renderers/ListRenderer.php b/src/renderers/ListRenderer.php index <HASH>..<HASH> 100644 --- a/src/renderers/ListRenderer.php +++ b/src/renderers/ListRenderer.php @@ -233,6 +233,14 @@ class ListRenderer extends BaseRenderer Html::addCssClass($options, 'form-group'); } + if (is_callable($column->columnOptions)) { + $columnOptions = call_user_func($column->columnOptions, $column->getModel(), $index, $this->context); + } else { + $columnOptions = $column->columnOptions; + } + + $options = array_merge_recursive($options, $columnOptions); + $content = Html::beginTag('div', $options); if (empty($column->title)) {
Added support for `columOptions` in ListRenderer
diff --git a/tasks/dist.js b/tasks/dist.js index <HASH>..<HASH> 100644 --- a/tasks/dist.js +++ b/tasks/dist.js @@ -67,7 +67,7 @@ var buildPolyfill = function () { var detect = fs.readFileSync(fillPath + poly + '/detect.js', 'utf8'), pfill = fs.readFileSync(fillPath + poly + '/polyfill.js', 'utf8'); - fill += 'if (!' + detect + '){' + pfill + '}'; + fill += 'if (!(' + detect + ')){' + pfill + '}'; }); fill += '}());'
Improve polyfill injection to make detection of CustomEvent working - fixes Snugug/eq.js/issues/#<I>
diff --git a/src/main/java/com/ning/metrics/eventtracker/CollectorController.java b/src/main/java/com/ning/metrics/eventtracker/CollectorController.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/ning/metrics/eventtracker/CollectorController.java +++ b/src/main/java/com/ning/metrics/eventtracker/CollectorController.java @@ -78,9 +78,9 @@ public class CollectorController } @Managed(description = "Whether the eventtracker library accepts events") - public AtomicBoolean isAcceptEvents() + public boolean isAcceptEvents() { - return acceptEvents; + return acceptEvents.get(); } @Managed(description = "Number of events received")
jmx: don't use AtomicBoolean to make jmxutils happy jmxutils doesn't like AtomicBoolean for is... properties.
diff --git a/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/lib/Doctrine/Common/Annotations/AnnotationRegistry.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ b/lib/Doctrine/Common/Annotations/AnnotationRegistry.php @@ -141,9 +141,10 @@ final class AnnotationRegistry */ static public function loadAnnotationClass($class) { - if (isset(self::$successfullyLoaded[$class])) { + if (\class_exists($class, false)) { return true; } + if (isset(self::$failedToAutoload[$class])) { return false; }
#<I> completely skip autoloading for already loaded classes
diff --git a/neuropythy/__init__.py b/neuropythy/__init__.py index <HASH>..<HASH> 100644 --- a/neuropythy/__init__.py +++ b/neuropythy/__init__.py @@ -11,7 +11,7 @@ from vision import (retinotopy_data, empirical_retinotopy_data, predicted_re neighborhood_cortical_magnification) # Version information... -__version__ = '0.1.6' +__version__ = '0.2.0' description = 'Integrate Python environment with FreeSurfer and perform mesh registration'
Updated version to <I>!
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- import setuptools -from setuptools import setup, Extension +from setuptools import setup +from distutils.extension import Extension from Cython.Build import cythonize import numpy
Swap setuptools extension for distutils for Cython compatibility
diff --git a/test/test_licensee_project.rb b/test/test_licensee_project.rb index <HASH>..<HASH> 100644 --- a/test/test_licensee_project.rb +++ b/test/test_licensee_project.rb @@ -17,7 +17,7 @@ class TestLicenseeProject < Minitest::Test def make_project(fixture_name) dest = File.join('tmp', 'fixtures', fixture_name) FileUtils.mkdir_p File.dirname(dest) - system 'git', 'clone', '-q', fixture_path(fixture_name), dest + Rugged::Repository.clone_at(fixture_path(fixture_name), dest).close FileUtils.rm_rf File.join(dest, '.git') Licensee::FSProject.new(dest)
Use Rugged to clone test repos Avoid the additional dependency on the command line Git client. This also resolves file locking issues when removing temporary test data in Git for Windows with "core.fscache" set to "true" [1] (which is the default in recent versions). [1] <URL>
diff --git a/src/Ubiquity/orm/bulk/BulkUpdates.php b/src/Ubiquity/orm/bulk/BulkUpdates.php index <HASH>..<HASH> 100644 --- a/src/Ubiquity/orm/bulk/BulkUpdates.php +++ b/src/Ubiquity/orm/bulk/BulkUpdates.php @@ -96,7 +96,6 @@ class BulkUpdates extends AbstractBulks { $quote = $this->db->quote; $tableName = OrmUtils::getTableName ( $this->class ); $sql = ''; - $count = \count ( $this->instances ); foreach ( $this->instances as $instance ) { $kv = OrmUtils::getKeyFieldsAndValues ( $instance ); $sql .= "UPDATE {$quote}{$tableName}{$quote} SET " . $this->db->getUpdateFieldsKeyAndValues ( $instance->_rest ) . ' WHERE ' . $this->db->getCondition ( $kv ) . ';'; @@ -104,7 +103,7 @@ class BulkUpdates extends AbstractBulks { while ( true ) { try { if ($this->db->beginTransaction ()) { - if ($count == $this->db->execute ( $sql )) { + if ($this->db->execute ( $sql )) { if ($this->db->commit ()) { return true; }
[skip ci] Fix query count pb
diff --git a/jss/pretty_element.py b/jss/pretty_element.py index <HASH>..<HASH> 100644 --- a/jss/pretty_element.py +++ b/jss/pretty_element.py @@ -50,7 +50,12 @@ class PrettyElement(ElementTree.Element): def __getattr__(self, name): if re.match(_DUNDER_PATTERN, name): return super(PrettyElement, self).__getattr__(name) - return self.find(name) + result = self.find(name) + if result is not None: + return result + else: + raise AttributeError( + 'There is no element with the tag "{}"'.format(name)) # TODO: This can be removed once `JSSObject.__init__` signature is fixed. def makeelement(self, tag, attrib):
Getattr should raise AttributeError when nothing is found
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ py_version = platform.python_version() if py_version < '2.7': REQUIRED_PACKAGES.append('argparse>=1.2.1') -_APITOOLS_VERSION = '0.4.7' +_APITOOLS_VERSION = '0.4.8' with open('README.rst') as fileobj: README = fileobj.read()
Update for <I> release.
diff --git a/src/main/java/com/twilio/sdk/verbs/Dial.java b/src/main/java/com/twilio/sdk/verbs/Dial.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/twilio/sdk/verbs/Dial.java +++ b/src/main/java/com/twilio/sdk/verbs/Dial.java @@ -47,6 +47,7 @@ public class Dial extends Verb { this.allowedVerbs.add(Verb.V_CONFERENCE); this.allowedVerbs.add(Verb.V_CLIENT); this.allowedVerbs.add(Verb.V_QUEUE); + this.allowedVerbs.add(Verb.V_SIP); } /**
Adding support to append Sip into Dial Verb
diff --git a/lib/chef/resource/locale.rb b/lib/chef/resource/locale.rb index <HASH>..<HASH> 100644 --- a/lib/chef/resource/locale.rb +++ b/lib/chef/resource/locale.rb @@ -61,7 +61,7 @@ class Chef end execute "reload root's lang profile script" do - command "source source /etc/sysconfig/i18n; source /etc/profile.d/lang.sh" + command "source /etc/sysconfig/i18n; source /etc/profile.d/lang.sh" not_if { updated } end elsif ::File.exist?("/usr/sbin/update-locale")
Fix locale on RHEL 6 / Amazon Linux There was a double source in the command, which would fail.
diff --git a/src/cluster/brokerPool.js b/src/cluster/brokerPool.js index <HASH>..<HASH> 100644 --- a/src/cluster/brokerPool.js +++ b/src/cluster/brokerPool.js @@ -205,6 +205,7 @@ module.exports = class BrokerPool { await broker.connect() } catch (e) { if (e.name === 'KafkaJSConnectionError' || e.type === 'ILLEGAL_SASL_STATE') { + await broker.disconnect() // Rebuild the connection since it can't recover from illegal SASL state broker.connection = this.connectionBuilder.build({ host: broker.connection.host,
Make sure the broker is disconnected before a reconnect
diff --git a/closure/bin/build/closurebuilder.py b/closure/bin/build/closurebuilder.py index <HASH>..<HASH> 100755 --- a/closure/bin/build/closurebuilder.py +++ b/closure/bin/build/closurebuilder.py @@ -194,7 +194,7 @@ def main(): # Add scripts specified on the command line. for path in args: - sources.add(source.Source(_PathSource(path))) + sources.add(_PathSource(js_path)) logging.info('%s sources scanned.', len(sources))
Incorrect usage of _PathSource for command line argument paths. Fixing in SVN so that this is fixed externally quickly (where it is used). See discussion: <URL>
diff --git a/pysnmp/smi/mibs/ASN1.py b/pysnmp/smi/mibs/ASN1.py index <HASH>..<HASH> 100644 --- a/pysnmp/smi/mibs/ASN1.py +++ b/pysnmp/smi/mibs/ASN1.py @@ -1,9 +1,15 @@ -# Base ASN.1 objects +# ASN.1 objects used in SNMP +from pyasn1.type import univ +from pysnmp.proto import rfc1902 -from pysnmp.asn1 import univ +Integer = rfc1902.Integer32 +OctetString = rfc1902.OctetString -Integer = univ.Integer -OctetString = univ.OctetString +# Instead of using base ASN,1 types we use SNMPv2 SMI ones to make +# SMI objects type-compatible with SNMP protocol values + +# Integer = univ.Integer +# OctetString = univ.OctetString BitString = univ.BitString Null = univ.Null ObjectIdentifier = univ.ObjectIdentifier
Inherit ASN1 module classes from SMIv2 classes rather than from original ASN1 ones for SNMPv2 SMI compatibility. This may need to be reworked.
diff --git a/ncclient/transport/ssh.py b/ncclient/transport/ssh.py index <HASH>..<HASH> 100644 --- a/ncclient/transport/ssh.py +++ b/ncclient/transport/ssh.py @@ -59,7 +59,7 @@ TICK = 0.1 # * result.group(1) will contain the digit string for a chunk # * result.group(2) will be defined if '##' found # -RE_NC11_DELIM = re.compile(r'\n(?:#([0-9]+)|(##))\n') +RE_NC11_DELIM = re.compile(rb'\n(?:#([0-9]+)|(##))\n') def default_unknown_host_cb(host, fingerprint): @@ -190,7 +190,7 @@ class SSHSession(Session): while True and start < data_len: # match to see if we found at least some kind of delimiter self.logger.debug('_parse11: matching from %d bytes from start of buffer', start) - re_result = RE_NC11_DELIM.match(data[start:].decode('utf-8')) + re_result = RE_NC11_DELIM.match(data[start:]) if not re_result: # not found any kind of delimiter just break; this should only
Parsing of NETCONF <I> frames no longer decodes each chunk of bytes to unicode This was causing a massive performance hit when retrieving a large config.
diff --git a/telebot/asyncio_filters.py b/telebot/asyncio_filters.py index <HASH>..<HASH> 100644 --- a/telebot/asyncio_filters.py +++ b/telebot/asyncio_filters.py @@ -278,7 +278,10 @@ class StateFilter(AdvancedCustomFilter): if text == '*': return True if isinstance(text, list): - new_text = [i.name for i in text] + new_text = [] + for i in text: + if isclass(i): i = i.name + new_text.append(i) text = new_text elif isinstance(text, object): text = text.name
Update asyncio_filters.py
diff --git a/invoke/fnInvoke.js b/invoke/fnInvoke.js index <HASH>..<HASH> 100644 --- a/invoke/fnInvoke.js +++ b/invoke/fnInvoke.js @@ -14,8 +14,7 @@ class FNInvoke { 'invoke:invoke': () => BB.bind(this) .then(this.invokeFunction) .then((data) => data.data) - .then(console.log) - .catch(console.log), + .then(console.log), }; } @@ -25,7 +24,15 @@ class FNInvoke { return BB.reject(`${this.options.f} is not a valid function for this service.`); } const url = fnRouteUrl(); - return axios.get(`${url}${this.serverless.service.serviceObject.name}/${f.path}`); + let funcpath = f.path; + if (funcpath === undefined) { + funcpath = f.name; + } + if (this.options.data !== undefined) { + return axios.post(`${url}${this.serverless.service.serviceObject.name}/${funcpath}` + , this.options.data); + } + return axios.get(`${url}${this.serverless.service.serviceObject.name}/${funcpath}`); } }
Remove catch, post if there is a defined data.
diff --git a/src/MigrationsOrganiserServiceProvider.php b/src/MigrationsOrganiserServiceProvider.php index <HASH>..<HASH> 100755 --- a/src/MigrationsOrganiserServiceProvider.php +++ b/src/MigrationsOrganiserServiceProvider.php @@ -25,13 +25,15 @@ class MigrationsOrganiserServiceProvider extends MSP public function register() { + $this->registerCreator(); + $this->registerMigrator(); $this->registerMigrateOrganise(); - $this->commands('migrateorganise'); + $this->commands('command.migrate', 'command.migrate.make', 'command.migrate.organise'); } private function registerMigrateOrganise() { - $this->app['migrateorganise'] = $this->app->share(function($app) + $this->app['command.migrate.organise'] = $this->app->share(function($app) { return new MigrateOrganise($app['files']); });
Registering organise command broke migrate and make. Fixed with explicit calls.
diff --git a/lib/calabash/application.rb b/lib/calabash/application.rb index <HASH>..<HASH> 100644 --- a/lib/calabash/application.rb +++ b/lib/calabash/application.rb @@ -1,5 +1,7 @@ module Calabash class Application + include Calabash::Utility + @@default = nil def self.default
Application: Fix: remember to include utils
diff --git a/grab/base.py b/grab/base.py index <HASH>..<HASH> 100644 --- a/grab/base.py +++ b/grab/base.py @@ -98,6 +98,7 @@ def default_config(): # Only for selenium transport webdriver = 'firefox', + selenium_wait = 1, # Proxy proxy = None, diff --git a/grab/transport/selenium.py b/grab/transport/selenium.py index <HASH>..<HASH> 100644 --- a/grab/transport/selenium.py +++ b/grab/transport/selenium.py @@ -8,6 +8,7 @@ import urllib from StringIO import StringIO import threading import random +import time import os from ..response import Response @@ -194,7 +195,8 @@ class SeleniumTransportExtension(object): self.browser = webdriver.Firefox() self.config = { - 'url': grab.config['url'] + 'url': grab.config['url'], + 'wait': grab.config['selenium_wait'] } #url = self.config['url'] @@ -376,6 +378,7 @@ class SeleniumTransportExtension(object): def request(self): try: self.browser.get(self.config['url']) + time.sleep(self.config['wait']) except Exception, ex: logging.error('', exc_info=ex) raise GrabError(999, 'Error =8-[ ]')
Added option "selenium_wait", which add delay before browser closing to execute JavaScript.
diff --git a/scripts/create-rule.js b/scripts/create-rule.js index <HASH>..<HASH> 100755 --- a/scripts/create-rule.js +++ b/scripts/create-rule.js @@ -14,6 +14,14 @@ const rulePath = path.resolve(`src/rules/${ruleName}.js`); const testPath = path.resolve(`__tests__/src/rules/${ruleName}-test.js`); const docsPath = path.resolve(`docs/rules/${ruleName}.md`); +const jscodeshiftJSON = require('jscodeshift/package.json'); +const jscodeshiftMain = jscodeshiftJSON.main; +const jscodeshiftPath = require.resolve('jscodeshift'); +const jscodeshiftRoot = jscodeshiftPath.slice( + 0, + jscodeshiftPath.indexOf(jscodeshiftMain) +); + // Validate if (!ruleName) { throw new Error('Rule name is required'); @@ -34,8 +42,8 @@ fs.writeFileSync(docsPath, docBoilerplate); // Add the rule to the index exec([ path.join( - require.resolve('jscodeshift'), - require('jscodeshift/package.json').bin.jscodeshift + jscodeshiftRoot, + jscodeshiftJSON.bin.jscodeshift ), './src/index.js', '-t ./scripts/addRuleToIndex.js',
Keep forgetting this is Git and not Mercurial.
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -943,12 +943,11 @@ module ActionDispatch DEFAULT_ACTIONS = [:show, :create, :update, :destroy, :new, :edit] def initialize(entities, options) + super + @as = nil - @name = entities.to_s - @path = (options[:path] || @name).to_s @controller = (options[:controller] || plural).to_s @as = options[:as] - @options = options end def plural
Make use of the inherited initializer.
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,7 +14,7 @@ module.exports = function (grunt) { }, jshint: { - all: ['Gruntfile.js', '*.js', 'test/**/*.js'], + all: ['Gruntfile.js', '*.js', 'test/**/*.js', '!*.min.js'], options: { jshintrc: '.jshintrc' }
Excluded the moment-jdateformatparser.min.js file from the jshint task.
diff --git a/src/WP_CLI/SaltsCommand.php b/src/WP_CLI/SaltsCommand.php index <HASH>..<HASH> 100644 --- a/src/WP_CLI/SaltsCommand.php +++ b/src/WP_CLI/SaltsCommand.php @@ -46,7 +46,7 @@ class SaltsCommand extends Command exit; } - $skipped = $updated->pluck('skipped'); + $skipped = $updated->pluck('skipped')->filter(); $set = $salts->count() - $skipped->count(); if ($set === count($salts)) { @@ -55,7 +55,7 @@ class SaltsCommand extends Command WP_CLI::success("$set salts set."); } - if ($skipped) { + if (! $skipped->isEmpty()) { WP_CLI::line('Some keys were already defined in the environment file.'); WP_CLI::line("Use 'dotenv salts regenerate' to update them."); }
fix skipped check in `salts generate`
diff --git a/fedora_messaging/cli.py b/fedora_messaging/cli.py index <HASH>..<HASH> 100644 --- a/fedora_messaging/cli.py +++ b/fedora_messaging/cli.py @@ -76,6 +76,7 @@ def cli(conf): config.conf.load_config(filename=conf) except ValueError as e: raise click.exceptions.BadParameter(e) + config.conf.setup_logging() @cli.command() diff --git a/fedora_messaging/config.py b/fedora_messaging/config.py index <HASH>..<HASH> 100644 --- a/fedora_messaging/config.py +++ b/fedora_messaging/config.py @@ -388,10 +388,14 @@ class LazyConfig(dict): self.load_config() return super(LazyConfig, self).update(*args, **kw) + def setup_logging(self): + if not self.loaded: + self.load_config() + logging.config.dictConfig(self['log_config']) + def load_config(self, filename=None): self.loaded = True self.update(load(filename=filename)) - logging.config.dictConfig(self['log_config']) return self
Don't automatically setup logging on config load Otherwise it may overwrite logging when the config object is used from client applications.
diff --git a/docs/templates.rb b/docs/templates.rb index <HASH>..<HASH> 100644 --- a/docs/templates.rb +++ b/docs/templates.rb @@ -23,6 +23,19 @@ module TagTemplateHelper h(prefix + tag.name) end + def url_for(*args) + if object.is_a?(CodeObjects::Base) && + (object.tag('yard.tag') || object.tag('yard.directive')) + obj, self.object = object, Registry.root + url = super + self.object = obj + url + else + super + end + end + alias url_for_file url_for + def linkify(*args) if args.first.is_a?(String) case args.first
Update url_for to link from relative root when listing a tag/directive object
diff --git a/go/libkb/secret_store_secretservice.go b/go/libkb/secret_store_secretservice.go index <HASH>..<HASH> 100644 --- a/go/libkb/secret_store_secretservice.go +++ b/go/libkb/secret_store_secretservice.go @@ -20,7 +20,7 @@ import ( "golang.org/x/crypto/hkdf" ) -const sessionOpenTimeout = 10 * time.Millisecond +const sessionOpenTimeout = 5 * time.Second type SecretStoreRevokableSecretService struct{}
increase timeout on dbus connection to secretservice (#<I>)
diff --git a/alphatwirl/concurrently/HTCondorJobSubmitter.py b/alphatwirl/concurrently/HTCondorJobSubmitter.py index <HASH>..<HASH> 100755 --- a/alphatwirl/concurrently/HTCondorJobSubmitter.py +++ b/alphatwirl/concurrently/HTCondorJobSubmitter.py @@ -295,9 +295,9 @@ def submit_jobs(job_desc, cwd=None): return clusterprocids ##__________________________________________________________________|| -def query_status_for(ids, n_at_a_time=500): +def query_status_for(clusterids, n_at_a_time=500): - ids_split = split_ids(ids, n=n_at_a_time) + ids_split = split_ids(clusterids, n=n_at_a_time) stdout = [ ] for ids_sub in ids_split: procargs = ['condor_q'] + ids_sub + ['-format', '%d.', 'ClusterId', '-format', '%d ', 'ProcId', '-format', '%-2s\n', 'JobStatus']
rename ids clusterids in query_status_for()
diff --git a/spec/fake_app/fake_app.rb b/spec/fake_app/fake_app.rb index <HASH>..<HASH> 100644 --- a/spec/fake_app/fake_app.rb +++ b/spec/fake_app/fake_app.rb @@ -18,6 +18,7 @@ module ErdApp end end ErdApp::Application.initialize! +ErdApp::Application.routes.draw {} # models class Author < ActiveRecord::Base
Draw mainapp's routes before appending to it in the engine
diff --git a/surrealism/__init__.py b/surrealism/__init__.py index <HASH>..<HASH> 100644 --- a/surrealism/__init__.py +++ b/surrealism/__init__.py @@ -548,6 +548,16 @@ def __replace_random__(_sentence): return _sentence +def __replace_repeat__(_sentence): + """ + HERE BE DRAGONS! + + :param _sentence: + """ + ######### USE SENTENCE_ID 47 for testing! + pass + + def __replace_capitalise__(_sentence): """here we replace all instances of #CAPITALISE and cap the next word. ############
Added skeleton function and changed 1 database record to allow repeating elements.
diff --git a/src/renderer/Renderer.js b/src/renderer/Renderer.js index <HASH>..<HASH> 100644 --- a/src/renderer/Renderer.js +++ b/src/renderer/Renderer.js @@ -434,7 +434,7 @@ export function unsupportedBrowserReasons (canvas, gl, early = false) { if (!canvas) { canvas = document.createElement('canvas'); } - gl = canvas.getContext('webgl'); + gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); } if (!gl) { reasons.push(new CartoRuntimeError(`${crt.WEB_GL} WebGL 1 is unsupported`));
Try to get webgl context for browsers with experimental support
diff --git a/lib/librarian/source/git/repository.rb b/lib/librarian/source/git/repository.rb index <HASH>..<HASH> 100644 --- a/lib/librarian/source/git/repository.rb +++ b/lib/librarian/source/git/repository.rb @@ -127,7 +127,7 @@ module Librarian reference = "#{remote}/#{reference}" end - command = %W(rev-parse #{reference} --quiet) + command = %W(rev-list #{reference} -1) run!(command, :chdir => true).strip end
Let's pretend that annotated tags are just like simple tags.
diff --git a/tests/perf.py b/tests/perf.py index <HASH>..<HASH> 100644 --- a/tests/perf.py +++ b/tests/perf.py @@ -14,7 +14,7 @@ import time from pathlib import Path from .smoke import setup_logger -TEST_DB = Path("test.db") +TEST_DB = Path(":memory:") TARGET = 2.0 RESULTS = {}
Use in-memory db for perf testing
diff --git a/fastlane_core/lib/fastlane_core/version.rb b/fastlane_core/lib/fastlane_core/version.rb index <HASH>..<HASH> 100644 --- a/fastlane_core/lib/fastlane_core/version.rb +++ b/fastlane_core/lib/fastlane_core/version.rb @@ -1,3 +1,3 @@ module FastlaneCore - VERSION = "0.50.1".freeze + VERSION = "0.50.2".freeze end
[fastlane_core] Version bump (#<I>) * Implement common Logs directory in FastlaneCore (#<I>) * Update commander dependency
diff --git a/Classes/Log/Reader/ConjunctionReader.php b/Classes/Log/Reader/ConjunctionReader.php index <HASH>..<HASH> 100644 --- a/Classes/Log/Reader/ConjunctionReader.php +++ b/Classes/Log/Reader/ConjunctionReader.php @@ -132,7 +132,7 @@ class ConjunctionReader implements ReaderInterface $logs = array_merge($logs, $reader->findByFilter($filter)); } $orderField = GeneralUtility::underscoredToUpperCamelCase($filter->getOrderField()); - $direction = 'ASC' === $filter->getOrderDirection() ? -1 : 1; + $direction = Filter::SORTING_ASC === $filter->getOrderDirection() ? -1 : 1; usort( $logs, function ($left, $right) use ($orderField, $direction) {
[REFACTOR] Replace external use of string by class constant
diff --git a/src/mixins/click-awayable.js b/src/mixins/click-awayable.js index <HASH>..<HASH> 100644 --- a/src/mixins/click-awayable.js +++ b/src/mixins/click-awayable.js @@ -14,16 +14,8 @@ module.exports = { }, _checkClickAway: function(e) { - var el; - if (this.refs.hasOwnProperty("root")) { - el = React.findDOMNode(this.refs.root); - } else { - var message = 'Please set your outermost component\'s ref to \'root\' ' + - 'when using ClickAwayable.'; - console.warn(message); - el = this.getDOMNode(); - } - + var el = React.findDOMNode(this); + // Check if the target is inside the current component if (this.isMounted() && e.target != el &&
[Refactor] Removes unnecessary check in ClickAwayable.js
diff --git a/tests/test_api.py b/tests/test_api.py index <HASH>..<HASH> 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -206,6 +206,7 @@ class TestHttpRunner(ApiServerUnittest): log_file_path = os.path.join(os.getcwd(), 'reports', "test_log_file.log") runner = HttpRunner(failfast=True, log_file=log_file_path) runner.run(self.testcase_cli_path) + time.sleep(1) self.assertTrue(os.path.isfile(log_file_path)) os.remove(log_file_path)
fix: sleep 1 sec to wait log handler
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -65,6 +65,7 @@ setup( 'spamhaus whitelist blacklist'), tests_require=tests_require, extras_require={ - 'test': tests_require + 'test': tests_require, + 'dev-tools': ['pylint', 'restview'] }, )
Add dev-tools extras to distribution package
diff --git a/lib/neo4j/session.rb b/lib/neo4j/session.rb index <HASH>..<HASH> 100644 --- a/lib/neo4j/session.rb +++ b/lib/neo4j/session.rb @@ -95,9 +95,14 @@ module Neo4j # # @see also Neo4j::Server::CypherSession#open for :server_db params # @param db_type the type of database, e.g. :embedded_db, or :server_db + # @param [String] endpoint_url The path to the server, either a URL or path to embedded DB + # @param [Hash] params Additional configuration options def open(db_type = :server_db, endpoint_url = nil, params = {}) validate_session_num!(db_type) - register(create_session(db_type, endpoint_url, params), params[:name], params[:default]) + name = params[:name] + default = params[:default] + [:name, :default].each { |k| params.delete(k) } + register(create_session(db_type, endpoint_url, params), name, default) end # @private
remove name and default keys from params hash
diff --git a/Manager/PathManager.php b/Manager/PathManager.php index <HASH>..<HASH> 100644 --- a/Manager/PathManager.php +++ b/Manager/PathManager.php @@ -348,7 +348,7 @@ class PathManager } } - $this->em->flush(); + //$this->em->flush(); // récursivité sur les enfants possibles. $this->JSONParser($step->children, $user, $workspace, $pathsDirectory, $lvl+1, $currentStep->getId(), 0, $path, $stepsToNotDelete, $excludedResourcesToResourceNodes); }
[PathBundle] Test fix : The EntityManager should not be flushed within a loop - seems to be ok
diff --git a/lib/find_process.js b/lib/find_process.js index <HASH>..<HASH> 100644 --- a/lib/find_process.js +++ b/lib/find_process.js @@ -136,11 +136,12 @@ const finders = { if ('pid' in cond) { return row.ProcessId === String(cond.pid) } else if (cond.name) { + const rowName = row.Name || '' // fix #40 if (cond.strict) { - return row.Name === cond.name || (row.Name.endsWith('.exe') && row.Name.slice(0, -4) === cond.name) + return rowName === cond.name || (rowName.endsWith('.exe') && rowName.slice(0, -4) === cond.name) } else { // fix #9 - return matchName(row.CommandLine || row.Name, cond.name) + return matchName(row.CommandLine || rowName, cond.name) } } else { return true @@ -152,7 +153,7 @@ const finders = { // uid: void 0, // gid: void 0, bin: row.ExecutablePath, - name: row.Name, + name: row.Name || '', cmd: row.CommandLine })) resolve(list)
fix: fix undefined issue #<I>
diff --git a/Cli/Collect.php b/Cli/Collect.php index <HASH>..<HASH> 100644 --- a/Cli/Collect.php +++ b/Cli/Collect.php @@ -13,14 +13,14 @@ use Praxigento\BonusReferral\Service\Bonus\Collect\Request as ARequest; class Collect extends \Praxigento\Core\App\Cli\Cmd\Base { - /** @var \Praxigento\Core\App\Transaction\Database\IManager */ + /** @var \Praxigento\Core\App\Api\Repo\Transaction\Manager */ private $manTrans; /** @var \Praxigento\BonusReferral\Service\Bonus\Collect */ private $servCollect; public function __construct( \Magento\Framework\ObjectManagerInterface $manObj, - \Praxigento\Core\App\Transaction\Database\IManager $manTrans, + \Praxigento\Core\App\Api\Repo\Transaction\Manager $manTrans, \Praxigento\BonusReferral\Service\Bonus\Collect $servCollect ) { parent::__construct(
MOBI-<I> Clean up business transaction and order DB transaction
diff --git a/pyvisa-py/tcpip.py b/pyvisa-py/tcpip.py index <HASH>..<HASH> 100644 --- a/pyvisa-py/tcpip.py +++ b/pyvisa-py/tcpip.py @@ -93,7 +93,7 @@ class TCPIPSession(Session): if term_char: flags = vxi11.OP_FLAG_TERMCHAR_SET - term_char = str(self.term_char).encode('utf-8')[0] + term_char = str(term_char).encode('utf-8')[0] read_data = b''
Fixes termchar in tcpip
diff --git a/lib/state_machine/event.rb b/lib/state_machine/event.rb index <HASH>..<HASH> 100644 --- a/lib/state_machine/event.rb +++ b/lib/state_machine/event.rb @@ -190,7 +190,7 @@ module StateMachine if transition = transition_for(object) transition.perform(*args) else - machine.invalidate(object, machine.attribute, :invalid_transition, [[:event, name]]) + machine.invalidate(object, :state, :invalid_transition, [[:event, name]]) false end end
Remove concern about what the machine's attribute is from events
diff --git a/test/crisp-cache-test.js b/test/crisp-cache-test.js index <HASH>..<HASH> 100644 --- a/test/crisp-cache-test.js +++ b/test/crisp-cache-test.js @@ -208,7 +208,6 @@ describe("Get - Advanced", function () { assert.notEqual(crispCacheBasic.cache['a'].staleTtl, crispCacheBasic.cache['b'].staleTtl); done(); }); - done(); }); }); @@ -231,7 +230,6 @@ describe("Get - Advanced", function () { assert.notEqual(crispCacheBasic.cache['a'].expiresTtl, crispCacheBasic.cache['b'].expiresTtl); done(); }); - done(); }); }); @@ -255,7 +253,6 @@ describe("Get - Advanced", function () { assert.notEqual(crispCacheBasic.cache['a'].expiresTtl, crispCacheBasic.cache['b'].expiresTtl); done(); }); - done(); }); }); });
FIX - Dones being called too early in tests.
diff --git a/tests/testitems.py b/tests/testitems.py index <HASH>..<HASH> 100644 --- a/tests/testitems.py +++ b/tests/testitems.py @@ -38,7 +38,8 @@ class ItemTestCase(InventoryBaseTestCase): # Since sim names are generated by Valve we'll test against those for consistency sim_inv = sim.inventory(sim.inventory_context(self.TEST_ID64)[440], self.TEST_ID64) # steamodd adds craft numbers to all names, valve doesn't, so they should be stripped - cn_exp = re.compile(r" #\d+$") + # steamodd doesn't add crate series to names, valve does, so they should be stripped as well + cn_exp = re.compile(r" (?:Series )?#\d+$") sim_names = set() for item in sim_inv:
Strip another Valve-ism in item names Valve appends the crate series to crate names, we don't.
diff --git a/src/touch.js b/src/touch.js index <HASH>..<HASH> 100644 --- a/src/touch.js +++ b/src/touch.js @@ -10,7 +10,7 @@ if (xDelta >= yDelta) { return (x1 - x2 > 0 ? 'Left' : 'Right'); } else { - return (y1 - y2 > 0 ? 'Down' : 'Up'); + return (y1 - y2 > 0 ? 'Up' : 'Down'); } }
Corrected direction for vertical swipe.
diff --git a/src/sos/docker/client.py b/src/sos/docker/client.py index <HASH>..<HASH> 100644 --- a/src/sos/docker/client.py +++ b/src/sos/docker/client.py @@ -371,9 +371,10 @@ class SoS_DockerClient: se.close() if ret != 0: - msg = 'The script has been saved to .sos/{}. To reproduce the error please run:\n``{}``'.format( - tempscript, cmd.replace(tempdir, os.path.abspath('./.sos'))) - shutil.copy(os.path.join(tempdir, tempscript), '.sos') + debug_script_dir = os.path.join(env.exec_dir, '.sos') + msg = 'The script has been saved to {}/{}. To reproduce the error please run:\n``{}``'.format( + debug_script_dir, tempscript, cmd.replace(tempdir, debug_script_dir)) + shutil.copy(os.path.join(tempdir, tempscript), debug_script_dir) if ret == 125: raise RuntimeError('Docker daemon failed (exitcode=125). ' + msg) elif ret == 126:
Save debug script to exec_dir, not user workdir
diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php index <HASH>..<HASH> 100644 --- a/plugins/Live/Controller.php +++ b/plugins/Live/Controller.php @@ -133,7 +133,7 @@ class Controller extends \Piwik\Plugin\Controller )); $view->visitData = $visits->getFirstRow()->getColumns(); $view->visitReferralSummary = VisitorProfile::getReferrerSummaryForVisit($visits->getFirstRow()); - $view->showLocation = true; + $view->showLocation = \Piwik\Plugin\Manager::getInstance()->isPluginLoaded('UserCountry'); $this->setWidgetizedVisitorProfileUrl($view); $view->exportLink = $this->getVisitorProfileExportLink(); return $view->render();
Check if UserCountry plugin is activated before showing location data
diff --git a/lib/puppet/config.rb b/lib/puppet/config.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/config.rb +++ b/lib/puppet/config.rb @@ -299,7 +299,7 @@ class Config case value when true, false, "true", "false": klass = CBoolean - when /^\$/, /^\//: + when /^\$\w+\//, /^\//: klass = CFile when String, Integer, Float: # nothing klass = CElement @@ -823,7 +823,7 @@ Generated on #{Time.now}. obj[:loglevel] = "debug" if self.section - obj.tags = ["puppet", "configuration", self.section] + obj.tags += ["puppet", "configuration", self.section, self.name] end objects << obj objects
Fixing weird cases where configs might think non-files could be files git-svn-id: <URL>
diff --git a/src-gwt/org/opencms/ade/sitemap/client/CmsSitemapTreeItem.java b/src-gwt/org/opencms/ade/sitemap/client/CmsSitemapTreeItem.java index <HASH>..<HASH> 100644 --- a/src-gwt/org/opencms/ade/sitemap/client/CmsSitemapTreeItem.java +++ b/src-gwt/org/opencms/ade/sitemap/client/CmsSitemapTreeItem.java @@ -540,7 +540,7 @@ public class CmsSitemapTreeItem extends CmsLazyTreeItem { public boolean isDropEnabled() { CmsClientSitemapEntry entry = getSitemapEntry(); - return entry.isEditable() && entry.isInNavigation() && entry.isFolderType() && super.isDropEnabled(); + return !entry.hasForeignFolderLock() && entry.isInNavigation() && entry.isFolderType() && super.isDropEnabled(); } /**
Fixed wrong permission check in sitemap editor which caused problems with drag and drop.
diff --git a/src/jsep.js b/src/jsep.js index <HASH>..<HASH> 100644 --- a/src/jsep.js +++ b/src/jsep.js @@ -178,7 +178,13 @@ gobbleSpaces(); var biop, to_check = expr.substr(index, max_binop_len), tc_len = to_check.length; while(tc_len > 0) { - if(binary_ops.hasOwnProperty(to_check)) { + // Don't accept a binary op when it is an identifier. + // Binary ops that start with a identifier-valid character must be followed + // by a non identifier-part valid character + if(binary_ops.hasOwnProperty(to_check) && ( + !isIdentifierStart(exprICode(index)) || + (index+to_check.length< expr.length && !isIdentifierPart(exprICode(index+to_check.length))) + )) { index += tc_len; return to_check; } @@ -283,7 +289,7 @@ return gobbleVariable(); } } - + return false; }, // Parse simple numeric literals: `12`, `3.4`, `.5`. Do this by using a string to
Fix binary ops as identifiers bug
diff --git a/packages/now-cli/test/integration.js b/packages/now-cli/test/integration.js index <HASH>..<HASH> 100644 --- a/packages/now-cli/test/integration.js +++ b/packages/now-cli/test/integration.js @@ -2189,6 +2189,11 @@ test('should prefill "project name" prompt with folder name', async t => { ); now.stdin.write('\n'); + await waitForPrompt(now, chunk => + chunk.includes('Want to override the settings?') + ); + now.stdin.write('no\n'); + const output = await now; t.is(output.exitCode, 0, formatOutput(output)); }); @@ -2244,6 +2249,11 @@ test('should prefill "project name" prompt with --name', async t => { ); now.stdin.write('\n'); + await waitForPrompt(now, chunk => + chunk.includes('Want to override the settings?') + ); + now.stdin.write('no\n'); + const output = await now; t.is(output.exitCode, 0, formatOutput(output)); }); @@ -2300,6 +2310,11 @@ test('should prefill "project name" prompt with now.json `name`', async t => { ); now.stdin.write('\n'); + await waitForPrompt(now, chunk => + chunk.includes('Want to override the settings?') + ); + now.stdin.write('no\n'); + const output = await now; t.is(output.exitCode, 0, formatOutput(output));
Fix now cli breaking tests (#<I>)
diff --git a/telebot/types.py b/telebot/types.py index <HASH>..<HASH> 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -754,23 +754,28 @@ class InlineQuery(JsonDeserializable): obj = cls.check_json(json_type) id = obj['id'] from_user = User.de_json(obj['from']) + location = None + if 'location' in obj: + location = Location.de_json(obj['location']) query = obj['query'] offset = obj['offset'] - return cls(id, from_user, query, offset) + return cls(id, from_user, location, query, offset) - def __init__(self, id, from_user, query, offset): + def __init__(self, id, from_user, location, query, offset): """ This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. :param id: string Unique identifier for this query :param from_user: User Sender + :param location: Sender location, only for bots that request user location :param query: String Text of the query :param offset: String Offset of the results to be returned, can be controlled by the bot :return: InlineQuery Object """ self.id = id self.from_user = from_user + self.location = location self.query = query self.offset = offset
Fix missing location object in InlineQuery.
diff --git a/middleman-core/lib/middleman-core/sources.rb b/middleman-core/lib/middleman-core/sources.rb index <HASH>..<HASH> 100644 --- a/middleman-core/lib/middleman-core/sources.rb +++ b/middleman-core/lib/middleman-core/sources.rb @@ -168,7 +168,6 @@ module Middleman Contract Symbol, String, Maybe[Bool] => Maybe[SourceFile] def find(type, path, glob=false) watchers - .lazy .select { |d| d.type == type } .map { |d| d.find(path, glob) } .reject { |d| d.nil? } @@ -183,7 +182,6 @@ module Middleman Contract Symbol, String => Bool def exists?(type, path) watchers - .lazy .select { |d| d.type == type } .any? { |d| d.exists?(path) } end @@ -196,7 +194,6 @@ module Middleman Contract Symbol, String => Maybe[HANDLER] def watcher_for_path(type, path) watchers - .lazy .select { |d| d.type == type } .find { |d| d.exists?(path) } end
Lazy isn't in <I> :(
diff --git a/src/Command/ImportCommand.php b/src/Command/ImportCommand.php index <HASH>..<HASH> 100644 --- a/src/Command/ImportCommand.php +++ b/src/Command/ImportCommand.php @@ -70,6 +70,11 @@ class ImportCommand extends AbstractCommand */ private function checkZipFile($archive) { + if (!extension_loaded('zip')) + { + throw new \RuntimeException('Zip extension is not loaded'); + } + $zip = zip_open($archive); if (!\is_resource($zip))
Check if Zip extension is loaded.
diff --git a/Tests/ArrayHelperTest.php b/Tests/ArrayHelperTest.php index <HASH>..<HASH> 100644 --- a/Tests/ArrayHelperTest.php +++ b/Tests/ArrayHelperTest.php @@ -409,6 +409,21 @@ class ArrayHelperTest extends PHPUnit_Framework_TestCase '2000' => 'Refurbished', '2500' => 'Refurbished' ) + ), + 'Case 3' => array( + // Input + array( + 'New' => array(1000, 1500, 1750), + 'valueNotAnArray' => 2750, + 'withNonScalarValue' => array(2000, array(1000 , 3000)) + ), + // Expected + array( + '1000' => 'New', + '1500' => 'New', + '1750' => 'New', + '2000' => 'withNonScalarValue' + ) ) ); } @@ -1682,5 +1697,8 @@ class ArrayHelperTest extends PHPUnit_Framework_TestCase // Search case insenitive. $this->assertEquals('email', ArrayHelper::arraySearch('FOOBAR', $array, false)); + + // Search non existent value. + $this->assertEquals(false, ArrayHelper::arraySearch('barfoo', $array)); } }
Add assertion for arraysearch method in UT.
diff --git a/Plugin.php b/Plugin.php index <HASH>..<HASH> 100644 --- a/Plugin.php +++ b/Plugin.php @@ -80,7 +80,7 @@ class Plugin extends PluginBase if (!$preview) return $input; - return preg_replace('|\<img alt="([0-9]+)" src="image" \/>|m', + return preg_replace('|\<img src="image" alt="([0-9]+)"([^>]*)\/>|m', '<span class="image-placeholder" data-index="$1"> <span class="dropzone"> <span class="label">Click or drop an image...</span>
Fix for change to php-markdown
diff --git a/spec/routing_hook_spec.rb b/spec/routing_hook_spec.rb index <HASH>..<HASH> 100644 --- a/spec/routing_hook_spec.rb +++ b/spec/routing_hook_spec.rb @@ -68,7 +68,7 @@ describe "Routing hooks" do describe "/faye" do - let(:routes) { Dummy::Application.routes.routes.select { |v| v.path =~ /^\/faye_without_extension.*$/ } } + let(:routes) { Dummy::Application.routes.routes.select { |v| v.name =~ /^faye_without_extension.*$/ } } let(:client) { Faye::Client.new("http://localhost:3000/faye_without_extension") } it_should_behave_like "an automatically added route" @@ -77,7 +77,7 @@ describe "Routing hooks" do end describe "/faye_with_extension" do - let(:routes) { Dummy::Application.routes.routes.select { |v| v.path =~ /^\/faye_with_extension.*$/ } } + let(:routes) { Dummy::Application.routes.routes.select { |v| v.name =~ /^faye_with_extension.*$/ } } let(:client) { Faye::Client.new("http://localhost:3000/faye_with_extension") } it_should_behave_like "an automatically added route"
Fixes two additional specs. Fixes "should only be one route" Fixes "should route to FayeRails::RackAdapter"
diff --git a/locale/af.js b/locale/af.js index <HASH>..<HASH> 100644 --- a/locale/af.js +++ b/locale/af.js @@ -1,4 +1,4 @@ -$.fullCalendar.locale("fr", { +$.fullCalendar.locale("af", { buttonText: { year: "Jaar", month: "Maand",
Update af.js forgot to change language short name in file
diff --git a/src/feat/test/dummies.py b/src/feat/test/dummies.py index <HASH>..<HASH> 100644 --- a/src/feat/test/dummies.py +++ b/src/feat/test/dummies.py @@ -111,7 +111,7 @@ class DummyAgent(DummyBase): self._delayed_calls = dict() def reset(self): - self.protocols = list() + del self.protocols[:] DummyBase.reset(self) def get_database(self):
Fix reseting protocols of DummyMedium.
diff --git a/apiserver/facades/client/charmhub/convert.go b/apiserver/facades/client/charmhub/convert.go index <HASH>..<HASH> 100644 --- a/apiserver/facades/client/charmhub/convert.go +++ b/apiserver/facades/client/charmhub/convert.go @@ -103,6 +103,7 @@ func transformChannelMap(channelMap []transport.ChannelMap) ([]string, map[strin channels := make(map[string]params.Channel, len(channelMap)) for _, cm := range channelMap { ch := cm.Channel + // Per the charmhub/snap channel spec. if ch.Track == "" { ch.Track = "latest" }
add coment to change of empty string to latest
diff --git a/pylisp/packet/lisp/control/map_referral.py b/pylisp/packet/lisp/control/map_referral.py index <HASH>..<HASH> 100644 --- a/pylisp/packet/lisp/control/map_referral.py +++ b/pylisp/packet/lisp/control/map_referral.py @@ -122,7 +122,7 @@ class LISPMapReferralMessage(LISPControlMessage): # Add the records for record in self.records: - bitstream += record.to_bytes() + bitstream += record.to_bitstream() return bitstream.bytes
Fix bug in MapReferral packet building
diff --git a/iptables.go b/iptables.go index <HASH>..<HASH> 100644 --- a/iptables.go +++ b/iptables.go @@ -166,5 +166,10 @@ func Raw(args ...string) ([]byte, error) { return nil, fmt.Errorf("iptables failed: iptables %v: %s (%s)", strings.Join(args, " "), output, err) } + // ignore iptables' message about xtables lock + if strings.Contains(string(output), "waiting for it to exit") { + output = []byte("") + } + return output, err }
pkg/iptables: * do not consider iptables' output an error in case of xtables lock Docker-DCO-<I>-
diff --git a/tests/test_renderengine.py b/tests/test_renderengine.py index <HASH>..<HASH> 100644 --- a/tests/test_renderengine.py +++ b/tests/test_renderengine.py @@ -317,6 +317,24 @@ class RenderTests(unittest.TestCase): self._assert_render(expected, '{{=$ $=}} {{foo}} ') self._assert_render(expected, '{{=$ $=}} {{foo}} $={{ }}=$') # was yielding u' '. + def test_section__output_not_interpolated(self): + """ + Check that rendered section output is not interpolated. + + """ + template = '{{#section}}{{template}}{{/section}}: {{planet}}' + context = {'section': True, 'template': '{{planet}}', 'planet': 'Earth'} + self._assert_render(u'{{planet}}: Earth', template, context) + + def test_section__context_precedence(self): + """ + Check that items higher in the context stack take precedence. + + """ + template = '{{entree}} : {{#vegetarian}}{{entree}}{{/vegetarian}}' + context = {'entree': 'chicken', 'vegetarian': {'entree': 'beans and rice'}} + self._assert_render(u'chicken : beans and rice', template, context) + def test_sections__nested_truthy(self): """ Check that "nested truthy" sections get rendered.
Added two rendering test cases re: sections. The two test cases test, respectively, (1) context precedence and (2) that section output not be rendered. The two test cases were originally proposed for inclusion in the Mustache spec test cases in mustache/spec issues #<I> and #<I>: * <URL>
diff --git a/alignak/objects/realm.py b/alignak/objects/realm.py index <HASH>..<HASH> 100644 --- a/alignak/objects/realm.py +++ b/alignak/objects/realm.py @@ -216,7 +216,6 @@ class Realm(Itemgroup): :type member: list :return: None """ - print("Realm, add sub member: %s" % member) self.all_sub_members.extend(member) def get_realm_members(self):
Clean the configuration dispatcher log and ping attempts
diff --git a/version/version.go b/version/version.go index <HASH>..<HASH> 100644 --- a/version/version.go +++ b/version/version.go @@ -17,5 +17,5 @@ package version var ( - Version = "0.5.0-alpha.1" + Version = "0.5.0-alpha.2" )
version: bump to alpha<I>
diff --git a/app/ui/components/editors/environment-editor.js b/app/ui/components/editors/environment-editor.js index <HASH>..<HASH> 100644 --- a/app/ui/components/editors/environment-editor.js +++ b/app/ui/components/editors/environment-editor.js @@ -54,11 +54,13 @@ class EnvironmentEditor extends React.PureComponent<Props, State> { } } - this.props.didChange(); - // Call this last in case component unmounted if (this.state.error !== error || this.state.warning !== warning) { - this.setState({error, warning}); + this.setState({error, warning}, () => { + this.props.didChange(); + }); + } else { + this.props.didChange(); } }
Minor fix for environment editor not saving right after error
diff --git a/montblanc/impl/rime/v5/CompositeRimeSolver.py b/montblanc/impl/rime/v5/CompositeRimeSolver.py index <HASH>..<HASH> 100644 --- a/montblanc/impl/rime/v5/CompositeRimeSolver.py +++ b/montblanc/impl/rime/v5/CompositeRimeSolver.py @@ -249,7 +249,7 @@ class CompositeRimeSolver(MontblancNumpySolver): nsrc, npsrc, ngsrc, nssrc, ... """ src_nr_var_counts = mbu.sources_to_nr_vars( - self._slvr_cfg[Options.SOURCES]) + self.config()[Options.SOURCES]) src_nr_vars = mbu.source_nr_vars() nsrc = self.dim_local_size(Options.NSRC) diff --git a/montblanc/solvers/rime_solver.py b/montblanc/solvers/rime_solver.py index <HASH>..<HASH> 100644 --- a/montblanc/solvers/rime_solver.py +++ b/montblanc/solvers/rime_solver.py @@ -182,6 +182,10 @@ class RIMESolver(HyperCube): return D + def config(self): + """ Returns the configuration dictionary for this solver """ + return self._slvr_cfg + def register_array(self, name, shape, dtype, **kwargs): """ Register an array with this Solver object.
Add a config() member to RIMESolver Returns the solver configuration dictionary
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,21 @@ -var PropTypes = require('../prop-types'); +// ------------------------------------------------ +// load original React prop-types +// ------------------------------------------------ +var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; + +var isValidElement = function(object) { + return typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE; +}; +var throwOnDirectAccess = true; +var PropTypes = require('../prop-types/factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); +// ------------------------------------------------ +// ------------------------------------------------ +// ------------------------------------------------ var AxePropTypes = {};
fixed: load react's dev prop-types instead of the prod empty one
diff --git a/api.php b/api.php index <HASH>..<HASH> 100644 --- a/api.php +++ b/api.php @@ -1137,9 +1137,11 @@ class PHP_CRUD_API { protected function applyBeforeHandler(&$action,&$database,&$table,&$ids,&$callback,&$inputs) { if (is_callable($callback,true)) { $max = count($ids)?:count($inputs); - $origaction = $action; + $initials = array('action'=>$action,'database'=>$database,'table'=>$table); for ($i=0;$i<$max;$i++) { - $action = $origaction; + $action = $initials['action']; + $database = $initials['database']; + $table = $initials['table']; if (!isset($ids[$i])) $ids[$i] = false; if (!isset($inputs[$i])) $inputs[$i] = false; $callback($action,$database,$table,$ids[$i],$inputs[$i]);
bugfix in line with #<I>
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 @@ -663,6 +663,15 @@ module Discordrb rescue RestClient::BadRequest LOGGER.error('User login failed due to an invalid email or password!') raise + rescue SocketError, RestClient::RequestFailed => e # RequestFailed handles the 52x error codes Cloudflare sometimes sends that aren't covered by specific RestClient classes + if login_attempts && login_attempts > 100 + LOGGER.error("User login failed permanently after #{login_attempts} attempts") + raise + else + LOGGER.error("User login failed! Trying again in 5 seconds, #{100 - login_attempts} remaining") + LOGGER.log_exception(e) + retry + end end def retrieve_token(email, password, token_cache)
Reimplement the rest of the old error code
diff --git a/obdalib-core/src/main/java/it/unibz/krdb/obda/utils/JdbcTypeMapper.java b/obdalib-core/src/main/java/it/unibz/krdb/obda/utils/JdbcTypeMapper.java index <HASH>..<HASH> 100644 --- a/obdalib-core/src/main/java/it/unibz/krdb/obda/utils/JdbcTypeMapper.java +++ b/obdalib-core/src/main/java/it/unibz/krdb/obda/utils/JdbcTypeMapper.java @@ -54,7 +54,7 @@ public class JdbcTypeMapper { sqlToQuest.put(Types.REAL, COL_TYPE.DOUBLE); sqlToQuest.put(Types.DATE, COL_TYPE.DATE); sqlToQuest.put(Types.TIME, COL_TYPE.TIME); - //sqlToQuest.put(Types.TIMESTAMP, COL_TYPE.DATETIME); + sqlToQuest.put(Types.TIMESTAMP, COL_TYPE.DATETIME); //GX: needs check sqlToQuest.put(Types.BOOLEAN, COL_TYPE.BOOLEAN); sqlToQuest.put(Types.BIT, COL_TYPE.BOOLEAN); // typeMapper.put(Types.BINARY, dfac.getDataTypePredicateBinary());
reverts the change in JdbcTypeMapper
diff --git a/version.php b/version.php index <HASH>..<HASH> 100644 --- a/version.php +++ b/version.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die; $module->version = 2011032000; // The current module version (Date: YYYYMMDDXX) -$module->requires = 2010120700; // Requires this Moodle version +$module->requires = 2011070101; // Requires this Moodle version $module->cron = 0; // Period for cron to check this module (secs) $module->component = 'mod_book'; // Full name of the plugin (used for diagnostics)
future versions of mod_book are going to require at least Moodle <I>
diff --git a/taxi/app.py b/taxi/app.py index <HASH>..<HASH> 100755 --- a/taxi/app.py +++ b/taxi/app.py @@ -30,6 +30,20 @@ class ProjectNotFoundError(Exception): def term_unicode(string): return unicode(string, sys.stdin.encoding) +def cat(options, args): + """ + |\ _,,,---,,_ + /,`.-'`' -. ;-;;,_ + |,4- ) )-,_..;\ ( `'-' + '---''(_/--' `-'\_) + + Soft kitty, warm kitty + Little ball of fur + Happy kitty, sleepy kitty + Purr, purr, purr""" + + print(cat.__doc__) + def alias(options, args): """Usage: alias [alias] alias [project_id/activity_id] @@ -656,6 +670,7 @@ def main(): (['autofill'], autofill), (['clean-aliases'], clean_aliases), (['alias'], alias), + (['cat', 'kitty', 'ohai'], cat), ] if len(args) == 0 or (len(args) == 1 and args[0] == 'help'):
add a cat, because everyone loves cats
diff --git a/client/lib/plans/constants.js b/client/lib/plans/constants.js index <HASH>..<HASH> 100644 --- a/client/lib/plans/constants.js +++ b/client/lib/plans/constants.js @@ -1278,16 +1278,14 @@ export const FEATURES_LIST = { getSlug: () => FEATURE_EMAIL_LIVE_CHAT_SUPPORT, getTitle: () => i18n.translate( 'Email & Live Chat Support' ), getDescription: () => - i18n.translate( - 'Hands-on support to help you set up your site ' + 'exactly how you want it.' - ), + i18n.translate( 'Live chat support to help you get started with your site.' ), }, [ FEATURE_PREMIUM_SUPPORT ]: { getSlug: () => FEATURE_PREMIUM_SUPPORT, getTitle: () => i18n.translate( 'Priority Support' ), getDescription: () => - i18n.translate( 'Hands-on support to help you set up your site exactly how you want it.' ), + i18n.translate( 'Live chat support to help you get started with Jetpack.' ), }, [ FEATURE_STANDARD_SECURITY_TOOLS ]: {
Plans - fix Priority support tooltip to be a bit clearer (#<I>) * Plans - fix Priority support tooltip to be a bit clearer
diff --git a/Swat/SwatError.php b/Swat/SwatError.php index <HASH>..<HASH> 100644 --- a/Swat/SwatError.php +++ b/Swat/SwatError.php @@ -241,7 +241,7 @@ class SwatError { ob_start(); - printf("%s Error:\n\nMessage:\n\t%s\n\n". + printf("%s:\n\nMessage:\n\t%s\n\n". "Thrown in file '%s' on line %s.\n\n", $this->getSeverityString(), $this->message,
for text output, use only the severity string for the title instead of always appending 'Error'. svn commit r<I>
diff --git a/Controller/MinifyController.php b/Controller/MinifyController.php index <HASH>..<HASH> 100644 --- a/Controller/MinifyController.php +++ b/Controller/MinifyController.php @@ -70,8 +70,14 @@ class MinifyController extends Controller $file = $base.'/'.$file; } + $baseUrl = $this->get('templating.helper.assets')->getUrl(''); + $_GET = array(); - $_GET['b'] = trim($this->get('templating.helper.assets')->getUrl(''), '/'); + + if ($baseUrl !== '/') { + $_GET['b'] = trim($baseUrl, '/'); + } + $_GET['f'] = implode(',', $files); }
Bugfix: Don't set base url when it's empty
diff --git a/src/infrastructure/InMemoryView.js b/src/infrastructure/InMemoryView.js index <HASH>..<HASH> 100644 --- a/src/infrastructure/InMemoryView.js +++ b/src/infrastructure/InMemoryView.js @@ -122,7 +122,7 @@ module.exports = class InMemoryView { const r = []; for (const entry of this._map.entries()) { - if (filter && filter(entry[1], entry[0])) + if (!filter || filter(entry[1], entry[0])) r.push(entry); }
- fix all view records retrieving w\o filter
diff --git a/lib/reader/jdl_reader.js b/lib/reader/jdl_reader.js index <HASH>..<HASH> 100644 --- a/lib/reader/jdl_reader.js +++ b/lib/reader/jdl_reader.js @@ -27,7 +27,7 @@ function readContent(content) { throw new buildException( exceptions.IllegalArgument, 'The content must be passed.'); } - return pegjsParser.parse(content); + return pegjsParser.parse(filterJDLDirectives(content)); } function checkAllTheFilesAreJDLFiles(files) { @@ -61,3 +61,7 @@ function readFileContent(file) { } return fs.readFileSync(file, 'utf-8').toString(); } + +function filterJDLDirectives(content){ + return content.replace(/^\u0023.*\n?/mg,''); +}
added filter in jdl_reader to prvent jdl_directives form beeing parsed
diff --git a/langserver/langserver_test.go b/langserver/langserver_test.go index <HASH>..<HASH> 100644 --- a/langserver/langserver_test.go +++ b/langserver/langserver_test.go @@ -191,6 +191,7 @@ func TestServer(t *testing.T) { "a.go": "package p; var A int", "a_test.go": `package p; import "test/pkg/b"; var X = b.B; func TestB() {}`, "b/b.go": "package b; var B int; func C() int { return B };", + "c/c.go": `package c; import "test/pkg/b"; var X = b.B;`, }, cases: lspTestCases{ wantHover: map[string]string{ @@ -202,6 +203,7 @@ func TestServer(t *testing.T) { "/src/test/pkg/a_test.go:1:43", "/src/test/pkg/b/b.go:1:16", "/src/test/pkg/b/b.go:1:45", + "/src/test/pkg/c/c.go:1:43", }, "a_test.go:1:41": []string{ "/src/test/pkg/a_test.go:1:19",
references: Larger importgraph for test I was making some manual changes to test incremental importgraph references code. I still need to create automated tests for these changes.