diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -246,7 +246,7 @@ class CrawlKit { let timeoutHandler; const runnerId = next.value[0]; const runner = next.value[1]; - Promise.all([runner.getCompanionFiles() || []].map((filename) => { + Promise.all((runner.getCompanionFiles() || []).map((filename) => { return new Promise((injected, reject) => { scope.page.injectJs(filename, (err) => { if (err) {
fix: companionfiles was always an empty array
diff --git a/loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java b/loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java index <HASH>..<HASH> 100755 --- a/loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java +++ b/loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java @@ -683,7 +683,7 @@ public class CFMLEngineFactory extends CFMLEngineFactorySupport { String sub="bundles/"; String nameAndVersion=symbolicName+"|"+symbolicVersion; String osgiFileName=symbolicName+"-"+symbolicVersion+".jar"; - String pack20Ext=".jar.pack.gz"; + String pack20Ext=".pack.gz"; boolean isPack200=false; // first we look for a exact match
improve performance for looking for bundled bundles
diff --git a/src/Exscript/protocols/SSH2.py b/src/Exscript/protocols/SSH2.py index <HASH>..<HASH> 100644 --- a/src/Exscript/protocols/SSH2.py +++ b/src/Exscript/protocols/SSH2.py @@ -306,7 +306,7 @@ class SSH2(Protocol): data = self.shell.recv(200) if not data: return False - self._receive_cb(data) + self._receive_cb(data, False) self.buffer.append(data) return True
exscript: Fixed bug: Removed newlines in buffer and printed out without.
diff --git a/src/deep-resource/lib/Resource/Exception/SourceNotAvailableException.js b/src/deep-resource/lib/Resource/Exception/SourceNotAvailableException.js index <HASH>..<HASH> 100644 --- a/src/deep-resource/lib/Resource/Exception/SourceNotAvailableException.js +++ b/src/deep-resource/lib/Resource/Exception/SourceNotAvailableException.js @@ -12,6 +12,6 @@ export class SourceNotAvailableException extends Exception { * @param {Action|*} action */ constructor(type, action) { - super(`The ${type} source is not available for ${action.fullName}`); + super(`The ${type} source is not available for the resource '${action.fullName}'`); } }
Fix validation bootstrap and implement request source validation
diff --git a/UrlLinker.php b/UrlLinker.php index <HASH>..<HASH> 100644 --- a/UrlLinker.php +++ b/UrlLinker.php @@ -14,7 +14,7 @@ * Regular expression bits used by htmlEscapeAndLinkUrls() to match URLs. */ $rexProtocol = '(https?://)?'; -$rexDomain = '(?:[-a-zA-Z0-9]{1,63}\.)+[-a-zA-Z0-9]{2,63}'; +$rexDomain = '(?:[-a-zA-Z0-9]{1,63}\.)+[a-zA-Z][-a-zA-Z0-9]{1,62}'; $rexIp = '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'; $rexPort = '(:[0-9]{1,5})?'; $rexPath = '(/[!$-/0-9:;=@_\':;!a-zA-Z\x7f-\xff]*?)?';
UrlLinker: : Don't match TLDs that start with a digit.
diff --git a/lib/jsonapi/active_relation_resource_finder/join_tree.rb b/lib/jsonapi/active_relation_resource_finder/join_tree.rb index <HASH>..<HASH> 100644 --- a/lib/jsonapi/active_relation_resource_finder/join_tree.rb +++ b/lib/jsonapi/active_relation_resource_finder/join_tree.rb @@ -83,7 +83,12 @@ module JSONAPI segment.relationship.resource_types.each do |related_resource_type| related_resource_klass = resource_klass.resource_klass_for(related_resource_type) - if !segment.path_specified_resource_klass? || related_resource_klass == segment.resource_klass + + # If the resource type was specified in the path segment we want to only process the next segments for + # that resource type, otherwise process for all + process_all_types = !segment.path_specified_resource_klass? + + if process_all_types || related_resource_klass == segment.resource_klass related_resource_tree = process_path_to_tree(path_segments.dup, related_resource_klass, default_join_type, default_polymorphic_join_type) node[:resource_klasses][resource_klass][:relationships][segment.relationship].deep_merge!(related_resource_tree) end
Clarify logic for processing polymorphic path segments with resource type
diff --git a/LiSE/LiSE/thing.py b/LiSE/LiSE/thing.py index <HASH>..<HASH> 100644 --- a/LiSE/LiSE/thing.py +++ b/LiSE/LiSE/thing.py @@ -56,12 +56,9 @@ class Thing(Node): return self.name def _getloc(self): - ret = self.engine._things_cache._base_retrieve( - (self.character.name, self.name, *self.engine._btt()) + return self.engine._things_cache.retrieve( + self.character.name, self.name, *self.engine._btt() ) - if isinstance(ret, Exception): - return None - return ret def _validate_node_type(self): try:
Handle errors in Thing._getloc By letting ThingsCache.retrieve do it.
diff --git a/openquake/engine/calculators/hazard/general.py b/openquake/engine/calculators/hazard/general.py index <HASH>..<HASH> 100644 --- a/openquake/engine/calculators/hazard/general.py +++ b/openquake/engine/calculators/hazard/general.py @@ -220,12 +220,16 @@ class BaseHazardCalculator(base.Calculator): trt_model.save() task_no = 0 + tot_sources = 0 for trt_model, block in all_sources.split(self.concurrent_tasks): args = (self.job.id, sitecol, block, trt_model.id, task_no) self._task_args.append(args) yield args task_no += 1 + tot_sources += len(block) + logs.LOG.info('Filtered %d sources for %d TRTs', + tot_sources, len(self.source_collector)) def task_completed(self, result): """
Logged the total number of sources Former-commit-id: <I>a2cf<I>b<I>f<I>f7c<I>d<I>a<I>a9f<I>
diff --git a/mockserver-netty/src/main/java/org/mockserver/dashboard/DashboardWebSocketHandler.java b/mockserver-netty/src/main/java/org/mockserver/dashboard/DashboardWebSocketHandler.java index <HASH>..<HASH> 100644 --- a/mockserver-netty/src/main/java/org/mockserver/dashboard/DashboardWebSocketHandler.java +++ b/mockserver-netty/src/main/java/org/mockserver/dashboard/DashboardWebSocketHandler.java @@ -354,7 +354,7 @@ public class DashboardWebSocketHandler extends ChannelInboundHandlerAdapter impl Description description = activeExpectationsDescriptionProcessor.description(requestMatcher.getExpectation().getHttpRequest(), requestMatcher.getExpectation().getId()); return ImmutableMap.of( "key", requestMatcher.getExpectation().getId(), - "description", description != null ? description : "", + "description", description != null ? description : requestMatcher.getExpectation().getId(), "value", expectationJsonNode ); })
further improved dashboard processing of log when no request is present on the expectation
diff --git a/libnetwork/drivers/overlay/ov_network.go b/libnetwork/drivers/overlay/ov_network.go index <HASH>..<HASH> 100644 --- a/libnetwork/drivers/overlay/ov_network.go +++ b/libnetwork/drivers/overlay/ov_network.go @@ -403,9 +403,10 @@ func (n *network) watchMiss(nlSock *nl.NetlinkSocket) { continue } - if neigh.IP.To16() != nil { + if neigh.IP.To4() == nil { continue } + logrus.Debugf("miss notification for dest IP, %v", neigh.IP.String()) if neigh.State&(netlink.NUD_STALE|netlink.NUD_INCOMPLETE) == 0 { continue
Correct the check in l3 miss handling in overlay driver
diff --git a/docs/tag-defs/index.js b/docs/tag-defs/index.js index <HASH>..<HASH> 100644 --- a/docs/tag-defs/index.js +++ b/docs/tag-defs/index.js @@ -1,14 +1,8 @@ module.exports = [ { - name: 'order', - defaultFn: function(doc) { - return doc.name; - } + name: 'order' }, { - name: 'paramType', - defaultFn: function(doc) { - return doc.name.charAt(0).toUpperCase() + doc.name.substring(1); - } + name: 'paramType' } ];
docs(): make paramType not accidentally be marked
diff --git a/passpie/crypt.py b/passpie/crypt.py index <HASH>..<HASH> 100644 --- a/passpie/crypt.py +++ b/passpie/crypt.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import errno import os import shutil diff --git a/tests/test_crypt.py b/tests/test_crypt.py index <HASH>..<HASH> 100644 --- a/tests/test_crypt.py +++ b/tests/test_crypt.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import os from passpie.crypt import Cryptor, KEY_INPUT @@ -131,3 +132,8 @@ class CryptTests(MockerTestCase): with self.assertRaises(ValueError): cryptor.check(passphrase, ensure=True) + + def test_key_input_format_with_unicode_characters(self): + unicode_string = 'áçéèúü' + + self.assertIsNotNone(KEY_INPUT.format(unicode_string))
Fix unicode character on passphrases when generating keys. Fixes #<I>
diff --git a/plugins/CoreVue/Commands/Build.php b/plugins/CoreVue/Commands/Build.php index <HASH>..<HASH> 100644 --- a/plugins/CoreVue/Commands/Build.php +++ b/plugins/CoreVue/Commands/Build.php @@ -153,6 +153,9 @@ class Build extends ConsoleCommand if ($this->isTypeScriptRaceConditionInOutput($plugin, $concattedOutput)) { $output->writeln("<comment>The TypeScript compiler encountered a race condition when compiling " . "files (files that exist were not found), retrying.</comment>"); + + ++$attempts; + continue; } if ($returnCode != 0 @@ -163,7 +166,7 @@ class Build extends ConsoleCommand $output->writeln(""); } - ++$attempts; + break; } }
fix retry loop in vue:build command (#<I>)
diff --git a/cli/src/main/java/hudson/cli/FullDuplexHttpStream.java b/cli/src/main/java/hudson/cli/FullDuplexHttpStream.java index <HASH>..<HASH> 100644 --- a/cli/src/main/java/hudson/cli/FullDuplexHttpStream.java +++ b/cli/src/main/java/hudson/cli/FullDuplexHttpStream.java @@ -115,8 +115,9 @@ public class FullDuplexHttpStream { private void getData() { try { String base = createCrumbUrlBase(); - crumbName = readData(base+"?xpath=/*/crumbRequestField/text()"); - crumb = readData(base+"?xpath=/*/crumb/text()"); + String[] pair = readData(base + "?xpath=concat(//crumbRequestField,\":\",//crumb)").split(":", 2); + crumbName = pair[0]; + crumb = pair[1]; isValid = true; LOGGER.fine("Crumb data: "+crumbName+"="+crumb); } catch (IOException e) {
More efficient to contact crumbIssuer just once and get both name and value.
diff --git a/src/GDS/Gateway/GoogleAPIClient.php b/src/GDS/Gateway/GoogleAPIClient.php index <HASH>..<HASH> 100644 --- a/src/GDS/Gateway/GoogleAPIClient.php +++ b/src/GDS/Gateway/GoogleAPIClient.php @@ -76,6 +76,24 @@ class GoogleAPIClient extends \GDS\Gateway } /** + * Create a configured Google Client ready for Datastore use, using the JSON service file from Google Dev Console + * + * @param $str_json_file + * @return \Google_Client + */ + public static function createClientFromJson($str_json_file) + { + $obj_client = new \Google_Client(); + $obj_client->setAssertionCredentials($obj_client->loadServiceAccountJson( + $str_json_file, + [\Google_Service_Datastore::DATASTORE, \Google_Service_Datastore::USERINFO_EMAIL] + )); + // App Engine php55 runtime dev server problems... + $obj_client->setClassConfig('Google_Http_Request', 'disable_gzip', TRUE); + return $obj_client; + } + + /** * Put an array of Entities into the Datastore. Return any that need AutoIDs * * @todo Validate support for per-entity Schemas
Method for creating Google_Client objects from the dev console JSON config files
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java index <HASH>..<HASH> 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java @@ -293,7 +293,7 @@ class WebMvcAutoConfigurationTests { this.contextRunner.run((context) -> { assertThat(context).hasSingleBean(LocaleResolver.class); LocaleResolver localeResolver = context.getBean(LocaleResolver.class); - assertThat(((AcceptHeaderLocaleResolver) localeResolver).getDefaultLocale()).isNull(); + assertThat(localeResolver).hasFieldOrPropertyWithValue("defaultLocale", null); }); }
Adapt test to change in Spring Framework snapshots
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ try: except ImportError: on_rtd = True numpy = None + build_ext = None import os
trying to make rtd-working
diff --git a/lib/plugins/muc.js b/lib/plugins/muc.js index <HASH>..<HASH> 100644 --- a/lib/plugins/muc.js +++ b/lib/plugins/muc.js @@ -16,7 +16,8 @@ module.exports = function (client) { room: msg.from, reason: msg.muc.invite.reason, password: msg.muc.password, - thread: msg.muc.invite.thread + thread: msg.muc.invite.thread, + type: 'mediated' }); } if (msg._extensions.muc._extensions.destroyed) { @@ -40,7 +41,8 @@ module.exports = function (client) { room: msg.mucInvite.jid, reason: msg.mucInvite.reason, password: msg.mucInvite.password, - thread: msg.mucInvite.thread + thread: msg.mucInvite.thread, + type: 'direct' }); }
Add invite type to MUC invite events
diff --git a/lib/remi/job.rb b/lib/remi/job.rb index <HASH>..<HASH> 100644 --- a/lib/remi/job.rb +++ b/lib/remi/job.rb @@ -13,7 +13,7 @@ module Remi def define_source(name, type_class, **options) @sources ||= [] - @sources << name + @sources << name unless @sources.include? name define_method(name) do iv_name = instance_variable_get("@#{name}") @@ -26,7 +26,7 @@ module Remi def define_target(name, type_class, **options) @targets ||= [] - @targets << name + @targets << name unless @targets.include? name define_method(name) do iv_name = instance_variable_get("@#{name}")
FIX - Prevents the list of sources and targets for a job from duplicating This would happen when the class file is loaded multiple times in a session.
diff --git a/canmatrix/importsym.py b/canmatrix/importsym.py index <HASH>..<HASH> 100644 --- a/canmatrix/importsym.py +++ b/canmatrix/importsym.py @@ -129,10 +129,16 @@ def importSym(filename, **options): line = line.replace(' ', ' "" ') tempArray = shlex.split(line.strip()) sigName = tempArray[0] - if indexOffset == 1 and tempArray[1][:8] == "unsigned": - is_signed = False - else: + + if indexOffset != 1: is_signed = True + else: + if tempArray[1] == 'unsigned': + is_signed = False + elif tempArray[1] == 'signed': + is_signed = True + else: + raise ValueError('Unknown type \'{}\' found'.format(tempArray[1])) startBit = int(tempArray[indexOffset+1].split(',')[0]) signalLength = int(tempArray[indexOffset+1].split(',')[1])
Error out on unknown variable type
diff --git a/mock_django/query.py b/mock_django/query.py index <HASH>..<HASH> 100644 --- a/mock_django/query.py +++ b/mock_django/query.py @@ -76,6 +76,7 @@ def QuerySetMock(model, *return_value): m.__getitem__.side_effect = make_getitem(m) m.model = model m.get = make_get(m, actual_model) + m.exists.return_value = bool(return_value) # Note since this is a SharedMock, *all* auto-generated child # attributes will have the same side_effect ... might not make
Simple hack for making exists work as expected
diff --git a/bugsy/bug.py b/bugsy/bug.py index <HASH>..<HASH> 100644 --- a/bugsy/bug.py +++ b/bugsy/bug.py @@ -189,7 +189,7 @@ class Bug(object): if key not in self._copy or self._bug[key] != self._copy[key]: changed[key] = self._bug[key] elif key == 'flags': - if sorted(self._bug.get(key, [])) != sorted(self._copy.get(key, [])): + if self._bug.get(key, []) != self._copy.get(key, []): changed[key] = self._bug.get(key, []) else: values_now = set(self._bug.get(key, []))
Raw compare as flag order shouldn't change
diff --git a/java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java b/java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java index <HASH>..<HASH> 100644 --- a/java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java +++ b/java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java @@ -177,6 +177,9 @@ public class SelfRegisteringRemote { LOG.fine("Using the json request : " + registrationRequest.toJson()); Boolean register = registrationRequest.getConfiguration().register; + if (register == null) { + register = false; + } if (!register) { LOG.info("No registration sent ( register = false )");
handle when register is null, don't throw NPE, default to false Fixes #<I>
diff --git a/public/js/gogs.js b/public/js/gogs.js index <HASH>..<HASH> 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -719,7 +719,7 @@ function initEditor() { var val = $editFilename.val(), m, mode, spec, extension, extWithDot, previewLink, dataUrl, apiCall; extension = extWithDot = ""; if (m = /.+\.([^.]+)$/.exec(val)) { - extension = m[1]; + extension = m[1].toLowerCase(); extWithDot = "." + extension; }
public: makes CodeMirror mode by filename lookups case-insensitive (#<I>) * updated the highlight.js plugin * added some explicit mappings for syntax highlighting * public: makes CodeMirror mode by filename extension lookup case-insensitive
diff --git a/interp/interp_test.go b/interp/interp_test.go index <HASH>..<HASH> 100644 --- a/interp/interp_test.go +++ b/interp/interp_test.go @@ -893,6 +893,9 @@ var fileCases = []struct { "char\n", }, {"[[ -t 1234 ]]", "exit status 1"}, // TODO: reliable way to test a positive? + {"[[ -o wrong ]]", "exit status 1"}, + {"[[ -o errexit ]]", "exit status 1"}, + {"set -e; [[ -o errexit ]]", ""}, // classic test { diff --git a/interp/test.go b/interp/test.go index <HASH>..<HASH> 100644 --- a/interp/test.go +++ b/interp/test.go @@ -161,7 +161,13 @@ func (r *Runner) unTest(op syntax.UnTestOperator, x string) bool { return x == "" case syntax.TsNempStr: return x != "" - //case syntax.TsOptSet: + case syntax.TsOptSet: + switch x { + case "errexit": + return r.stopOnCmdErr + default: + return false + } case syntax.TsVarSet: _, e := r.lookupVar(x) return e
interp: implement test's -o For the options we currently support, at least.
diff --git a/cluster/kubernetes/resourcekinds.go b/cluster/kubernetes/resourcekinds.go index <HASH>..<HASH> 100644 --- a/cluster/kubernetes/resourcekinds.go +++ b/cluster/kubernetes/resourcekinds.go @@ -66,6 +66,15 @@ func (pc podController) toClusterController(resourceID flux.ResourceID) cluster. } clusterContainers = append(clusterContainers, resource.Container{Name: container.Name, Image: ref}) } + for _, container := range pc.podTemplate.Spec.Containers { + ref, err := image.ParseRef(container.Image) + if err != nil { + clusterContainers = nil + excuse = err.Error() + break + } + clusterContainers = append(clusterContainers, resource.Container{Name: container.Name, Image: ref}) + } var antecedent flux.ResourceID if ante, ok := pc.GetAnnotations()[AntecedentAnnotation]; ok {
Include initContainers in containers considered
diff --git a/src/Content/CTextFilter.php b/src/Content/CTextFilter.php index <HASH>..<HASH> 100644 --- a/src/Content/CTextFilter.php +++ b/src/Content/CTextFilter.php @@ -158,19 +158,19 @@ class CTextFilter switch ($matches[1]) { case 'FIGURE': - return CTextFilter::ShortCodeFigure($matches[2]); + return CTextFilter::shortCodeFigure($matches[2]); break; case 'BASEURL': - return CTextFilter::ShortCodeBaseurl(); + return CTextFilter::shortCodeBaseurl(); break; case 'RELURL': - return CTextFilter::ShortCodeRelurl(); + return CTextFilter::shortCodeRelurl(); break; case 'ASSET': - return CTextFilter::ShortCodeAsset(); + return CTextFilter::shortCodeAsset(); break; default: @@ -234,7 +234,7 @@ class CTextFilter 'href' => null, 'nolink' => false, ], - CTextFilter::ShortCodeInit($options) + CTextFilter::shortCodeInit($options) ), EXTR_SKIP );
Fixed additional case-insenitive problems
diff --git a/gns3server/server.py b/gns3server/server.py index <HASH>..<HASH> 100644 --- a/gns3server/server.py +++ b/gns3server/server.py @@ -106,7 +106,7 @@ class Server: def _signal_handling(self): - def signal_handler(signame): + def signal_handler(signame, *args): log.warning("Server has got signal {}, exiting...".format(signame)) asyncio.async(self.shutdown_server())
Catch extra args in windows signal handler
diff --git a/src/Illuminate/Contracts/Validation/Validator.php b/src/Illuminate/Contracts/Validation/Validator.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Contracts/Validation/Validator.php +++ b/src/Illuminate/Contracts/Validation/Validator.php @@ -41,7 +41,7 @@ interface Validator extends MessageProvider /** * Get all of the validation error messages. * - * @return array + * @return \Illuminate\Support\MessageBag */ public function errors(); }
[<I>] Fixing the doc comments (#<I>) Fixing the `@return` type for the `Illuminate\Contracts\Validation@errors()` method.
diff --git a/bootstrap.py b/bootstrap.py index <HASH>..<HASH> 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -28,7 +28,7 @@ parser = optparse.OptionParser( "options.\n") parser.add_option('--gui', dest="gui", default=None, help="GUI toolkit: pyqt (for PyQt4) or pyside (for PySide)") -parser.add_option('--hideconsole', dest="hide_console", action='store_true', +parser.add_option('--hide-console', dest="hide_console", action='store_true', default=False, help="Hide parent console (Windows only)") options, args = parser.parse_args() assert options.gui in (None, 'pyqt', 'pyside'), \
bootstrap script: renamed command line option --hideconsole to --hide-console, which is coherent with the --show-console option of Spyder itself.
diff --git a/datajoint/autopopulate.py b/datajoint/autopopulate.py index <HASH>..<HASH> 100644 --- a/datajoint/autopopulate.py +++ b/datajoint/autopopulate.py @@ -81,6 +81,7 @@ class AutoPopulate: jobs = self.connection.jobs[self.target.database] if reserve_jobs else None todo -= self.target.proj() + n_to_populate = len(todo) keys = todo.fetch.keys() if order == "reverse": keys = list(keys) @@ -89,6 +90,7 @@ class AutoPopulate: keys = list(keys) random.shuffle(keys) + logger.info('Found %d keys to populate' % n_to_populate) for key in keys: if not reserve_jobs or jobs.reserve(self.target.table_name, key): self.connection.start_transaction()
Report number of missing keys to be populated
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -23,18 +23,19 @@ var UrlPattern = function(url) { var createPatternObject = function(pattern) { - if (helper.isString(pattern)) { + if (pattern && helper.isString(pattern)) { return helper.isUrlAbsolute(pattern) ? new UrlPattern(pattern) : new Pattern(pattern); } if (helper.isObject(pattern)) { - if (!helper.isDefined(pattern.pattern)) { - log.warn('Invalid pattern %s!\n\tObject is missing "pattern" property".', pattern); - } - - return helper.isUrlAbsolute(pattern.pattern) ? + if (pattern.pattern && helper.isString(pattern.pattern)) { + return helper.isUrlAbsolute(pattern.pattern) ? new UrlPattern(pattern.pattern) : new Pattern(pattern.pattern, pattern.served, pattern.included, pattern.watched); + } + + log.warn('Invalid pattern %s!\n\tObject is missing "pattern" property.', pattern); + return new Pattern(null, false, false, false); } log.warn('Invalid pattern %s!\n\tExpected string or object with "pattern" property.', pattern);
fix(config): ignore empty string patterns An empty string pattern is a mistake - there is no reason to do that. It can however happen (for instance when you generate the config file). Before this fix, Karma would try to watch this empty string pattern, which would result in watching the entire `basePath` directory. Now, the pattern will be ignored and a warning showed.
diff --git a/src/vuex-i18n-plugin.js b/src/vuex-i18n-plugin.js index <HASH>..<HASH> 100644 --- a/src/vuex-i18n-plugin.js +++ b/src/vuex-i18n-plugin.js @@ -312,6 +312,9 @@ VuexI18nPlugin.install = function install(Vue, store, config) { localeExists: checkLocaleExists, keyExists: checkKeyExists, + translate: translate, + translateIn: translateInLanguage, + exists: phaseOutExistsFn }; @@ -332,10 +335,10 @@ VuexI18nPlugin.install = function install(Vue, store, config) { exists: phaseOutExistsFn }; - // register the translation function on the vue instance + // register the translation function on the vue instance directly Vue.prototype.$t = translate; - // register the specific language translation function on the vue instance + // register the specific language translation function on the vue instance directly Vue.prototype.$tlang = translateInLanguage; // register a filter function for translations
add the methods translate and translateIn to the $i<I>n instance object to keep api consistent
diff --git a/src/InputValidation/Form.php b/src/InputValidation/Form.php index <HASH>..<HASH> 100755 --- a/src/InputValidation/Form.php +++ b/src/InputValidation/Form.php @@ -773,7 +773,7 @@ class Form * @param $key string The field name * @return string */ - protected function getFieldCaption($key) + public function getFieldCaption($key) { $caption = $this->getDefinition($key, 'caption'); diff --git a/src/InputValidation/Validator.php b/src/InputValidation/Validator.php index <HASH>..<HASH> 100644 --- a/src/InputValidation/Validator.php +++ b/src/InputValidation/Validator.php @@ -48,6 +48,17 @@ class Validator } /** + * Returns a translated field caption + * + * @param $key string The field name + * @return string + */ + public function getFieldCaption($key) + { + return $this->getForm()->getFieldCaption($key); + } + + /** * @param string $key Field key * @param string $token Text token * @param array $params Text replacements
Bugfix: Added getFieldCaption() to Validator
diff --git a/demo/src/AddressView.js b/demo/src/AddressView.js index <HASH>..<HASH> 100644 --- a/demo/src/AddressView.js +++ b/demo/src/AddressView.js @@ -27,10 +27,29 @@ export default function AddressView(props) { const country = getAddressComponent(address, ['country']); const postalCode = getAddressComponent(address, ['postal_code']); + const room = getAddressComponent(address, ['room']); + const floor = getAddressComponent(address, ['floor']); + const unitNumber = getAddressComponent(address, ['unit_number']); + const unitDesignator = getAddressComponent(address, ['unit_designator']); + + const subunit = room + ? ` room ${room}` + : floor + ? ` floor ${floor}` + : unitDesignator + ? ` ${unitDesignator} ${unitNumber}` + : ''; + + const combinedNumber = + !floor && !room && !unitDesignator && unitNumber + ? `${unitNumber}-${streetNumber}` + : streetNumber; + return ( <div className="address"> <div className="address__line1"> - {streetNumber} {streetName} + {combinedNumber} + {subunit} {streetName} </div> <div className="address__line2"> {city} {provState}
Update demo address view to render unit number and designator
diff --git a/src/terra/Factory/EnvironmentFactory.php b/src/terra/Factory/EnvironmentFactory.php index <HASH>..<HASH> 100644 --- a/src/terra/Factory/EnvironmentFactory.php +++ b/src/terra/Factory/EnvironmentFactory.php @@ -609,4 +609,18 @@ class EnvironmentFactory return false; } } + + /** + * Get the name of the drush alias. + */ + public function getDrushAlias() { + return "@{$this->app->name}.{$this->environment->name}"; + } + + /** + * Get the path to document root + */ + public function getDocumentRoot() { + return $this->environment->path . '/' . $this->config['document_root']; + } }
Adding methods to get drush alias and document root path.
diff --git a/lib/git.js b/lib/git.js index <HASH>..<HASH> 100644 --- a/lib/git.js +++ b/lib/git.js @@ -22,7 +22,7 @@ git.target = path.normalize(target + '/.git/'); git.failure = path.normalize(target + '/.git/hooks/build-failed'); git.success = path.normalize(target + '/.git/hooks/build-worked'); - return path.exists(git.target, function(exists) { + return fs.exists(git.target, function(exists) { if (exists === false) { console.log(("'" + target + "' is not a valid Git repo").red); process.exit(1);
[fix] fs.exists was moved to fs.exists
diff --git a/rinoh/backend/pdf/cos.py b/rinoh/backend/pdf/cos.py index <HASH>..<HASH> 100644 --- a/rinoh/backend/pdf/cos.py +++ b/rinoh/backend/pdf/cos.py @@ -70,9 +70,7 @@ class Object(object): document.register(self) -NoneType = type(None) - -class Null(Object, NoneType): +class Null(Object): def __init__(self, indirect=False): super().__init__(indirect)
Don't inherit from NoneType bool(Null()) == True anyway, so there're no reason to do this.
diff --git a/colorise/__init__.py b/colorise/__init__.py index <HASH>..<HASH> 100644 --- a/colorise/__init__.py +++ b/colorise/__init__.py @@ -28,7 +28,6 @@ __all__ = [ 'highlight' ] - # Determine which platform-specific color manager to import if _SYSTEM_OS.startswith('win'): from colorise.win.color_functions import\ @@ -53,6 +52,7 @@ else: from colorise.nix.cluts import\ can_redefine_colors as _can_redefine_colors + def num_colors(): """Return the number of colors supported by the terminal.""" return _num_colors() diff --git a/colorise/error.py b/colorise/error.py index <HASH>..<HASH> 100644 --- a/colorise/error.py +++ b/colorise/error.py @@ -3,5 +3,6 @@ """Custom colorise exceptions.""" + class NotSupportedError(Exception): """Raised when functionality is not supported."""
Use some flake8 whitespace suggestions [ci skip]
diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index <HASH>..<HASH> 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -677,8 +677,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * Generate parameters for the grid layout. * * Parameters: - * bounds - {<OpenLayers.Bound>} - * origin - {<OpenLayers.LonLat>} + * bounds - {<OpenLayers.Bound>|Object} OpenLayers.Bounds or an + * object with a 'left' and 'top' properties. + * origin - {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an + * object with a 'lon' and 'lat' properties. * resolution - {Number} * * Returns: @@ -686,8 +688,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * tileoffsetlat, tileoffsetx, tileoffsety */ calculateGridLayout: function(bounds, origin, resolution) { - bounds = bounds.clone(); - var tilelon = resolution * this.tileSize.w; var tilelat = resolution * this.tileSize.h;
Update OpenLayers.Layer.Grid.calculateGridLayout inputs type. No need to clone the passed bounds (read only access). 'bounds' can be either a Bounds instance or a simple javascript object. Same for 'origin': LonLat instance or a simple javascript object.
diff --git a/mr/awsome/plain.py b/mr/awsome/plain.py index <HASH>..<HASH> 100644 --- a/mr/awsome/plain.py +++ b/mr/awsome/plain.py @@ -62,6 +62,7 @@ class Instance(FabricMixin): for k, v in self.master.instances.items())) d.update(self.config) d['known_hosts'] = self.master.known_hosts + d['path'] = self.master.main_config.path return proxy_command.format(**d) def init_ssh_key(self, user=None):
Add config path to variables usable in proxy_command.
diff --git a/lib/graph-manifest.js b/lib/graph-manifest.js index <HASH>..<HASH> 100644 --- a/lib/graph-manifest.js +++ b/lib/graph-manifest.js @@ -52,7 +52,7 @@ function node (state, createEdge, emit) { if (res.err) return self.emit('error', 'manifest', 'JSON.parse', res.err) debug('creating edges') - createEdge('color', Buffer.from(res.value.color || '#fff')) + createEdge('color', Buffer.from(res.value.theme_color || '#fff')) createEdge('bundle', Buffer.from(JSON.stringify(res.value))) }) })
read theme_color from manifest.json (#<I>)
diff --git a/bosh-stemcell/spec/os_image/ubuntu_trusty_spec.rb b/bosh-stemcell/spec/os_image/ubuntu_trusty_spec.rb index <HASH>..<HASH> 100644 --- a/bosh-stemcell/spec/os_image/ubuntu_trusty_spec.rb +++ b/bosh-stemcell/spec/os_image/ubuntu_trusty_spec.rb @@ -2,9 +2,9 @@ require 'spec_helper' require 'rbconfig' describe 'Ubuntu 14.04 OS image', os_image: true do - it_behaves_like 'every OS image' + # it_behaves_like 'every OS image' it_behaves_like 'an upstart-based OS image' - it_behaves_like 'a Linux kernel 3.x based OS image' + # it_behaves_like 'a Linux kernel 3.x based OS image' describe package('apt') do it { should be_installed }
fix tests for stemcell on power arch
diff --git a/spec/spec-helper/jasmine-tagged-spec.js b/spec/spec-helper/jasmine-tagged-spec.js index <HASH>..<HASH> 100644 --- a/spec/spec-helper/jasmine-tagged-spec.js +++ b/spec/spec-helper/jasmine-tagged-spec.js @@ -26,4 +26,5 @@ describe("jasmine-tagged", function () { }); }); +env.setIncludedTags(); env.includeSpecsWithoutTags(true);
set included back to none after jasmine-tagged tests
diff --git a/src/Models/User.php b/src/Models/User.php index <HASH>..<HASH> 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -1350,8 +1350,15 @@ class User extends Entry implements Authenticatable ->whereHas($this->schema->objectClass()) ->first(); + $maxPasswordAge = $rootDomainObject->getMaxPasswordAge(); + + if (empty ($maxPasswordAge)) { + // There is not a max password age set on the LDAP server. + return false; + } + // Get the users password expiry in Windows time. - $passwordExpiry = bcsub($lastSet, $rootDomainObject->getMaxPasswordAge()); + $passwordExpiry = bcsub($lastSet, $maxPasswordAge); // Convert the Windows time to unix. $passwordExpiryTime = Utilities::convertWindowsTimeToUnixTime($passwordExpiry);
Properly return false if the AD server does not have a max password age.
diff --git a/twitterscraper/query.py b/twitterscraper/query.py index <HASH>..<HASH> 100644 --- a/twitterscraper/query.py +++ b/twitterscraper/query.py @@ -96,7 +96,7 @@ def query_single_page(query, lang, pos, retry=50, from_user=False, timeout=60): else: html = '' try: - json_resp = json.loads(response.text) + json_resp = response.json() html = json_resp['items_html'] or '' except ValueError as e: logger.exception('Failed to parse JSON "{}" while requesting "{}"'.format(e, url))
Use request json() method instead of manual json parsing. (#<I>)
diff --git a/django_ulogin/models.py b/django_ulogin/models.py index <HASH>..<HASH> 100644 --- a/django_ulogin/models.py +++ b/django_ulogin/models.py @@ -24,7 +24,8 @@ AUTH_USER_MODEL = ( class ULoginUser(models.Model): user = models.ForeignKey(AUTH_USER_MODEL, related_name='ulogin_users', - verbose_name=_('user')) + verbose_name=_('user'), + on_delete=models.CASCADE) network = models.CharField(_('network'), db_index=True, max_length=255,
Fix models for Django <I>
diff --git a/test/simple.rb b/test/simple.rb index <HASH>..<HASH> 100644 --- a/test/simple.rb +++ b/test/simple.rb @@ -1035,7 +1035,6 @@ module SimpleTestMethods end def test_query_cache - pend '#839 is open to resolve if this is really a valid test or not in 5.1' if ActiveRecord::Base.connection.adapter_name =~ /mysql|sqlite|postgres/i user_1 = User.create! :login => 'query_cache_1' user_2 = User.create! :login => 'query_cache_2' user_3 = User.create! :login => 'query_cache_3' diff --git a/test/test_helper.rb b/test/test_helper.rb index <HASH>..<HASH> 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -505,7 +505,7 @@ module ActiveRecord end def call(name, start, finish, message_id, values) - return if 'CACHE' == values[:name] + return if values[:cached] sql = values[:sql] sql = sql.to_sql unless sql.is_a?(String)
[test] fix query cache tests for Rail <I> (#<I>) <I> and higher changed the way cached queries are accounted for... Fixes #<I>
diff --git a/h2o-bindings/bin/custom/python/gen_generic.py b/h2o-bindings/bin/custom/python/gen_generic.py index <HASH>..<HASH> 100644 --- a/h2o-bindings/bin/custom/python/gen_generic.py +++ b/h2o-bindings/bin/custom/python/gen_generic.py @@ -11,6 +11,7 @@ def class_extensions(): """ Creates new Generic model by loading existing embedded model into library, e.g. from H2O MOJO. The imported model must be supported by H2O. + :param file: A string containing path to the file to create the model from :return: H2OGenericEstimator instance representing the generic model diff --git a/h2o-py/h2o/estimators/generic.py b/h2o-py/h2o/estimators/generic.py index <HASH>..<HASH> 100644 --- a/h2o-py/h2o/estimators/generic.py +++ b/h2o-py/h2o/estimators/generic.py @@ -106,6 +106,7 @@ class H2OGenericEstimator(H2OEstimator): """ Creates new Generic model by loading existing embedded model into library, e.g. from H2O MOJO. The imported model must be supported by H2O. + :param file: A string containing path to the file to create the model from :return: H2OGenericEstimator instance representing the generic model
PUBDEV-<I>: separated param/return from description
diff --git a/app/models/music_release.rb b/app/models/music_release.rb index <HASH>..<HASH> 100755 --- a/app/models/music_release.rb +++ b/app/models/music_release.rb @@ -153,11 +153,17 @@ class MusicRelease < ActiveRecord::Base musicbrainz_release_group, musicbrainz_releases = nil, nil if mbid.present? - musicbrainz_release_group = MusicBrainz::Release.find(mbid).release_group - musicbrainz_release_group.releases = nil - musicbrainz_releases = musicbrainz_release_group.releases - musicbrainz_release_group = musicbrainz_release_group.to_primitive - else + musicbrainz_release = MusicBrainz::Release.find(mbid) + + unless musicbrainz_release.nil? + musicbrainz_release_group = musicbrainz_release.release_group + musicbrainz_release_group.releases = nil + musicbrainz_releases = musicbrainz_release_group.releases + musicbrainz_release_group = musicbrainz_release_group.to_primitive + end + end + + if musicbrainz_release_group.nil? list = groups(false, true).select{|a| ((is_lp && a.first[:type] == 'Album') || (!is_lp && a.first[:type] != 'Album')) && a.first[:title].downcase == name.downcase }.first return [] if list.nil?
refs #1 find release group by name if it cannot be found through music release by mbid.
diff --git a/lib/component.js b/lib/component.js index <HASH>..<HASH> 100644 --- a/lib/component.js +++ b/lib/component.js @@ -218,11 +218,14 @@ * @listens Backbone.Collection#sync */ onSync: function (modelOrCollection, key) { - this.setProps({isRequesting: false}); - if (modelOrCollection instanceof Backbone.Model) - this.setPropsModel(modelOrCollection, key); - else if (modelOrCollection instanceof Backbone.Collection) - this.setPropsCollection(modelOrCollection, key); + // Set props only if there's no silent option + if (!arguments[arguments.length - 1].silent) { + this.setProps({isRequesting: false}); + if (modelOrCollection instanceof Backbone.Model) + this.setPropsModel(modelOrCollection, key); + else if (modelOrCollection instanceof Backbone.Collection) + this.setPropsCollection(modelOrCollection, key); + } }, /** * Stops all listeners and removes this component from the DOM.
onSync now only setProps if options doesn't pass silent as true
diff --git a/package.php b/package.php index <HASH>..<HASH> 100644 --- a/package.php +++ b/package.php @@ -4,7 +4,7 @@ require_once 'PEAR/PackageFileManager2.php'; -$version = '1.1.0'; +$version = '1.1.1'; $notes = <<<EOT see ChangeLog EOT;
prepare for release of <I> svn commit r<I>
diff --git a/hazelcast-client-legacy/src/main/java/com/hazelcast/client/proxy/NearCachedClientMapProxy.java b/hazelcast-client-legacy/src/main/java/com/hazelcast/client/proxy/NearCachedClientMapProxy.java index <HASH>..<HASH> 100644 --- a/hazelcast-client-legacy/src/main/java/com/hazelcast/client/proxy/NearCachedClientMapProxy.java +++ b/hazelcast-client-legacy/src/main/java/com/hazelcast/client/proxy/NearCachedClientMapProxy.java @@ -389,6 +389,7 @@ public class NearCachedClientMapProxy<K, V> extends ClientMapProxy<K, V> { if (event instanceof CleaningNearCacheInvalidation) { nearCache.clear(); + return; } throw new IllegalArgumentException("Unexpected event received [" + event + ']');
fixed missing return in case of CleaningNearCacheInvalidation received at NearCachedClientMapProxy for legacy client
diff --git a/config/routes.rb b/config/routes.rb index <HASH>..<HASH> 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,15 +1,10 @@ Ems::Engine.routes.draw do + get "ems/index" + root :to => "ems#index" resources :reports - resources :news - resources :articles - resources :tags resources :channels resources :categories - - get "ems/index" - - root :to => "ems#index" end
fixing route problem in ems
diff --git a/legit/scm.py b/legit/scm.py index <HASH>..<HASH> 100644 --- a/legit/scm.py +++ b/legit/scm.py @@ -157,7 +157,7 @@ class SCMRepo(object): else: verb = 'merge' - if self.pull_ff_only(): + if verb != 'rebase' and self.pull_ff_only(): return self.git_exec([verb, '--ff-only', branch]) else: try: @@ -177,7 +177,7 @@ class SCMRepo(object): def pull_ff_only(self): reader = self.repo.config_reader() if reader.has_option('pull', 'ff'): - if reader.getboolean('pull', 'ff') == 'only': + if reader.get('pull', 'ff') == 'only': return True else: return False
properly deal with ff-only when registered in the git options
diff --git a/analytics.go b/analytics.go index <HASH>..<HASH> 100644 --- a/analytics.go +++ b/analytics.go @@ -124,13 +124,16 @@ type batch struct { // func Client(key string) *client { - return &client{ - key: key, - url: api, - flushAt: 500, - flushAfter: 10 * time.Second, - buffer: make([]*interface{}, 0), + c := &client{ + key: key, + url: api, + buffer: make([]*interface{}, 0), } + + c.FlushAt(500) + c.FlushAfter(10 * time.Second) + + return c } //
add dog-fooding of buffer methods
diff --git a/lib/calabash.rb b/lib/calabash.rb index <HASH>..<HASH> 100644 --- a/lib/calabash.rb +++ b/lib/calabash.rb @@ -112,7 +112,6 @@ module Calabash raise ArgumentError, "Expected a 'Class', got '#{page_class.class}'" end - page_name = page_class.name full_page_name = "#{platform_module}::#{page_name}" @@ -120,6 +119,17 @@ module Calabash page_class = platform_module.const_get(page_name, false) if page_class.is_a?(Class) + modules = page_class.included_modules.map(&:to_s) + + unless modules.include?("Calabash::#{platform_module}") + raise "Page '#{page_class}' does not include Calabash::#{platform_module}" + end + + if modules.include?('Calabash::Android') && + modules.include?('Calabash::IOS') + raise "Page '#{page_class}' includes both Calabash::Android and Calabash::IOS" + end + page = page_class.send(:new, self) if page.is_a?(Calabash::Page)
Pages: Fail if page does not include CalA xor CalI
diff --git a/moztelemetry/scalar.py b/moztelemetry/scalar.py index <HASH>..<HASH> 100644 --- a/moztelemetry/scalar.py +++ b/moztelemetry/scalar.py @@ -19,7 +19,6 @@ from parse_scalars import ScalarType SCALARS_YAML_PATH = '/toolkit/components/telemetry/Scalars.yaml' REVISIONS = {'nightly': 'https://hg.mozilla.org/mozilla-central/rev/tip', - 'aurora': 'https://hg.mozilla.org/releases/mozilla-aurora/rev/tip', 'beta': 'https://hg.mozilla.org/releases/mozilla-beta/rev/tip', 'release': 'https://hg.mozilla.org/releases/mozilla-release/rev/tip'}
Remove aurora scalar definitions (#<I>)
diff --git a/go/client/chat_svc_handler.go b/go/client/chat_svc_handler.go index <HASH>..<HASH> 100644 --- a/go/client/chat_svc_handler.go +++ b/go/client/chat_svc_handler.go @@ -9,6 +9,7 @@ import ( "github.com/araddon/dateparse" "github.com/keybase/client/go/chat" + "github.com/keybase/client/go/chat/attachments" "github.com/keybase/client/go/chat/utils" "github.com/keybase/client/go/libkb" "github.com/keybase/client/go/protocol/chat1" @@ -615,6 +616,9 @@ func (c *chatServiceHandler) DownloadV1(ctx context.Context, opts downloadOption if opts.Output == "-" { fsink = &StdoutSink{} } else { + if err := attachments.Quarantine(ctx, opts.Output); err != nil { + c.G().Log.Warning("failed to quarantine attachment download: %s", err) + } fsink = NewFileSink(c.G(), opts.Output) } defer fsink.Close()
quarantine through stream download path CORE-<I> (#<I>)
diff --git a/cycle/src/test/java/com/camunda/fox/cycle/web/service/resource/RoundtripServiceTest.java b/cycle/src/test/java/com/camunda/fox/cycle/web/service/resource/RoundtripServiceTest.java index <HASH>..<HASH> 100644 --- a/cycle/src/test/java/com/camunda/fox/cycle/web/service/resource/RoundtripServiceTest.java +++ b/cycle/src/test/java/com/camunda/fox/cycle/web/service/resource/RoundtripServiceTest.java @@ -166,6 +166,8 @@ public class RoundtripServiceTest { RoundtripDTO testRoundtrip = createAndFlushRoundtrip(); BpmnDiagramDTO rightHandSide = testRoundtrip.getRightHandSide(); + // needs to be here because invoke of diagramService.getImage(...), expects + // the image date to be 'now' + 5 secs. 'now' is set in roundtripService.doSynchronize(...) Thread.sleep(6000); roundtripService.doSynchronize(SyncMode.LEFT_TO_RIGHT, testRoundtrip.getId());
HEMERA-<I> Added comment why there is a Thread.sleep
diff --git a/src/Symfony/Component/Messenger/Worker.php b/src/Symfony/Component/Messenger/Worker.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Messenger/Worker.php +++ b/src/Symfony/Component/Messenger/Worker.php @@ -87,6 +87,7 @@ class Worker while (false === $this->shouldStop) { $envelopeHandled = false; + $envelopeHandledStart = microtime(true); foreach ($this->receivers as $transportName => $receiver) { if ($queueNames) { $envelopes = $receiver->getFromQueues($queueNames); @@ -113,10 +114,12 @@ class Worker } } - if (false === $envelopeHandled) { + if (!$envelopeHandled) { $this->dispatchEvent(new WorkerRunningEvent($this, true)); - usleep($options['sleep']); + if (0 < $sleep = (int) ($options['sleep'] - 1e6 * (microtime(true) - $envelopeHandledStart))) { + usleep($sleep); + } } }
[Messenger] subtract handling time from sleep time in worker
diff --git a/lib/mdl.rb b/lib/mdl.rb index <HASH>..<HASH> 100644 --- a/lib/mdl.rb +++ b/lib/mdl.rb @@ -88,7 +88,6 @@ module MarkdownLint error_lines.each do |line| line += doc.offset # Correct line numbers for any yaml front matter if Config[:json] - require 'json' results << { 'filename' => filename, 'line' => line, @@ -106,6 +105,7 @@ module MarkdownLint end if Config[:json] + require 'json' puts JSON.generate(results) elsif status != 0 puts "\nA detailed description of the rules is available at "\
Imports JSON when generating results (#<I>) * Imports JSON when generating results * Removes json require statement as requested
diff --git a/ford/utils.py b/ford/utils.py index <HASH>..<HASH> 100644 --- a/ford/utils.py +++ b/ford/utils.py @@ -31,7 +31,8 @@ import os.path NOTE_TYPE = {'note':'info', 'warning':'warning', 'todo':'success', - 'bug':'danger'} + 'bug':'danger', + 'history':'history'} NOTE_RE = [re.compile(r"@({})\s*(((?!@({})).)*?)@end\1\s*(</p>)?".format(note, '|'.join(NOTE_TYPE.keys())), re.IGNORECASE|re.DOTALL) for note in NOTE_TYPE] \ + [re.compile(r"@({})\s*(.*?)\s*</p>".format(note),
add history as a note_type
diff --git a/azure-keyvault/azure/keyvault/custom/key_vault_authentication.py b/azure-keyvault/azure/keyvault/custom/key_vault_authentication.py index <HASH>..<HASH> 100644 --- a/azure-keyvault/azure/keyvault/custom/key_vault_authentication.py +++ b/azure-keyvault/azure/keyvault/custom/key_vault_authentication.py @@ -6,6 +6,7 @@ import urllib from requests.auth import AuthBase import requests +import os from msrest.authentication import Authentication @@ -30,7 +31,7 @@ class KeyVaultAuthBase(AuthBase): # send the request to retrieve the challenge, then request the token and update # the request # TODO: wire up commons flag for things like Fiddler, logging, etc. - response = requests.Session().request(request) + response = requests.Session().send(request, verify=os.environ.get('REQUESTS_CA_BUNDLE') or os.environ.get('CURL_CA_BUNDLE')) if response.status_code == 401: auth_header = response.headers['WWW-Authenticate'] if HttpBearerChallenge.is_bearer_challenge(auth_header):
fix in KeyVaultAuthBase to call send with environment CA verify into
diff --git a/hug/routing.py b/hug/routing.py index <HASH>..<HASH> 100644 --- a/hug/routing.py +++ b/hug/routing.py @@ -591,10 +591,7 @@ class HTTPRouter(Router): callable_method.interface = interface callable_method.without_directives = api_function - if is_method: - api_function.__dict__['interface'] = interface - else: - api_function.interface = interface + api_function.__dict__['interface'] = interface interface.api_function = api_function interface.output_format = function_output interface.defaults = defaults
Simplify logic, since method based approach works for both
diff --git a/psamm/graph.py b/psamm/graph.py index <HASH>..<HASH> 100644 --- a/psamm/graph.py +++ b/psamm/graph.py @@ -473,9 +473,9 @@ def make_network_dict(nm, mm, subset=None, method='fpp', else: logger.warning( 'Reaction {} is excluded from visualization due ' - 'missing or invalid compound formula'.format(r.id)) + 'missing or undefined compound formula'.format(r.id)) - reaction_pairs = [(r.id, r.equation) for r in testing_list] + reaction_pairs = [(r.id, r.equation) for r in testing_list_update] fpp_dict, _ = findprimarypairs.predict_compound_pairs_iterated( reaction_pairs, compound_formula, element_weight=element_weight)
fix the problem that the function stops if undefined formula presents (such as (C3H3O3)n)
diff --git a/test/test_pkcs11_thread.rb b/test/test_pkcs11_thread.rb index <HASH>..<HASH> 100644 --- a/test/test_pkcs11_thread.rb +++ b/test/test_pkcs11_thread.rb @@ -35,7 +35,7 @@ class TestPkcs11Thread < Test::Unit::TestCase } # This should take some seconds: pub_key, priv_key = session.generate_key_pair(:RSA_PKCS_KEY_PAIR_GEN, - {:MODULUS_BITS=>1408, :PUBLIC_EXPONENT=>[3].pack("N"), :TOKEN=>false}, + {:MODULUS_BITS=>2048, :PUBLIC_EXPONENT=>[3].pack("N"), :TOKEN=>false}, {}) th.kill assert_operator count, :>, 10, "The second thread should count further concurrent to the key generation"
RSA-<I> is too small on a faster CPU.
diff --git a/lib/compiler/js.js b/lib/compiler/js.js index <HASH>..<HASH> 100644 --- a/lib/compiler/js.js +++ b/lib/compiler/js.js @@ -34,7 +34,7 @@ let js = { return s .replace(/\\/g, "\\\\") // backslash .replace(/\//g, "\\/") // closing slash - .replace(/\]/g, "\\]") // closing bracket + .replace(/]/g, "\\]") // closing bracket .replace(/\^/g, "\\^") // caret .replace(/-/g, "\\-") // dash .replace(/\0/g, "\\0") // null
Remove unnecessary escaping of "]" in a regexp This fixes the following ESLint error, which started to appear after eslint/eslint#<I> was fixed: /Users/dmajda/Programming/PEG.js/pegjs/lib/compiler/js.js <I>:<I> error Unnecessary escape character: \] no-useless-escape This should fix broken Travis CI builds: <URL>
diff --git a/src/wyil/lang/IntersectionRewrites.java b/src/wyil/lang/IntersectionRewrites.java index <HASH>..<HASH> 100755 --- a/src/wyil/lang/IntersectionRewrites.java +++ b/src/wyil/lang/IntersectionRewrites.java @@ -49,7 +49,7 @@ public final class IntersectionRewrites implements RewriteRule { Object data = null; int kind = Type.K_ANY; - for(int i=0;i!=children.length;++i) { + for(int i=0;i<children.length;++i) { int iChild = children[i]; // check whether this child is subsumed Automata.State child = automata.states[iChild]; @@ -60,7 +60,10 @@ public final class IntersectionRewrites implements RewriteRule { automata.states[index] = new Automata.State(Type.K_VOID); return true; } else if (kind == child.kind) { - if((data == null && child.data != null) || !data.equals(child.data)) { + if ((data == child.data) + || (data != null && data.equals(child.data))) { + // this is ok + } else { automata.states[index] = new Automata.State(Type.K_VOID); return true; }
Making progress on simplification of types ...
diff --git a/lib/argus/nav_monitor.rb b/lib/argus/nav_monitor.rb index <HASH>..<HASH> 100644 --- a/lib/argus/nav_monitor.rb +++ b/lib/argus/nav_monitor.rb @@ -65,6 +65,9 @@ module Argus if @nav_data.bootstrap? @controller.demo_mode end + if @nav_data.control_command_ack? + @controller.ack_control_mode + end data.options.each do |opt| @nav_options[opt.tag] = opt if opt.tag < 100 end
Add ack_control_mode command to NavMonitor This was done to see if it improves the nav data stream. We still reached a point where the nav data had stopped, so I don't think we are there yet. Perhaps we need better logging capability to monitor program state along with the nav data.
diff --git a/backends/graphite.js b/backends/graphite.js index <HASH>..<HASH> 100644 --- a/backends/graphite.js +++ b/backends/graphite.js @@ -34,6 +34,7 @@ var post_stats = function graphite_post_stats(statString) { } }); graphite.on('connect', function() { + var ts = Math.round(new Date().getTime() / 1000); statString += 'statsd.graphiteStats.last_exception ' + last_exception + ' ' + ts + "\n"; statString += 'statsd.graphiteStats.last_flush ' + last_flush + ' ' + ts + "\n"; this.write(statString);
we need a timestamp of course
diff --git a/src/test/java/org/mockitousage/verification/VerificationAfterDelayTest.java b/src/test/java/org/mockitousage/verification/VerificationAfterDelayTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/org/mockitousage/verification/VerificationAfterDelayTest.java +++ b/src/test/java/org/mockitousage/verification/VerificationAfterDelayTest.java @@ -4,6 +4,10 @@ package org.mockitousage.verification; +import static org.mockito.Mockito.after; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + import java.util.LinkedList; import java.util.List; @@ -17,8 +21,6 @@ import org.mockito.Mock; import org.mockito.exceptions.base.MockitoAssertionError; import org.mockitoutil.TestBase; -import static org.mockito.Mockito.*; - public class VerificationAfterDelayTest extends TestBase { @Rule
same that before just modified some imports
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -235,7 +235,7 @@ func (c *Client) mCleaner(m map[string]*HostClient) { } } -// Maximum number of concurrent connections http client can establish per host +// Maximum number of concurrent connections http client may establish per host // by default. const DefaultMaxConnsPerHost = 100 @@ -436,6 +436,29 @@ func (c *HostClient) DoTimeout(req *Request, resp *Response, timeout time.Durati } func clientDoTimeout(req *Request, resp *Response, timeout time.Duration, c clientDoer) error { + deadline := time.Now().Add(timeout) + for { + err := clientDoTimeoutFreeConn(req, resp, timeout, c) + if err != ErrNoFreeConns { + return err + } + timeout = -time.Since(deadline) + if timeout <= 0 { + return ErrTimeout + } + sleepTime := 100 * time.Millisecond + if sleepTime > timeout { + sleepTime = timeout + } + time.Sleep(sleepTime) + timeout = -time.Since(deadline) + if timeout <= 0 { + return ErrTimeout + } + } +} + +func clientDoTimeoutFreeConn(req *Request, resp *Response, timeout time.Duration, c clientDoer) error { var ch chan error chv := errorChPool.Get() if chv == nil {
Handle 'no free connections to host' error when doing request with user-defined timeout
diff --git a/libraries/validform.js b/libraries/validform.js index <HASH>..<HASH> 100644 --- a/libraries/validform.js +++ b/libraries/validform.js @@ -11,7 +11,7 @@ * * @package ValidFormBuilder * @author Felix Langfeldt - * @version 0.2.1 + * @version 0.2.2 */ function ValidFormValidator(strFormId) { @@ -365,7 +365,7 @@ ValidFormFieldValidator.prototype.validate = function(value) { } //*** Check specific types using regular expression. - if(typeof this.check != "function") { + if(typeof this.check != "function" && typeof this.check != "object") { return true; } else { blnReturn = this.check.test(value);
Fixed a client side validation issue. Related to issue 5 (<URL>
diff --git a/lib/slack-notifier/link_formatter.rb b/lib/slack-notifier/link_formatter.rb index <HASH>..<HASH> 100644 --- a/lib/slack-notifier/link_formatter.rb +++ b/lib/slack-notifier/link_formatter.rb @@ -54,7 +54,7 @@ module Slack # http://rubular.com/r/fLEdmTSghW def markdown_pattern - /\[ ([^\[\]]*?) \] \( (https?:\/\/.*?) \) /x + /\[ ([^\[\]]*?) \] \( ((https?:\/\/.*?) | (mailto:.*?)) \) /x end end diff --git a/spec/lib/slack-notifier/link_formatter_spec.rb b/spec/lib/slack-notifier/link_formatter_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/slack-notifier/link_formatter_spec.rb +++ b/spec/lib/slack-notifier/link_formatter_spec.rb @@ -63,6 +63,11 @@ describe Slack::Notifier::LinkFormatter do expect(formatted).to eq "こんにちは" end + it "handles email links in markdown" do + formatted = described_class.format("[John](mailto:[email protected])") + expect(formatted).to eq "<mailto:[email protected]|John>" + end + end end
Handle mailto link within markdown.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -6,6 +6,11 @@ if sys.version_info < (3, 2): print("ApiDoc requires Python 3.2 or later") raise SystemExit(1) +if sys.version_info == (3, 2): + requirements = ['Jinja2 == 2.6', 'PyYAML'] +else: + requirements = ['Jinja2', 'PyYAML'] + from setuptools import setup, find_packages setup( @@ -38,8 +43,5 @@ setup( 'template/resource/js/*.js', 'template/resource/img/*.png', ]}, - install_requires=[ - 'Jinja2', - 'PyYAML', - ] + install_requires=requirements )
Fix Jinja version for python = <I>
diff --git a/py/h2o_cmd.py b/py/h2o_cmd.py index <HASH>..<HASH> 100644 --- a/py/h2o_cmd.py +++ b/py/h2o_cmd.py @@ -332,7 +332,7 @@ def check_key_distribution(): print 'num_keys:', n['num_keys'], 'value_size_bytes:', n['value_size_bytes'],\ 'name:', n['name'] delta = (abs(avgKeys - int(n['num_keys']))/avgKeys) - if delta > 0.05: + if delta > 0.10: print "WARNING. avgKeys:", avgKeys, "and n['num_keys']:", n['num_keys'], "have >", "%.1f" % (100 * delta), "% delta"
only warn about <I>% delta in key distribution
diff --git a/lib/hammer_cli_katello/repository.rb b/lib/hammer_cli_katello/repository.rb index <HASH>..<HASH> 100644 --- a/lib/hammer_cli_katello/repository.rb +++ b/lib/hammer_cli_katello/repository.rb @@ -203,7 +203,7 @@ module HammerCLIKatello end def request_headers - {:content_type => 'multipart/form-data', :multipart => true} + {:content_type => 'multipart/form-data'} end def execute @@ -238,10 +238,12 @@ module HammerCLIKatello offset = 0 while (content = file.read(CONTENT_CHUNK_SIZE)) - params = {:offset => offset, - :id => upload_id, - :content => content, - :repository_id => repo_id + params = { + :offset => offset, + :id => upload_id, + :content => content, + :repository_id => repo_id, + :multipart => true } content_upload_resource.call(:update, params, request_headers)
Fixes #<I> - Upload content as multipart/form-data
diff --git a/src/DockerBase.php b/src/DockerBase.php index <HASH>..<HASH> 100644 --- a/src/DockerBase.php +++ b/src/DockerBase.php @@ -9,6 +9,7 @@ namespace mglaman\Docker; +use Symfony\Component\Process\ExecutableFinder; use Symfony\Component\Process\ProcessBuilder; /** @@ -21,7 +22,10 @@ abstract class DockerBase implements DockerInterface { * @return bool */ public static function native() { - return PHP_OS == 'Linux'; + $finder = new ExecutableFinder(); + // If a Docker executable can be found then assume that native commands will + // work regardless of OS. + return PHP_OS === 'Linux' || (bool) $finder->find('docker'); } /**
Use native commands on all OS's if supported (#4)
diff --git a/lib/mini_fb.rb b/lib/mini_fb.rb index <HASH>..<HASH> 100644 --- a/lib/mini_fb.rb +++ b/lib/mini_fb.rb @@ -652,14 +652,9 @@ module MiniFB res_hash = JSON.parse("{\"response\": #{resp.to_s}}") end end - -#This is bad because it strips off paging parameters and what not. - # if res_hash.size == 1 && res_hash["data"] -# res_hash = res_hash["data"] -# end if res_hash.is_a? Array # fql return this - res_hash.collect! { |x| Hashie::Mash.new(x) } + res_hash.collect! { |x| x.is_a?(Hash) ? Hashie::Mash.new(x) : x } else res_hash = Hashie::Mash.new(res_hash) end @@ -670,7 +665,7 @@ module MiniFB return res_hash rescue RestClient::Exception => ex - puts ex.http_code.to_s + puts "ex.http_code=" + ex.http_code.to_s puts 'ex.http_body=' + ex.http_body if @@logging res_hash = JSON.parse(ex.http_body) # probably should ensure it has a good response raise MiniFB::FaceBookError.new(ex.http_code, "#{res_hash["error"]["type"]}: #{res_hash["error"]["message"]}")
Added fix for responses that return an array of non-hashes.
diff --git a/library/UnitTestCase.php b/library/UnitTestCase.php index <HASH>..<HASH> 100755 --- a/library/UnitTestCase.php +++ b/library/UnitTestCase.php @@ -109,6 +109,9 @@ abstract class UnitTestCase extends BaseTestCase if ($testConfig->getModulesToActivate()) { $oTestModuleLoader = $this->_getModuleLoader(); $oTestModuleLoader->activateModules($testConfig->getModulesToActivate()); + + // Modules might add new translations, and language object has a static cache which must be flushed + \OxidEsales\Eshop\Core\Registry::set('oxLang', null); } \OxidEsales\Eshop\Core\Registry::set(\OxidEsales\Eshop\Core\UtilsDate::class, new modOxUtilsDate());
ESDEV-<I> Properly reset/flush Language object as registered in Registry
diff --git a/core/src/main/java/hudson/model/CauseAction.java b/core/src/main/java/hudson/model/CauseAction.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/hudson/model/CauseAction.java +++ b/core/src/main/java/hudson/model/CauseAction.java @@ -82,14 +82,21 @@ public class CauseAction implements FoldableAction, RunAction2 { public CauseAction(CauseAction ca) { addCauses(ca.getCauses()); } - + + /** + * Lists all causes of this build. + * Note that the current implementation does not preserve insertion order of duplicates. + * @return an immutable list; + * to create an action with multiple causes use either of the constructors that support this; + * to append causes retroactively to a build you must create a new {@link CauseAction} and replace the old + */ @Exported(visibility=2) public List<Cause> getCauses() { List<Cause> r = new ArrayList<>(); for (Map.Entry<Cause,Integer> entry : causeBag.entrySet()) { r.addAll(Collections.nCopies(entry.getValue(), entry.getKey())); } - return r; + return Collections.unmodifiableList(r); } /**
[JENKINS-<I>] Clarifying that CauseAction.getCauses is immutable and you should construct the action with the causes you want.
diff --git a/core/toolbox.js b/core/toolbox.js index <HASH>..<HASH> 100644 --- a/core/toolbox.js +++ b/core/toolbox.js @@ -351,6 +351,7 @@ Blockly.Toolbox.prototype.setSelectedItem = function(item) { var scrollPositions = this.flyout_.categoryScrollPositions; for (var i = 0; i < scrollPositions.length; i++) { if (categoryName === scrollPositions[i].categoryName) { + this.flyout_.setVisible(true); this.flyout_.scrollTo(scrollPositions[i].position); return; }
Show flyout on selecting category in autoclose mode
diff --git a/src/type/s2k.js b/src/type/s2k.js index <HASH>..<HASH> 100644 --- a/src/type/s2k.js +++ b/src/type/s2k.js @@ -161,15 +161,13 @@ S2K.prototype.produce_key = async function (passphrase, numBytes) { case 'iterated': { const count = s2k.get_count(); const data = util.concatUint8Array([s2k.salt, passphrase]); - let isp = new Array(Math.ceil(count / data.length)); - - isp = util.concatUint8Array(isp.fill(data)); - - if (isp.length > count) { - isp = isp.subarray(0, count); + const datalen = data.length; + const isp = new Uint8Array(prefix.length + count + datalen); + isp.set(prefix); + for (let pos = prefix.length; pos < count; pos += datalen) { + isp.set(data, pos); } - - return crypto.hash.digest(algorithm, util.concatUint8Array([prefix, isp])); + return crypto.hash.digest(algorithm, isp.subarray(0, prefix.length + count)); } case 'gnu': throw new Error("GNU s2k type not supported.");
Inline iterated S2K loop
diff --git a/lib/vagrant-vcloudair.rb b/lib/vagrant-vcloudair.rb index <HASH>..<HASH> 100644 --- a/lib/vagrant-vcloudair.rb +++ b/lib/vagrant-vcloudair.rb @@ -54,7 +54,7 @@ module Vagrant def get_vapp_id vappid_file = @data_dir.join('../../../vcloudair_vappid') if vappid_file.file? - @vappid = vappid_file.read + @vappid = vappid_file.read.chomp else nil end
Strip whitespace from vappid When reading the vappid from a file strip any leading or trailing whitespace so that the URL can be constructed correctly.
diff --git a/message_sender/tests.py b/message_sender/tests.py index <HASH>..<HASH> 100644 --- a/message_sender/tests.py +++ b/message_sender/tests.py @@ -4145,7 +4145,7 @@ class TestWhatsAppAPISender(TestCase): send_hsm should make the appropriate request to the WhatsApp API """ sender = WhatsAppApiSender( - "http://whatsapp", "test-token", "hsm-namespace", "hsm-element-name", "ttl" + "http://whatsapp", "test-token", "hsm-namespace", "hsm-element-name", 604800 ) responses.add( @@ -4161,7 +4161,7 @@ class TestWhatsAppAPISender(TestCase): json.loads(request.body), { "to": "27820001001", - "ttl": "ttl", + "ttl": 604800, "type": "hsm", "hsm": { "namespace": "hsm-namespace",
changed send_hsm test to include ttl with specific value
diff --git a/registration/views.py b/registration/views.py index <HASH>..<HASH> 100644 --- a/registration/views.py +++ b/registration/views.py @@ -62,8 +62,7 @@ class RegistrationView(FormView): # # Manually implementing this method, and passing the form # instance to get_context_data(), solves this issue (which - # will be fixed, at the very least, in Django 1.10, and may - # also be backported into the Django 1.9 release series). + # will be fixed in Django 1.9.1 and Django 1.10). return self.render_to_response(self.get_context_data(form=form)) def registration_allowed(self):
Fix form_invalid comment now that the fix is backported into <I>.x.
diff --git a/src/Enhavo/Bundle/AppBundle/Form/Type/RoutingType.php b/src/Enhavo/Bundle/AppBundle/Form/Type/RoutingType.php index <HASH>..<HASH> 100644 --- a/src/Enhavo/Bundle/AppBundle/Form/Type/RoutingType.php +++ b/src/Enhavo/Bundle/AppBundle/Form/Type/RoutingType.php @@ -9,6 +9,7 @@ namespace Enhavo\Bundle\AppBundle\Form\Type; use Enhavo\Bundle\AppBundle\Entity\Route; +use Enhavo\Bundle\AppBundle\Exception\UrlResolverException; use Enhavo\Bundle\AppBundle\Route\GeneratorInterface; use Enhavo\Bundle\AppBundle\Route\Routeable; use Enhavo\Bundle\AppBundle\Route\Routing; @@ -84,7 +85,7 @@ class RoutingType extends AbstractType 'data' => $url, 'read_only' => true )); - } catch (\InvalidArgumentException $e) { + } catch (UrlResolverException $e) { return; } }
fix wrong catched exception in routing type
diff --git a/exe/arduino_ci_remote.rb b/exe/arduino_ci_remote.rb index <HASH>..<HASH> 100755 --- a/exe/arduino_ci_remote.rb +++ b/exe/arduino_ci_remote.rb @@ -144,9 +144,13 @@ all_platforms = {} aux_libraries = Set.new(config.aux_libraries_for_unittest + config.aux_libraries_for_build) # while collecting the platforms, ensure they're defined config.platforms_to_unittest.each { |p| all_platforms[p] = assured_platform("unittest", p, config) } +example_platforms = {} library_examples.each do |path| ovr_config = config.from_example(path) - ovr_config.platforms_to_build.each { |p| all_platforms[p] = assured_platform("library example", p, config) } + ovr_config.platforms_to_build.each do |p| + # assure the platform if we haven't already + example_platforms[p] = all_platforms[p] = assured_platform("library example", p, config) unless example_platforms.key?(p) + end aux_libraries.merge(ovr_config.aux_libraries_for_build) end
don't redundantly report assured platforms
diff --git a/src/plugin/release/index.js b/src/plugin/release/index.js index <HASH>..<HASH> 100644 --- a/src/plugin/release/index.js +++ b/src/plugin/release/index.js @@ -46,6 +46,12 @@ function action (config, directory, options) { ? config.releaseBranch : 'master' + const { code } = execSync('git checkout ' + releaseBranch) + + if (code !== 0) { + throw new Error('Could not switch to ' + releaseBranch) + } + const packages = config.packages.map(getPkg(directory)) checkRelease(packages).then(function (status) {
fix(northbrook): switch to releaseBranch before doing anything
diff --git a/src/now.js b/src/now.js index <HASH>..<HASH> 100755 --- a/src/now.js +++ b/src/now.js @@ -403,10 +403,20 @@ const main = async (argv_) => { process.exit(1) } - ctx.authConfig.credentials.push({ + const obj = { provider: 'sh', token - }) + } + + const credentialsIndex = ctx.authConfig.credentials.findIndex( + cred => cred.provider === 'sh' + ) + + if (credentialsIndex === -1) { + ctx.authConfig.credentials.push(obj) + } else { + ctx.authConfig.credentials[credentialsIndex] = obj + } if (isTTY) { console.log(info('Caching account information...'))
Fix edge case where `--token` was being ignored (#<I>) * Fix edge case where `--token` was being ignored * Fix logic
diff --git a/cas-server-core/src/test/java/org/jasig/cas/CentralAuthenticationServiceImplTests.java b/cas-server-core/src/test/java/org/jasig/cas/CentralAuthenticationServiceImplTests.java index <HASH>..<HASH> 100644 --- a/cas-server-core/src/test/java/org/jasig/cas/CentralAuthenticationServiceImplTests.java +++ b/cas-server-core/src/test/java/org/jasig/cas/CentralAuthenticationServiceImplTests.java @@ -5,6 +5,7 @@ import org.jasig.cas.authentication.AuthenticationContext; import org.jasig.cas.authentication.AuthenticationException; import org.jasig.cas.authentication.Credential; import org.jasig.cas.authentication.MixedPrincipalException; +import org.jasig.cas.authentication.PrincipalException; import org.jasig.cas.authentication.TestUtils; import org.jasig.cas.authentication.UsernamePasswordCredential; import org.jasig.cas.authentication.principal.Service; @@ -114,7 +115,7 @@ public class CentralAuthenticationServiceImplTests extends AbstractCentralAuthen getCentralAuthenticationService().grantServiceTicket(ticketId.getId(), getService(), ctx); } - @Test(expected = UnauthorizedServiceForPrincipalException.class) + @Test(expected = PrincipalException.class) public void verifyGrantServiceTicketFailsAuthzRule() throws Exception { final AuthenticationContext ctx = TestUtils.getAuthenticationContext(getAuthenticationSystemSupport(), getService("TestServiceAttributeForAuthzFails"));
Merge branch 'master' into tgt-authZ # Conflicts: # gradle.properties
diff --git a/lib/extract/extractGradient.js b/lib/extract/extractGradient.js index <HASH>..<HASH> 100644 --- a/lib/extract/extractGradient.js +++ b/lib/extract/extractGradient.js @@ -15,20 +15,14 @@ export default function(props) { const stops = {}; Children.forEach(props.children, child => { - if (child.type === Stop) { - if (child.props.stopColor && child.props.offset) { - // convert percent to float. - let offset = percentToFloat(child.props.offset); + if (child.props.stopColor && child.props.offset) { + // convert percent to float. + let offset = percentToFloat(child.props.offset); - // add stop - //noinspection JSUnresolvedFunction - stops[offset] = Color(child.props.stopColor).alpha( - extractOpacity(child.props.stopOpacity) - ); - } - } else { - console.warn( - "`Gradient` elements only accept `Stop` elements as children" + // add stop + //noinspection JSUnresolvedFunction + stops[offset] = Color(child.props.stopColor).alpha( + extractOpacity(child.props.stopOpacity) ); } });
Remove 'child.type === Stop' check from extractGradient
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -29,8 +29,7 @@ module.exports = function(options) { return through.obj(function(file, enc, callback) { if (file.isBuffer()) { - this.emit('error', new gutil.PluginError(PLUGIN_NAME, 'Buffers are not supported')); - return callback(null); + return callback('Buffers are not supported'); } var p = path.normalize(path.relative(file.cwd, file.path)); if (options.debug) gutil.log(gutil.colors.magenta('processing file: ') + p);
Just provide the error to the callback instead of a new PluginError
diff --git a/deployer/db/config/set.php b/deployer/db/config/set.php index <HASH>..<HASH> 100644 --- a/deployer/db/config/set.php +++ b/deployer/db/config/set.php @@ -101,7 +101,7 @@ set('bin/deployer', function () { $deployerVersionToUse = '5.0.3'; break; case 4: - $deployerVersionToUse = '4.3.0'; + $deployerVersionToUse = '4.3.1'; break; case 3: $deployerVersionToUse = '3.3.0';
[TASK] Insrease the required deployer version
diff --git a/acceptance/send_notification_to_email_test.go b/acceptance/send_notification_to_email_test.go index <HASH>..<HASH> 100644 --- a/acceptance/send_notification_to_email_test.go +++ b/acceptance/send_notification_to_email_test.go @@ -17,7 +17,7 @@ var _ = Describe("Send a notification to an email", func() { var templateID string var response support.NotifyResponse clientID := "notifications-sender" - clientToken := GetClientTokenFor(clientID, "uaa") + clientToken := GetClientTokenFor(clientID, "testzone1") client := support.NewClient(Servers.Notifications.URL()) By("registering a notifications", func() {
Test sending notification to email works with Identity Zones [#<I>]
diff --git a/src/org/opencms/site/CmsSiteManagerImpl.java b/src/org/opencms/site/CmsSiteManagerImpl.java index <HASH>..<HASH> 100644 --- a/src/org/opencms/site/CmsSiteManagerImpl.java +++ b/src/org/opencms/site/CmsSiteManagerImpl.java @@ -635,9 +635,9 @@ public final class CmsSiteManagerImpl implements I_CmsEventListener { siteroots.add(shared); } // all sites are compatible for root admins, skip unnecessary tests - boolean compatible = OpenCms.getRoleManager().hasRole(cms, CmsRole.ROOT_ADMIN); + boolean allCompatible = OpenCms.getRoleManager().hasRole(cms, CmsRole.ROOT_ADMIN); List<CmsResource> resources = Collections.emptyList(); - if (!compatible) { + if (!allCompatible) { try { resources = OpenCms.getOrgUnitManager().getResourcesForOrganizationalUnit(cms, ouFqn); } catch (CmsException e) { @@ -648,6 +648,7 @@ public final class CmsSiteManagerImpl implements I_CmsEventListener { Iterator<String> roots = siteroots.iterator(); while (roots.hasNext()) { String folder = roots.next(); + boolean compatible = allCompatible; if (!compatible) { Iterator<CmsResource> itResources = resources.iterator(); while (itResources.hasNext()) {
Fixed bug with visibility of sites in the site switcher.
diff --git a/lib/ffi_yajl/version.rb b/lib/ffi_yajl/version.rb index <HASH>..<HASH> 100644 --- a/lib/ffi_yajl/version.rb +++ b/lib/ffi_yajl/version.rb @@ -21,5 +21,5 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. module FFI_Yajl - VERSION = "2.0.0" + VERSION = "2.1.0" end
bumping version to <I>
diff --git a/src/Extensions/ElementalAreasExtension.php b/src/Extensions/ElementalAreasExtension.php index <HASH>..<HASH> 100644 --- a/src/Extensions/ElementalAreasExtension.php +++ b/src/Extensions/ElementalAreasExtension.php @@ -273,14 +273,14 @@ class ElementalAreasExtension extends DataExtension } $ownerClass = get_class($this->owner); - $tableName = $this->owner->getSchema()->tableName($ownerClass); $elementalAreas = $this->owner->getElementalRelations(); $schema = $this->owner->getSchema(); // There is no inbuilt filter for null values $where = []; foreach ($elementalAreas as $areaName) { - $where[] = $schema->sqlColumnForField($ownerClass, $areaName . 'ID') . ' IS NULL'; + $queryDetails = $schema->sqlColumnForField($ownerClass, $areaName . 'ID'); + $where[] = $queryDetails . ' IS NULL OR ' . $queryDetails . ' = 0' ; } foreach ($ownerClass::get()->where(implode(' OR ', $where)) as $elementalObject) {
Added extra query condition to account for values equal to 0. Removed unused variable. Added extra query parameters
diff --git a/flask_discoverer.py b/flask_discoverer.py index <HASH>..<HASH> 100644 --- a/flask_discoverer.py +++ b/flask_discoverer.py @@ -1,4 +1,4 @@ -from flask import current_app +from flask import current_app, Response import json DEFAULT_CONFIG = { @@ -51,7 +51,7 @@ class Discoverer(object): resources[rule.rule].update({key:f.view_class.__getattribute__(f.view_class,key)}) if hasattr(f,key): resources[rule.rule].update({key:f.__getattribute__(key)}) - return json.dumps(resources) + return Response(json.dumps(resources), mimetype='application/json') def advertise(*args,**kwargs): def decorator(f):
core: set mimtype='application/json' on /resources