diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/IdentifierGenerator.php b/src/IdentifierGenerator.php index <HASH>..<HASH> 100644 --- a/src/IdentifierGenerator.php +++ b/src/IdentifierGenerator.php @@ -13,8 +13,6 @@ interface IdentifierGenerator * * The generated ID is supposed to be used on a resource that * is going to be created by a command handler - * - * @return mixed */ - public function generate(); + public function generate(): object; }
Force identifier generator to always return objects As of PHP <I>, we can override the return type declaration of the method as long as covariance is kept. This also makes the library a bit more type-safe, which is always good. More info: <URL>
diff --git a/Core/FieldType/SyliusProduct/SyliusProductStorage.php b/Core/FieldType/SyliusProduct/SyliusProductStorage.php index <HASH>..<HASH> 100644 --- a/Core/FieldType/SyliusProduct/SyliusProductStorage.php +++ b/Core/FieldType/SyliusProduct/SyliusProductStorage.php @@ -215,7 +215,18 @@ class SyliusProductStorage extends GatewayBasedStorage $productId = $gateway->getFieldData( $versionInfo ); - $product = $this->repository->find( $productId ); + $product = null; + if( !empty( $productId ) ) + { + $product = $this->repository->find( $productId ); + } + + if ( $product ) + { + $product->setCurrentLocale( + $this->localeConverter->convertToPOSIX( $field->languageCode ) + ); + } $field->value->externalData = $product; }
Added sanity check and locale setting when loading field data
diff --git a/lib/widget_list.rb b/lib/widget_list.rb index <HASH>..<HASH> 100755 --- a/lib/widget_list.rb +++ b/lib/widget_list.rb @@ -1043,10 +1043,10 @@ module WidgetList if $_REQUEST.key?('ajax') model = model_name.constantize - model.columns.keys.each { |field| - fields[field] = field.gsub(/_/,' _').camelize - all_fields[field] = field.gsub(/_/,' _').camelize - fields_function[field] = 'CNT(' + field + ') or NVL(' + field + ') or TO_DATE(' + field + ') etc...' + model.columns.each { |field| + fields[field.name] = field.name.gsub(/_/,' _').camelize + all_fields[field.name] = field.name.gsub(/_/,' _').camelize + fields_function[field.name] = 'CNT(' + field.name + ') or NVL(' + field.name + ') or TO_DATE(' + field.name + ') etc...' } footer_buttons['Add New ' + model_name] = {} footer_buttons['Add New ' + model_name]['url'] = '/' + controller + '/add/'
Hot fixes to get the admin ajax working.
diff --git a/lib/fog/fogdocker/models/compute/server.rb b/lib/fog/fogdocker/models/compute/server.rb index <HASH>..<HASH> 100644 --- a/lib/fog/fogdocker/models/compute/server.rb +++ b/lib/fog/fogdocker/models/compute/server.rb @@ -79,11 +79,12 @@ module Fog # } def ready? - state_running == true + reload if state_running.nil? + state_running end def stopped? - state_running == false + !ready? end def mac
[Docker] fixes running state is not loaded, becase list-containers get only part of the container attributes
diff --git a/lib/simple_memoize.rb b/lib/simple_memoize.rb index <HASH>..<HASH> 100644 --- a/lib/simple_memoize.rb +++ b/lib/simple_memoize.rb @@ -3,17 +3,21 @@ module SimpleMemoize module Module def memoize(method_name) + method_name = method_name.to_s memoized_method_name = "#{method_name}_with_memo" regular_method_name = "#{method_name}_without_memo" + unless (instance_methods + private_instance_methods).include?(method_name) + raise NoMethodError, "#{method_name} cannot be memoized because it doesn't exist in #{self}" + end return if self.method_defined?(memoized_method_name) self.class_eval do define_method memoized_method_name do |*args| - @simple_memo ||= {} - @simple_memo[method_name] ||= {} - @simple_memo[method_name][args] ||= send(regular_method_name, *args) + @simple_memoize ||= {} + @simple_memoize[method_name] ||= {} + @simple_memoize[method_name][args] ||= send(regular_method_name, *args) end alias_method regular_method_name, method_name
Matching the memoization hash to the project name
diff --git a/src/main/java/io/github/bonigarcia/wdm/config/Config.java b/src/main/java/io/github/bonigarcia/wdm/config/Config.java index <HASH>..<HASH> 100644 --- a/src/main/java/io/github/bonigarcia/wdm/config/Config.java +++ b/src/main/java/io/github/bonigarcia/wdm/config/Config.java @@ -1084,8 +1084,8 @@ public class Config { public String getDockerTmpfsMount() { if (IS_OS_WINDOWS) { - String tmpdir = System.getProperty("java.io.tmpdir"); - tmpdir = "//" + tmpdir.replace(":\\", "/").replace("\\", "/"); + String tmpdir = new File("").getAbsolutePath(); + tmpdir = "/" + tmpdir.replace(":\\", "/").replace("\\", "/"); log.trace("Using temporal folder for Tmpfs: {}", tmpdir); return tmpdir; }
Use local folder for Tmpfs volume in Windows
diff --git a/src/Database/Barry/Model.php b/src/Database/Barry/Model.php index <HASH>..<HASH> 100644 --- a/src/Database/Barry/Model.php +++ b/src/Database/Barry/Model.php @@ -728,7 +728,7 @@ abstract class Model implements \ArrayAccess, \JsonSerializable */ public function __toString() { - return json_encode($this->attributes); + return $this->toJson(); } /**
change: refactoring to string method
diff --git a/pushy/src/main/java/com/turo/pushy/apns/server/BaseHttp2ServerBuilder.java b/pushy/src/main/java/com/turo/pushy/apns/server/BaseHttp2ServerBuilder.java index <HASH>..<HASH> 100644 --- a/pushy/src/main/java/com/turo/pushy/apns/server/BaseHttp2ServerBuilder.java +++ b/pushy/src/main/java/com/turo/pushy/apns/server/BaseHttp2ServerBuilder.java @@ -291,6 +291,15 @@ abstract class BaseHttp2ServerBuilder <T extends BaseHttp2Server> { sslContextBuilder.trustManager(this.trustedClientCertificates); } + // Mock server needs to be able to inform to ALPN-enabled HTTP clients + // which protocols are supported during the protocol negotiation phase. + // In this case, mock server should only support HTTP/2 in order to mock real APNS servers. + sslContextBuilder.applicationProtocolConfig(new ApplicationProtocolConfig( + ApplicationProtocolConfig.Protocol.ALPN, + ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE, + ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT, + ApplicationProtocolNames.HTTP_2)); + sslContext = sslContextBuilder.build(); }
Fixing an issue in mock server where the ALPN extension fields for protocol negotiation were not being added to the 'Server Hello' TLS package.
diff --git a/tests/src/Functional/InstallationTest.php b/tests/src/Functional/InstallationTest.php index <HASH>..<HASH> 100644 --- a/tests/src/Functional/InstallationTest.php +++ b/tests/src/Functional/InstallationTest.php @@ -93,15 +93,4 @@ class InstallationTest extends TestCase { $this->assertEquals('/api', $output['result']['openApi']['basePath']); } - public function testGraphQLQuery() { - $query = '{"query":"query{nodeQuery{entities{entityLabel ... on NodeRecipe { fieldIngredients }}}}","variables":null}'; - $response = $this->httpClient->post($this->baseUrl . '/graphql', [ - 'body' => $query, - ]); - $this->assertEquals(200, $response->getStatusCode()); - $body = $response->getBody()->getContents(); - $output = Json::decode($body); - $entities = $output['data']['nodeQuery']['entities']; - $this->assertFalse(empty($entities)); - } }
fix: remove GraphQL tests
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -28,14 +28,15 @@ async function resolveAsDirectory(request: string, parent: string, config: Confi try { manifest = JSON.parse(await config.fs.readFile(Path.join(request, 'package.json'))) } catch (_) { /* No Op */ } - let givenMainFile = Path.normalize(config.process(manifest, request)) + let givenMainFile = config.process(manifest, request) + givenMainFile = Path.normalize(givenMainFile) + (givenMainFile.substr(0, 1) === '/' ? '/' : '') if (givenMainFile === '.' || givenMainFile === '.\\' || givenMainFile === './') { givenMainFile = './index' } let mainFile = Path.isAbsolute(givenMainFile) ? givenMainFile : Path.resolve(request, givenMainFile) const stat = await statItem(mainFile, config) // $/ should be treated as a dir first - if (stat && mainFile.substr(-1) === '/') { + if (stat && givenMainFile.substr(-1) === '/') { // Disallow requiring a file as a directory if (!stat.isDirectory()) { throw getError(givenRequest, parent, config)
:bug: Fix a priority bug in deep manifest resolution
diff --git a/scalar.py b/scalar.py index <HASH>..<HASH> 100755 --- a/scalar.py +++ b/scalar.py @@ -13,7 +13,6 @@ def main(): print(f.header); print("reading in data"); data = f.get_data(pool_size=24,lazy=False); - print("selecting data"); print("dumping"); with open(sys.argv[2],"wb") as f: cPickle.dump(data,f,2);
removed extraneous print line...
diff --git a/src/Illuminate/Http/Request.php b/src/Illuminate/Http/Request.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Http/Request.php +++ b/src/Illuminate/Http/Request.php @@ -197,9 +197,9 @@ class Request extends \Symfony\Component\HttpFoundation\Request { { $keys = is_array($keys) ? $keys : func_get_args(); - $input = $this->input(); + $input = array_only($this->input(), $keys); - return array_only($input, $keys); + return array_merge(array_fill_keys($keys, null), $input); } /**
Set default value to null for Input::only instead of being undefined.
diff --git a/ghost/members-api/lib/MembersAPI.js b/ghost/members-api/lib/MembersAPI.js index <HASH>..<HASH> 100644 --- a/ghost/members-api/lib/MembersAPI.js +++ b/ghost/members-api/lib/MembersAPI.js @@ -234,10 +234,7 @@ module.exports = function MembersAPI({ await MemberLoginEvent.add({member_id: member.id}); if (oldEmail) { // user exists but wants to change their email address - if (oldEmail) { - member.email = email; - } - await users.update(member, {id: member.id}); + await users.update({email}, {id: member.id}); return getMemberIdentityData(email); } return member; @@ -279,8 +276,7 @@ module.exports = function MembersAPI({ // max request time is 500ms so shouldn't slow requests down too much let geolocation = JSON.stringify(await geolocationService.getGeolocationFromIP(ip)); if (geolocation) { - member.geolocation = geolocation; - await users.update(member, {id: member.id}); + await users.update({geolocation}, {id: member.id}); } return getMemberIdentityData(email);
Fixed issue with new members always subscribing to defaults no issue The member was updated when setting the geolocation, but that also included setting subscribed to true.
diff --git a/check_manifest.py b/check_manifest.py index <HASH>..<HASH> 100755 --- a/check_manifest.py +++ b/check_manifest.py @@ -139,8 +139,10 @@ def run(command, encoding=None, decode=True, cwd=None): if not encoding: encoding = locale.getpreferredencoding() try: - pipe = subprocess.Popen(command, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, cwd=cwd) + with open(os.devnull, 'rb') as devnull: + pipe = subprocess.Popen(command, stdin=devnull, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, cwd=cwd) except OSError as e: raise Failure("could not run %s: %s" % (command, e)) output = pipe.communicate()[0]
Explicitly close stdin for subprocesses One reason to do that is because any prompts would be invisible, since we're intercepting the stdout and stderr. Another (and main reason) to do this is that I'm getting weird "0: Bad file descriptor" errors from git-submodule on Appveyor.
diff --git a/my-smappee.js b/my-smappee.js index <HASH>..<HASH> 100644 --- a/my-smappee.js +++ b/my-smappee.js @@ -1,10 +1,13 @@ var SmappeeAPI = require('./lib/smappee-api'); var smappee = new SmappeeAPI({ - ip: "0.0.0.0", debug: true, - username: "admin", - password: "admin" + + clientId: "xxx", + clientSecret: "xxx", + + username: "xxx", + password: "xxx" }); module.exports = smappee; \ No newline at end of file
example my-smappee file
diff --git a/iota/codecs.py b/iota/codecs.py index <HASH>..<HASH> 100644 --- a/iota/codecs.py +++ b/iota/codecs.py @@ -4,7 +4,7 @@ from __future__ import absolute_import, division, print_function, \ from codecs import Codec, CodecInfo, register as lookup_function -from six import binary_type +from six import PY3, binary_type __all__ = [ 'TrytesCodec', @@ -46,11 +46,17 @@ class TrytesCodec(Codec): """ codec = cls() - return CodecInfo( - encode = codec.encode, - decode = codec.decode, - _is_text_encoding = False, - ) + codec_info = { + 'encode': codec.encode, + 'decode': codec.decode, + } + + # In Python 2, all codecs are made equal. + # In Python 3, some codecs are more equal than others. + if PY3: + codec_info['_is_text_encoding'] = False + + return CodecInfo(**codec_info) # noinspection PyShadowingBuiltins def encode(self, input, errors='strict'):
Improved compatibility with Python <I>.
diff --git a/client/signup/index.js b/client/signup/index.js index <HASH>..<HASH> 100644 --- a/client/signup/index.js +++ b/client/signup/index.js @@ -32,7 +32,6 @@ module.exports = function() { } if ( config.isEnabled( 'jetpack/connect' ) ) { - page( '/jetpack/connect/install', jetpackConnectController.install ); page( '/jetpack/connect', jetpackConnectController.connect ); page( '/jetpack/connect/authorize/:locale?',
Jetpack Connect: Remove extra jetpack/connect/install page statement
diff --git a/packages/eslint-config-4catalyzer-react/rules.js b/packages/eslint-config-4catalyzer-react/rules.js index <HASH>..<HASH> 100644 --- a/packages/eslint-config-4catalyzer-react/rules.js +++ b/packages/eslint-config-4catalyzer-react/rules.js @@ -11,16 +11,17 @@ module.exports = { aspects: ['noHref', 'invalidHref', 'preferButton'], }, ], - 'jsx-a11y/label-has-for': [ + 'jsx-a11y/label-has-associated-control': [ 'error', { - components: [], - required: { - some: ['nesting', 'id'], - }, - allowChildren: false, + labelComponents: [], + labelAttributes: [], + controlComponents: [], + assert: 'either', + depth: 25, }, ], + 'jsx-a11y/label-has-for': 'off', 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', // It's clearer to use required even on props with defaults to indicate
fix: Update jsx-a<I>y overrides (#<I>)
diff --git a/src/Intahwebz/Timer.php b/src/Intahwebz/Timer.php index <HASH>..<HASH> 100644 --- a/src/Intahwebz/Timer.php +++ b/src/Intahwebz/Timer.php @@ -25,12 +25,38 @@ class Timer { $this->timeRecords[] = array($time, $this->description); $this->startTime = null; - $this->lineNumber = null; $this->description = null; } function dumpTime() { - var_dump($this->timeRecords); + + $totals = array(); + + foreach ($this->timeRecords as $timeRecord) { + $time = $timeRecord[0]; + $description = $timeRecord[1]; + + if(isset($totals[$description])) { + $total = $totals[$description]; + $total['called'] += 1; + $total['time'] += $time; + } + else { + $total = array(); + $total['called'] = 1; + $total['time'] = $time; + + $totals[$description] = $total; + } + } + + echo "Timer results\n"; + + foreach ($totals as $description => $total) { + echo '"'.$description.'", '; + echo 'called '.$total['called'].' time, '; + echo 'total time:'.$total['time']."\n"; + } } }
Made timer be able to show results.
diff --git a/omrdatasettools/__init__.py b/omrdatasettools/__init__.py index <HASH>..<HASH> 100644 --- a/omrdatasettools/__init__.py +++ b/omrdatasettools/__init__.py @@ -1,4 +1,4 @@ -__version__ = '1.1' +__version__ = '1.2' from .Downloader import * from .OmrDataset import OmrDataset
Upgrading to <I> for adding lxml into requirements when installing omrdatasettools
diff --git a/sos/plugins/crio.py b/sos/plugins/crio.py index <HASH>..<HASH> 100644 --- a/sos/plugins/crio.py +++ b/sos/plugins/crio.py @@ -11,7 +11,7 @@ from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin -class CRIO(Plugin): +class CRIO(Plugin, RedHatPlugin, UbuntuPlugin): """CRI-O containers """
[crio] Add tagging classes Adds tagging classes so plugin will run on Red Hat and Ubuntu based systems. Resolves: #<I>
diff --git a/pystache/tests/test_doctests.py b/pystache/tests/test_doctests.py index <HASH>..<HASH> 100644 --- a/pystache/tests/test_doctests.py +++ b/pystache/tests/test_doctests.py @@ -25,9 +25,12 @@ text_file_paths = ['README.rst'] # The following load_tests() function implements unittests's load_tests -# protocol added in Python 2.7. Using this protocol allows us to -# include the doctests in test runs without the use of nose, for example -# when using Distribute's test as in the following: +# protocol added in Python 2.7: +# +# http://docs.python.org/library/unittest.html#load-tests-protocol +# +# Using this protocol lets us include the doctests in test runs without +# using nose, for example when using Distribute's test as in the following: # # python setup.py test #
Added a code comment with a link to unittest's load_tests protocol.
diff --git a/castWebApi.js b/castWebApi.js index <HASH>..<HASH> 100644 --- a/castWebApi.js +++ b/castWebApi.js @@ -30,7 +30,7 @@ interpretArguments(); if (!windows) { startApi(); } else { - console.log( process.argv[1].split("\bin\cast-web-api")[0] ); + console.log( process.argv[1].replace("\bin\cast-web-api", "") ); } function startApi() {
Changed --windows for global install path
diff --git a/tests/util.py b/tests/util.py index <HASH>..<HASH> 100644 --- a/tests/util.py +++ b/tests/util.py @@ -10,6 +10,7 @@ from paramiko.py3compat import builtins, PY2 from paramiko.ssh_gss import GSS_AUTH_AVAILABLE from cryptography.exceptions import UnsupportedAlgorithm, _Reasons +from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding, rsa @@ -155,7 +156,7 @@ def sha1_signing_unsupported(): not supported by the backend. """ private_key = rsa.generate_private_key( - public_exponent=65537, key_size=2048 + public_exponent=65537, key_size=2048, backend=default_backend() ) message = b"Some dummy text" try:
Fix for compatibility with old versions of cryptography
diff --git a/src/authority/admin.py b/src/authority/admin.py index <HASH>..<HASH> 100644 --- a/src/authority/admin.py +++ b/src/authority/admin.py @@ -6,7 +6,7 @@ from django.utils.text import capfirst, truncate_words from authority.models import Permission from authority.widgets import GenericForeignKeyRawIdWidget -from autority import get_choices_for +from authority import get_choices_for class PermissionInline(generic.GenericTabularInline): model = Permission
Fixing issue #3 for realz.
diff --git a/php/commands/cron.php b/php/commands/cron.php index <HASH>..<HASH> 100644 --- a/php/commands/cron.php +++ b/php/commands/cron.php @@ -509,7 +509,9 @@ class Cron_Command extends WP_CLI_Command { * @return WP_Error|array The response or WP_Error on failure. */ protected static function get_cron_spawn() { + global $wp_version; + $sslverify = version_compare( $wp_version, 4.0, '<' ); $doing_wp_cron = sprintf( '%.22F', microtime( true ) ); $cron_request = apply_filters( 'cron_request', array( @@ -518,7 +520,7 @@ class Cron_Command extends WP_CLI_Command { 'args' => array( 'timeout' => 3, 'blocking' => true, - 'sslverify' => apply_filters( 'https_local_ssl_verify', true ) + 'sslverify' => apply_filters( 'https_local_ssl_verify', $sslverify ) ) ) );
When testing WP-Cron, correctly set the `sslverify `argument depending on the version of WordPress in use.
diff --git a/core/api/src/main/java/org/openengsb/core/api/workflow/WorkflowService.java b/core/api/src/main/java/org/openengsb/core/api/workflow/WorkflowService.java index <HASH>..<HASH> 100644 --- a/core/api/src/main/java/org/openengsb/core/api/workflow/WorkflowService.java +++ b/core/api/src/main/java/org/openengsb/core/api/workflow/WorkflowService.java @@ -21,9 +21,10 @@ import java.util.Map; import java.util.concurrent.Future; import org.openengsb.core.api.Event; +import org.openengsb.core.api.OpenEngSBService; import org.openengsb.core.api.workflow.model.ProcessBag; -public interface WorkflowService { +public interface WorkflowService extends OpenEngSBService { /** * processes the event in the Knowledgebase by inserting it as a fact, and signaling it the processes it may * concern. The processes the Event is signaled to are determined by looking at the processId-field of the event. If
[OPENENGSB-<I>] WorkflowService has to extend OpenEngSBService
diff --git a/packages/tractor-ui/src/app/Core/Services/RedirectionService.js b/packages/tractor-ui/src/app/Core/Services/RedirectionService.js index <HASH>..<HASH> 100644 --- a/packages/tractor-ui/src/app/Core/Services/RedirectionService.js +++ b/packages/tractor-ui/src/app/Core/Services/RedirectionService.js @@ -6,7 +6,6 @@ function RedirectionService ($state, fileTypes) { this.fileTypes = fileTypes; } RedirectionService.prototype.goToFile = function (file) { - file.url = '/' + file.url; var fileType = this.fileTypes.find(function (fileType) { return file.url.endsWith(fileType.extension); });
fix(ui :lipstick:) - fix extra slash in redirection logic
diff --git a/pyfakefs/fake_filesystem.py b/pyfakefs/fake_filesystem.py index <HASH>..<HASH> 100644 --- a/pyfakefs/fake_filesystem.py +++ b/pyfakefs/fake_filesystem.py @@ -5041,10 +5041,11 @@ class FakePipeWrapper(object): def __init__(self, filesystem, fd): self._filesystem = filesystem self.fd = fd # the real file descriptor + self.file_object = None self.filedes = None def get_object(self): - return None + return self.file_object def fileno(self): """Return the fake file descriptor of the pipe object."""
Added dummy file object to FakePipeWrapper - used if iterating open files
diff --git a/src/clusterpost-execution/executionserver.methods.js b/src/clusterpost-execution/executionserver.methods.js index <HASH>..<HASH> 100644 --- a/src/clusterpost-execution/executionserver.methods.js +++ b/src/clusterpost-execution/executionserver.methods.js @@ -230,7 +230,12 @@ module.exports = function (conf) { handler.createOutputDirs = function(doc){ var cwd = handler.getDirectoryCWD(doc); _.each(doc.outputs, (output)=>{ - var target_dir = path.dirname(path.join(cwd, output.name)); + if(output.type == "directory"){ + var target_dir = path.join(cwd, output.name); + }else{ + var target_dir = path.dirname(path.join(cwd, output.name)); + } + if(!fs.existsSync(target_dir)){ fs.mkdirSync(target_dir, {recursive: true}); }
BUG: If the output type is directory create it If the output type is directory, don't get the dirname
diff --git a/wandb/wandb_keras.py b/wandb/wandb_keras.py index <HASH>..<HASH> 100644 --- a/wandb/wandb_keras.py +++ b/wandb/wandb_keras.py @@ -76,9 +76,11 @@ class WandbKerasCallback(object): # summary current = logs.get(self.monitor) - if current is None: - print('Can save best model only with %s available, ' - 'skipping.' % (self.monitor)) + if current is None: # validation data wasn't set +# print('Can save best model only with %s available, ' +# 'skipping.' % (self.monitor)) + wandb.run.summary.update(row) + return copied = copy.copy(row) if self.monitor_op(current, self.best):
fixed bug when keras callback is used without validation data
diff --git a/discord/message.py b/discord/message.py index <HASH>..<HASH> 100644 --- a/discord/message.py +++ b/discord/message.py @@ -281,7 +281,7 @@ class MessageReference: The guild id of the message referenced. resolved: Optional[Union[:class:`Message`, :class:`DeletedReferencedMessage`]] The message that this reference resolved to. If this is ``None`` - then the original message was not fetched either due to the discord API + then the original message was not fetched either due to the Discord API not attempting to resolve it or it not being available at the time of creation. If the message was resolved at a prior point but has since been deleted then this will be of type :class:`DeletedReferencedMessage`. @@ -430,7 +430,7 @@ class Message(Hashable): .. warning:: The order of the mentions list is not in any particular order so you should - not rely on it. This is a discord limitation, not one with the library. + not rely on it. This is a Discord limitation, not one with the library. channel_mentions: List[:class:`abc.GuildChannel`] A list of :class:`abc.GuildChannel` that were mentioned. If the message is in a private message then the list is always empty.
Capitalize Discord in docs of message related attributes
diff --git a/tests/ApiTest.php b/tests/ApiTest.php index <HASH>..<HASH> 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -21,6 +21,8 @@ class ApiTest extends \PHPUnit_Framework_TestCase { $this->assertEquals('user', $api->getUsername()); $this->assertEquals('pass', $api->getPassword()); $this->assertEquals('/dev/null', $api->getCertificatePath()); + $this->assertEquals(TRUE, $api->hasBasicAuthentication()); + $this->assertEquals(TRUE, $api->hasCertificatePath()); } } \ No newline at end of file
Added tests for boolean has functions
diff --git a/lib/preferences.js b/lib/preferences.js index <HASH>..<HASH> 100644 --- a/lib/preferences.js +++ b/lib/preferences.js @@ -31,14 +31,21 @@ Preferences.write = function(key, value) { .then(contents => { contents = contents || {}; contents[key] = value; - fs.writeFile(preferencesJson, JSON.stringify(contents), function(error) { + fs.ensureFile(preferencesJson, function(err){ if (error) { log.error('Error writing preference', key, value); reject(error); } else { - resolve(); + fs.writeFile(preferencesJson, JSON.stringify(contents), function(error) { + if (error) { + log.error('Error writing preference', key, value); + reject(error); + } else { + resolve(); + } + }); } - }); + }) }) .catch(error => { reject(error);
fs.ensureFile to fix missing .tessel dir in Preferences.write Fix for issue #<I>
diff --git a/htmresearch/algorithms/temporal_memory_factory.py b/htmresearch/algorithms/temporal_memory_factory.py index <HASH>..<HASH> 100644 --- a/htmresearch/algorithms/temporal_memory_factory.py +++ b/htmresearch/algorithms/temporal_memory_factory.py @@ -74,11 +74,8 @@ class ReversedExtendedTemporalMemory(FastETM): else: activeApicalCells = [] - self.activateBasalDendrites( + self.activateDendrites( activeExternalCells, - learn - ) - self.activateApicalDendrites( activeApicalCells, learn )
Call activateDendrites, not activateBasalDendrites. activateBasalDendrites and activateApicalDendrites are being removed.
diff --git a/lib/adapter.js b/lib/adapter.js index <HASH>..<HASH> 100644 --- a/lib/adapter.js +++ b/lib/adapter.js @@ -10586,7 +10586,9 @@ define("../vendor/jquery-1.10.1.min.js", function(){}); }, onCucumberFinished: function onCucumberFinished() { - karma.complete({}); + karma.complete({ + coverage: window.__coverage__ + }); } }; diff --git a/source/adapter/cucumber_runner.js b/source/adapter/cucumber_runner.js index <HASH>..<HASH> 100644 --- a/source/adapter/cucumber_runner.js +++ b/source/adapter/cucumber_runner.js @@ -71,7 +71,9 @@ }, onCucumberFinished: function onCucumberFinished() { - karma.complete({}); + karma.complete({ + coverage: window.__coverage__ + }); } };
Pass on code coverage results back to Karma. Resolves #<I>
diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index <HASH>..<HASH> 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -38,7 +38,7 @@ class BaseConnection(object): key_file=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=8, session_timeout=60, keepalive=0, default_enter=None, response_return=None, - serial_settings={}): + serial_settings=None): """ Initialize attributes for establishing connection to target device. @@ -129,6 +129,8 @@ class BaseConnection(object): self.timeout = timeout self.session_timeout = session_timeout self.keepalive = keepalive + if serial_settings is None: + serial_settings = {} self.serial_settings = serial_settings self.serial_defaults = { 'baudrate': 9600,
implemented suggested fix for python mutable issue
diff --git a/lib/chef/resource/portage_package.rb b/lib/chef/resource/portage_package.rb index <HASH>..<HASH> 100644 --- a/lib/chef/resource/portage_package.rb +++ b/lib/chef/resource/portage_package.rb @@ -22,13 +22,9 @@ class Chef class Resource class PortagePackage < Chef::Resource::Package resource_name :portage_package - description "Use the portage_package resource to manage packages for the Gentoo platform." - - def initialize(name, run_context = nil) - super - @provider = Chef::Provider::Package::Portage - end + provides :portage_package + description "Use the portage_package resource to manage packages for the Gentoo platform." end end end
Modernize provides in the portage_package resource
diff --git a/test/render.test.js b/test/render.test.js index <HASH>..<HASH> 100644 --- a/test/render.test.js +++ b/test/render.test.js @@ -66,6 +66,7 @@ describe('Render ', function() { it('validates', function(done) { var count = 0; tileCoords.forEach(function(coords,idx,array) { + source._info.format = 'png32'; source.getTile(coords[0], coords[1], coords[2], function(err, tile, headers) { if (err) throw err; @@ -107,6 +108,7 @@ describe('Render ', function() { it('validates', function(done) { var count = 0; tileCoords.forEach(function(coords,idx,array) { + source._info.format = 'png32'; source.getTile(coords[0], coords[1], coords[2], function(err, tile, headers) { if (err) throw err;
explicitly request png<I> images to keep tests passed before and after <URL>
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -39,6 +39,7 @@ if (isClient) { $(function() { $('body').on('click', 'a', function(e) { + if (Boolean($(this).data('extern'))) return if (this.protocol === 'javascript:') return if (this.hash || !$(this).attr('href') || $(this).attr('href') == '#') return if (!sameOrigin($(this).attr('href'))) return
Add Data-Attribute Option to Force Links as external Ones <a href="…" data-extern="true"> bypasses client-side execution
diff --git a/tests/test_httpserver.py b/tests/test_httpserver.py index <HASH>..<HASH> 100644 --- a/tests/test_httpserver.py +++ b/tests/test_httpserver.py @@ -104,7 +104,7 @@ class TestHttpserver(unittest.TestCase): head, body = response.split(b'\r\n\r\n', 1) # Do we have the 404 error assert head.startswith(b'HTTP/1.1 404 Not Found\r\n') - # TODO more tests here + assert self.transport.close.called def test_get_absoluteURI(self): """HTTP 1.1 servers MUST accept absoluteURI form Request-URIs
Test for dir without html added test on close
diff --git a/src/Composer/Compiler.php b/src/Composer/Compiler.php index <HASH>..<HASH> 100644 --- a/src/Composer/Compiler.php +++ b/src/Composer/Compiler.php @@ -126,7 +126,7 @@ class Compiler private function addFile($phar, $file, $strip = true) { - $path = str_replace(dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR, '', $file->getRealPath()); + $path = strtr(str_replace(dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR, '', $file->getRealPath()), '\\', '/'); $content = file_get_contents($file); if ($strip) { @@ -135,8 +135,10 @@ class Compiler $content = "\n".$content."\n"; } - $content = str_replace('@package_version@', $this->version, $content); - $content = str_replace('@release_date@', $this->versionDate, $content); + if ($path === 'src/Composer/Composer.php') { + $content = str_replace('@package_version@', $this->version, $content); + $content = str_replace('@release_date@', $this->versionDate, $content); + } $phar->addFromString($path, $content); }
Only replace version in Composer.php, fix user agent
diff --git a/src/Handler/SMSHandler.php b/src/Handler/SMSHandler.php index <HASH>..<HASH> 100644 --- a/src/Handler/SMSHandler.php +++ b/src/Handler/SMSHandler.php @@ -3,6 +3,7 @@ namespace Tylercd100\Monolog\Handler; use Exception; +use Monolog\Formatter\FormatterInterface; use Monolog\Handler\SocketHandler; use Monolog\Logger; use Tylercd100\Monolog\Formatter\SMSFormatter; @@ -81,7 +82,7 @@ abstract class SMSHandler extends SocketHandler * @param array $record * @return string */ - protected function generateDataStream($record) + protected function generateDataStream(array $record) :string { $content = $this->buildContent($record); return $this->buildHeader($content) . $content; @@ -133,7 +134,7 @@ abstract class SMSHandler extends SocketHandler * * @param array $record */ - protected function write(array $record) + protected function write(array $record) :void { parent::write($record); $this->closeSocket(); @@ -142,7 +143,7 @@ abstract class SMSHandler extends SocketHandler /** * {@inheritdoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter(): FormatterInterface { return new SMSFormatter(); }
Fix SMSHandler to be compatible with Monolog 2
diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/response.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb @@ -35,7 +35,7 @@ module ActionDispatch elsif type.is_a?(Symbol) && @response.response_code == Rack::Utils::SYMBOL_TO_STATUS_CODE[type] assert_block("") { true } # to count the assertion else - flunk(build_message(message, "Expected response to be a <?>, but was <?>", type, @response.response_code)) + flunk "Expected response to be a <#{type}>, but was <#{@response.response_code}>" end end
stop using build_message for creating a string
diff --git a/lib/roo_on_rails/railties/http.rb b/lib/roo_on_rails/railties/http.rb index <HASH>..<HASH> 100644 --- a/lib/roo_on_rails/railties/http.rb +++ b/lib/roo_on_rails/railties/http.rb @@ -17,7 +17,7 @@ module RooOnRails ::Rack::Timeout ) - middleware_to_insert_before = defined?('Rack::Head') ? ::Rack::Head : ::ActionDispatch::Cookies + middleware_to_insert_before = defined?(::Rack::Head) ? ::Rack::Head : ::ActionDispatch::Cookies # This needs to be inserted low in the stack, before Rails returns the # thread-current connection to the pool.
Make it smarter about picking middleware
diff --git a/lib/job.js b/lib/job.js index <HASH>..<HASH> 100644 --- a/lib/job.js +++ b/lib/job.js @@ -5,6 +5,13 @@ module.exports = { webapp: webapp } +function defExtend(dest, src) { + for (var key in src) { + if (!src[key]) continue; + dest[key] = src[key] + } +} + // schema // { // routes: function (app, context) {} @@ -12,6 +19,9 @@ module.exports = { // listen: function (io, context) {} // } function webapp(id, plugin, striderjson, context, done) { + if (plugin.appConfig) { + defExtend(plugin.appConfig, context.config.plugins[id] || {}) + } // setup routes if (plugin.routes) { jobRoutes(id, plugin, context)
Enable configuration override of job plugin defaults (tests not updated)
diff --git a/shared/route-tree/index.js b/shared/route-tree/index.js index <HASH>..<HASH> 100644 --- a/shared/route-tree/index.js +++ b/shared/route-tree/index.js @@ -159,7 +159,10 @@ function _routeSet( ): RouteStateNode { const pathHead = pathSpec && pathSpec.first() - let newRouteState = routeState || new RouteStateNode({selected: routeDef.defaultSelected}) + let newRouteState = + routeState || + // Set the initial state off of the route def + new RouteStateNode({selected: routeDef.defaultSelected, state: I.Map(routeDef.initialState)}) if (pathHead && pathHead.type === 'navigate') { newRouteState = newRouteState.set('selected', pathHead.next || routeDef.defaultSelected) if (pathHead.next === null && !routeDef.tags.persistChildren) {
set initial state when making RouteStateNode (#<I>)
diff --git a/Tone/component/FrequencyEnvelope.js b/Tone/component/FrequencyEnvelope.js index <HASH>..<HASH> 100644 --- a/Tone/component/FrequencyEnvelope.js +++ b/Tone/component/FrequencyEnvelope.js @@ -13,12 +13,12 @@ define(["Tone/core/Tone", "Tone/component/ScaledEnvelope", "Tone/component/Envel * @param {number} [sustain] a percentage (0-1) of the full amplitude * @param {Time} [release] the release time in seconds * @example - * var env = new Tone.FrequencyEnvelope({ + * var freqEnv = new Tone.FrequencyEnvelope({ * "attack" : 0.2, * "baseFrequency" : "C2", * "octaves" : 4 * }); - * scaledEnv.connect(oscillator.frequency); + * freqEnv.connect(oscillator.frequency); */ Tone.FrequencyEnvelope = function(){
Fixed variable name in example (#<I>)
diff --git a/src/background.js b/src/background.js index <HASH>..<HASH> 100644 --- a/src/background.js +++ b/src/background.js @@ -22,10 +22,10 @@ let panelId = undefined; function openPage() { const getContentWindowInfo = browser.windows.getLastFocused(); const getSideexWindowInfo = browser.windows.create({ - url: browser.extension.getURL("assets/panel.html"), + url: browser.extension.getURL("assets/index.html"), type: "popup", height: 730, - width: 750 + width: 480 }); Promise.all([getContentWindowInfo, getSideexWindowInfo])
hot reload as extension popup
diff --git a/remoto/process.py b/remoto/process.py index <HASH>..<HASH> 100644 --- a/remoto/process.py +++ b/remoto/process.py @@ -6,6 +6,8 @@ from .util import admin_command def _remote_run(channel, cmd, **kw): import subprocess import sys + stop_on_nonzero = kw.pop('stop_on_nonzero', True) + process = subprocess.Popen( cmd, @@ -34,7 +36,10 @@ def _remote_run(channel, cmd, **kw): returncode = process.wait() if returncode != 0: - raise RuntimeError("command returned non-zero exit status: %s" % returncode) + if stop_on_nonzero: + raise RuntimeError("command returned non-zero exit status: %s" % returncode) + else: + channel.send({'warning': "command returned non-zero exit status: %s" % returncode}) def run(conn, command, exit=False, timeout=None, **kw):
add non zero exit status to be configured for a raise
diff --git a/lib/y_support/name_magic.rb b/lib/y_support/name_magic.rb index <HASH>..<HASH> 100644 --- a/lib/y_support/name_magic.rb +++ b/lib/y_support/name_magic.rb @@ -69,13 +69,17 @@ module NameMagic ɴ = self.class.__instances__[ self ] if ɴ then name_get_closure = self.class.instance_variable_get :@name_get_closure - return name_get_closure ? name_get_closure.( ɴ ) : ɴ - else - return nil - end + name_get_closure ? name_get_closure.( ɴ ) : ɴ + else nil end end alias ɴ name + # Retrieves either an instance name (if present), or an object id. + # + def name_or_object_id + name || object_id + end + # Names an instance, cautiously (ie. no overwriting of existing names). # def name=( ɴ )
adding method #name_or_object_id
diff --git a/src/main/java/com/corundumstudio/socketio/handler/AuthorizeHandler.java b/src/main/java/com/corundumstudio/socketio/handler/AuthorizeHandler.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/corundumstudio/socketio/handler/AuthorizeHandler.java +++ b/src/main/java/com/corundumstudio/socketio/handler/AuthorizeHandler.java @@ -95,7 +95,7 @@ public class AuthorizeHandler extends ChannelInboundHandlerAdapter implements Di if (!configuration.isAllowCustomRequests() && !queryDecoder.path().startsWith(connectPath)) { HttpResponse res = new DefaultHttpResponse(HTTP_1_1, HttpResponseStatus.BAD_REQUEST); - channel.write(res).addListener(ChannelFutureListener.CLOSE); + channel.writeAndFlush(res).addListener(ChannelFutureListener.CLOSE); req.release(); log.warn("Blocked wrong request! url: {}, ip: {}", queryDecoder.path(), channel.remoteAddress()); return;
unchallenged connections fixed. #<I>
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ function HtmlReplaceWebpackPlugin(options) } else { - htmlData = htmlData.replace(option.pattern, option.replacement) + htmlData = htmlData.split(option.pattern).join(option.replacement) } }) return htmlData
Support replacing all instances of the string in a html file
diff --git a/src/Controller/Async/Records.php b/src/Controller/Async/Records.php index <HASH>..<HASH> 100644 --- a/src/Controller/Async/Records.php +++ b/src/Controller/Async/Records.php @@ -75,4 +75,27 @@ class Records extends AsyncBase return $response; } + + /** + * Modify an individual ContentType's records. + * + * @param string $contentTypeSlug + * @param array $recordIds + */ + protected function modifyContentType($contentTypeSlug, array $recordIds) + { + foreach ($recordIds as $recordId => $actions) { + if ($actions === null) { + continue; + } + + foreach ($actions as $action => $fieldData) { + if ($action === 'delete') { + return $this->deleteRecord($contentTypeSlug, $recordId); + } else { + return $this->modifyRecord($contentTypeSlug, $recordId, $fieldData); + } + } + } + } }
Modify method for an individual ContentType's records
diff --git a/src/lib/datatable.py b/src/lib/datatable.py index <HASH>..<HASH> 100644 --- a/src/lib/datatable.py +++ b/src/lib/datatable.py @@ -278,8 +278,12 @@ class DataTable(object): idx = index[person] temp[idx['idxUnit']] = var[idx['idxIndi']] out[person] = temp - if sum_ is False: - return out + if sum_ is False: + if len(opt) == 1: + return out[opt[0]] + else: + return out + else: sumout = 0 for val in out.itervalues():
add option to be more explicit change also get_value in case length opt == 1
diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py index <HASH>..<HASH> 100644 --- a/superset/connectors/druid/models.py +++ b/superset/connectors/druid/models.py @@ -1331,10 +1331,10 @@ class DruidDatasource(Model, BaseDatasource): client=client, query_obj=query_obj, phase=2) df = client.export_pandas() - df = self.homogenize_types(df, query_obj.get('groupby', [])) - if df is None or df.size == 0: raise Exception(_('No data was returned.')) + + df = self.homogenize_types(df, query_obj.get('groupby', [])) df.columns = [ DTTM_ALIAS if c in ('timestamp', '__time') else c for c in df.columns
Moving homogenize_types to after no data exception (#<I>)
diff --git a/src/quart/utils.py b/src/quart/utils.py index <HASH>..<HASH> 100644 --- a/src/quart/utils.py +++ b/src/quart/utils.py @@ -27,7 +27,7 @@ if TYPE_CHECKING: from .wrappers.response import Response # noqa: F401 -def redirect(location: str, status_code: int = 302) -> "Response": +def redirect(location: str, code: int = 302) -> "Response": body = f""" <!doctype html> <title>Redirect</title> @@ -35,7 +35,7 @@ def redirect(location: str, status_code: int = 302) -> "Response": You should be redirected to <a href="{location}">{location}</a>, if not please click the link """ - return current_app.response_class(body, status=status_code, headers={"Location": location}) + return current_app.response_class(body, status=code, headers={"Location": location}) def create_cookie(
Bugfix match the Werkzeug API in redirect Some existing Flask extensions, flask_sslify and flask_talisman, expect this argument to be called `code` rather than `status_code`.
diff --git a/browserscripts/pageinfo/visualElements.js b/browserscripts/pageinfo/visualElements.js index <HASH>..<HASH> 100644 --- a/browserscripts/pageinfo/visualElements.js +++ b/browserscripts/pageinfo/visualElements.js @@ -28,7 +28,7 @@ } function isElementPartlyInViewportAndVisible (el) { - var rect = el.getBoundingClientRect(); + const rect = el.getBoundingClientRect(); return !(rect.bottom < 0 || rect.right < 0 || rect.left > window.innerWidth || rect.top > window.innerHeight || rect.height === 0) } @@ -79,17 +79,15 @@ } } - let type = 'LargestImage'; imageTags.forEach(function (element) { if (isElementPartlyInViewportAndVisible(element)) { - keepLargestElementByType(type, element); + keepLargestElementByType('LargestImage', element); } }); - type = 'Heading'; h1Tags.forEach(function (element) { if (isElementPartlyInViewportAndVisible(element)) { - keepLargestElementByType(type, element); + keepLargestElementByType('Heading', element); } });
cleanup the script (#<I>)
diff --git a/lib/mongo/server/address.rb b/lib/mongo/server/address.rb index <HASH>..<HASH> 100644 --- a/lib/mongo/server/address.rb +++ b/lib/mongo/server/address.rb @@ -99,7 +99,11 @@ module Mongo # # @since 3.0.0 def resolve! - @ip = Resolv.getaddress(host) + Resolv.each_address(host) do |address| + if address =~ Resolv::IPv4::Regex + return @ip = address + end + end end end end
force to ipv4 for now
diff --git a/src/level/TMXTileset.js b/src/level/TMXTileset.js index <HASH>..<HASH> 100755 --- a/src/level/TMXTileset.js +++ b/src/level/TMXTileset.js @@ -117,15 +117,15 @@ this.transform.translate(0, this.height - this.width); } if (this.flippedX) { + this.transform.translate((this.flippedAD ? this.height : this.width), 0); a[0] *= -1; a[3] *= -1; - this.transform.translate(-(this.flippedAD ? this.height : this.width), 0); } if (this.flippedY) { + this.transform.translate(0, (this.flippedAD ? this.width : this.height)); a[1] *= -1; a[4] *= -1; - this.transform.translate(0, -(this.flippedAD ? this.width : this.height)); } } });
[#<I>] We can save 2 bytes just by changing the order of operations!
diff --git a/CaptchaAction.php b/CaptchaAction.php index <HASH>..<HASH> 100644 --- a/CaptchaAction.php +++ b/CaptchaAction.php @@ -134,11 +134,12 @@ class CaptchaAction extends Action // when src attribute of image tag is changed 'url' => Url::to([$this->id, 'v' => uniqid()]), ]; - } else { - $this->setHttpHeaders(); - Yii::$app->response->format = Response::FORMAT_RAW; - return $this->renderImage($this->getVerifyCode()); } + + $this->setHttpHeaders(); + Yii::$app->response->format = Response::FORMAT_RAW; + + return $this->renderImage($this->getVerifyCode()); } /** @@ -255,9 +256,9 @@ class CaptchaAction extends Action return $this->renderImageByGD($code); } elseif ($imageLibrary === 'imagick') { return $this->renderImageByImagick($code); - } else { - throw new InvalidConfigException("Defined library '{$imageLibrary}' is not supported"); } + + throw new InvalidConfigException("Defined library '{$imageLibrary}' is not supported"); } /**
Enable `no_useless_else` rule in php-cs-fixer (#<I>)
diff --git a/lib/xapian_db/railtie.rb b/lib/xapian_db/railtie.rb index <HASH>..<HASH> 100644 --- a/lib/xapian_db/railtie.rb +++ b/lib/xapian_db/railtie.rb @@ -40,5 +40,11 @@ module XapianDb end + config.to_prepare do + # Load a blueprint config if there is one + blueprints_file_path = "#{Rails.root}/config/xapian_blueprints.rb" + load blueprints_file_path if File.exist?(blueprints_file_path) + end + end end \ No newline at end of file
fixed the problem that initializers in development are loaded only once, not for every request
diff --git a/src/Products/ProductsList.php b/src/Products/ProductsList.php index <HASH>..<HASH> 100644 --- a/src/Products/ProductsList.php +++ b/src/Products/ProductsList.php @@ -100,6 +100,13 @@ class ProductsList return $result; } + /** + * [RO] Listeaza caracteristicile obligatorii ale unei categorii (https://github.com/celdotro/marketplace/wiki/Listeaza-caracteristicile-obligatorii-ale-unei-categorii) + * [EN] Lists the mandatory characteristics of a category (https://github.com/celdotro/marketplace/wiki/List-mandatory-charactersitics-for-a-category) + * @param $categID + * @return mixed + * @throws \Exception + */ public function listCategoryMandatoryCharacteristics($categID){ // Sanity check if(!isset($categID) || !is_int($categID) || $categID < 0) throw new \Exception('Specificati o categorie valida');
Added mandatory charactersitics listing for a category
diff --git a/packages/webiny-api/src/graphql/crudResolvers.js b/packages/webiny-api/src/graphql/crudResolvers.js index <HASH>..<HASH> 100644 --- a/packages/webiny-api/src/graphql/crudResolvers.js +++ b/packages/webiny-api/src/graphql/crudResolvers.js @@ -5,7 +5,7 @@ import parseBoolean from "./parseBoolean"; import InvalidAttributesError from "./InvalidAttributesError"; import { ListResponse, ErrorResponse, NotFoundResponse, Response } from "./responses"; -type EntityFetcher = (context: Object) => Class<Entity>; +type EntityFetcher = string | (context: Object) => Class<Entity>; const notFound = (id?: string) => { return new NotFoundResponse(id ? `Record "${id}" not found!` : "Record not found!");
fix: entityFetcher can also be a string
diff --git a/lib/html2haml/html.rb b/lib/html2haml/html.rb index <HASH>..<HASH> 100644 --- a/lib/html2haml/html.rb +++ b/lib/html2haml/html.rb @@ -388,9 +388,9 @@ module Haml def to_haml_filter(filter, tabs, options) content = if children.first.cdata? - children.first.content_without_cdata_tokens + decode_entities(children.first.content_without_cdata_tokens) else - CGI.unescapeHTML(self.inner_text) + decode_entites(self.inner_text) end content = erb_to_interpolation(content, options) @@ -411,6 +411,17 @@ module Haml "#{tabulate(tabs)}:#{filter}\n#{content}" end + # TODO: this method is utterly awful, find a better way to decode HTML entities. + def decode_entities(str) + str.gsub(/&[\S]+;/) do |entity| + begin + [Nokogiri::HTML::NamedCharacters[entity[1..-2]]].pack("C") + rescue TypeError + entity + end + end + end + def static_attribute?(name, options) attr_hash[name] && !dynamic_attribute?(name, options) end
Decode HTML entities in filter content Note that the implementation her is pretty awful, it should be replaced with something better when possible. However it does, for the moment, solve the problem at hand.
diff --git a/src/Parsed.php b/src/Parsed.php index <HASH>..<HASH> 100644 --- a/src/Parsed.php +++ b/src/Parsed.php @@ -172,7 +172,8 @@ class Parsed public function getExpiresIn(): int { - return $this->payload['exp'] - time(); + $expiresIn = $this->payload['exp'] - time(); + return $expiresIn > 0 ? $expiresIn : 0; } /** diff --git a/tests/ParsedTest.php b/tests/ParsedTest.php index <HASH>..<HASH> 100644 --- a/tests/ParsedTest.php +++ b/tests/ParsedTest.php @@ -443,8 +443,6 @@ class ParsedTest extends TestCase 'hello' ); - $result = $parsed->getExpiresIn(); - - $this->assertTrue(-100 === $result || -99 === $result); + $this->assertSame(0, $parsed->getExpiresIn()); } }
Ammended expires in method in ParsedTest so negative integers are not returned, just zero.
diff --git a/src/Dompdf/FontMetrics.php b/src/Dompdf/FontMetrics.php index <HASH>..<HASH> 100644 --- a/src/Dompdf/FontMetrics.php +++ b/src/Dompdf/FontMetrics.php @@ -120,8 +120,8 @@ class FontMetrics $rootDir = $this->getOptions()->getRootDir(); // FIXME: tempoarary define constants for cache files <= v0.6.1 - def('DOMPDF_DIR', $rootDir); - def('DOMPDF_FONT_DIR', $fontDir); + if (!defined("DOMPDF_DIR")) { define("DOMPDF_DIR", $rootDir); } + if (!defined("DOMPDF_FONT_DIR")) { define("DOMPDF_FONT_DIR", $fontDir); } $file = $rootDir . "/lib/fonts/dompdf_font_family_cache.dist.php"; $distFonts = require $file;
Don't rely on functions.inc.php in namespaced code
diff --git a/server/rpki.go b/server/rpki.go index <HASH>..<HASH> 100644 --- a/server/rpki.go +++ b/server/rpki.go @@ -571,6 +571,11 @@ func validatePath(ownAs uint32, tree *radix.Tree, cidr string, asPath *bgp.PathA } func (c *roaManager) validate(pathList []*table.Path) { + if len(c.clientMap) == 0 { + // RPKI isn't enabled + return + } + for _, path := range pathList { if path.IsWithdraw || path.IsEOR() { continue
rpki: validate only when RPKI is enabled
diff --git a/test/com/aoindustries/awt/image/ImagesTest.java b/test/com/aoindustries/awt/image/ImagesTest.java index <HASH>..<HASH> 100644 --- a/test/com/aoindustries/awt/image/ImagesTest.java +++ b/test/com/aoindustries/awt/image/ImagesTest.java @@ -63,7 +63,7 @@ public class ImagesTest { } @Test - public void hello() { + public void testFindImage() { logger.log( Level.INFO, "Got image: {0} x {1}", @@ -86,7 +86,7 @@ public class ImagesTest { testRepeat(); } long endNanos = System.nanoTime(); - logger.log(Level.INFO, "Total time: {0} ms", BigDecimal.valueOf((endNanos - startNanos)/repeat, 6)); + logger.log(Level.INFO, "Average time: {0} ms", BigDecimal.valueOf((endNanos - startNanos)/repeat, 6)); } private void testRepeat() {
Fixed naming of tests a bit.
diff --git a/src/rezplugins/release_vcs/git.py b/src/rezplugins/release_vcs/git.py index <HASH>..<HASH> 100644 --- a/src/rezplugins/release_vcs/git.py +++ b/src/rezplugins/release_vcs/git.py @@ -83,7 +83,8 @@ class GitReleaseVCS(ReleaseVCS): # and 2.12 - used to be "No upstream", now "no upstream".. errmsg = str(e).lower() if ("no upstream branch" not in errmsg - and "no upstream configured" not in errmsg): + and "no upstream configured" not in errmsg + and "does not point to a branch" not in errmsg): raise e return (None, None)
Fixed an issue where git rev-parse would error out before checking for config.allow_no_upstream
diff --git a/google/oauth2/_client.py b/google/oauth2/_client.py index <HASH>..<HASH> 100644 --- a/google/oauth2/_client.py +++ b/google/oauth2/_client.py @@ -103,7 +103,11 @@ def _token_endpoint_request(request, token_uri, body): # occurs. while True: response = request(method="POST", url=token_uri, headers=headers, body=body) - response_body = response.data.decode("utf-8") + response_body = ( + response.data.decode("utf-8") + if hasattr(response.data, "decode") + else response.data + ) response_data = json.loads(response_body) if response.status == http_client.OK:
fix: in token endpoint request, do not decode the response data if it is not encoded (#<I>) * fix: in token endpoint request, do not decode the response data if it is not encoded The interface of the underlying transport 'google.auth.transport.Request' that makes the token request does not guarantee the response is encoded. In Python 3, the non-encoded strings do not have 'decode' attribute. Blindly decoding all the response could have the token refresh throw here.
diff --git a/score-tests/src/test/java/org/score/samples/StandAloneTest.java b/score-tests/src/test/java/org/score/samples/StandAloneTest.java index <HASH>..<HASH> 100644 --- a/score-tests/src/test/java/org/score/samples/StandAloneTest.java +++ b/score-tests/src/test/java/org/score/samples/StandAloneTest.java @@ -117,7 +117,7 @@ public class StandAloneTest { waitForAllEventsToArrive(3);//this flow should have 2 "Hello score" events only + 1 finish event Assert.assertEquals(2,countEvents("Hello score")); - Assert.assertEquals(1,countEvents(EventConstants.SCORE_FINISHED_EVENT)); + //Assert.assertEquals(2,countEvents(EventConstants.SCORE_FINISHED_EVENT));//todo - temp until fix to be only 1 finish event }
try to fix psrallel test issue...
diff --git a/examples/example-3-manipulating-child-accounts.php b/examples/example-3-manipulating-child-accounts.php index <HASH>..<HASH> 100644 --- a/examples/example-3-manipulating-child-accounts.php +++ b/examples/example-3-manipulating-child-accounts.php @@ -1,7 +1,21 @@ <?php + include 'vendor/autoload.php'; $credentials = new PrintNode\Credentials(); +/** + * There are two ways of authenticating when manipulating a Child Account + * + * - Using the Parent Account API Key + * - Using the Child Account API Key + * + * You can only manipulate a Child Account details when using the Parent Account API Key. + * For example: to change a Child Accounts name, email address, password or delete a Child Account + * you must be use the Parent Account API Key. + * + * For this example, you must be authenticated as the Parent Account. + **/ + $credentials->setApiKey(PRINTNODE_APIKEY); $request = new PrintNode\Request($credentials); @@ -17,6 +31,7 @@ $request = new PrintNode\Request($credentials); $request->setChildAccountById($id); // All requests from this request object will now operate on this Child Account. + $whoami = $request->getWhoami(); $computers = $request->getComputers(); $printers = $request->getPrinters();
Update example-3-manipulating-child-accounts.php
diff --git a/fastlane/lib/fastlane/version.rb b/fastlane/lib/fastlane/version.rb index <HASH>..<HASH> 100644 --- a/fastlane/lib/fastlane/version.rb +++ b/fastlane/lib/fastlane/version.rb @@ -1,4 +1,4 @@ module Fastlane - VERSION = '2.28.2'.freeze + VERSION = '2.28.3'.freeze DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze end
Version bump to <I> (#<I>)
diff --git a/transport/http2_client.go b/transport/http2_client.go index <HASH>..<HASH> 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -1116,12 +1116,13 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { }() s.mu.Lock() - if !endStream { - s.recvCompress = state.encoding - } if !s.headerDone { - if !endStream && len(state.mdata) > 0 { - s.header = state.mdata + // Headers frame is not actually a trailers-only frame. + if !endStream { + s.recvCompress = state.encoding + if len(state.mdata) > 0 { + s.header = state.mdata + } } close(s.headerChan) s.headerDone = true
transport: Fix a data race when headers are received while the stream is being closed (#<I>)
diff --git a/qualysapi/util.py b/qualysapi/util.py index <HASH>..<HASH> 100644 --- a/qualysapi/util.py +++ b/qualysapi/util.py @@ -5,6 +5,8 @@ import qualysapi.config as qcconf import qualysapi.connector as qcconn import qualysapi.settings as qcs +from urllib.parse import quote_plus + __author__ = "Parag Baxi <parag.baxi@gmail.com> & Colin Bell <colin.bell@uwaterloo.ca>" __copyright__ = "Copyright 2011-2013, Parag Baxi & University of Waterloo" @@ -32,7 +34,7 @@ def connect( # Use function parameter login credentials. if username and password: connect = qcconn.QGConnector( - auth=(username, password), server=hostname, max_retries=max_retries, proxies=proxies + auth=(username, quote_plus(password)), server=hostname, max_retries=max_retries, proxies=proxies ) # Retrieve login credentials from config file.
fix special characters in password Applications using Qualys API module returns error when it has special characters like % or + etc, urllib.parse.quote_plus is a fix for such issues
diff --git a/Command/FilesystemKeysCommand.php b/Command/FilesystemKeysCommand.php index <HASH>..<HASH> 100644 --- a/Command/FilesystemKeysCommand.php +++ b/Command/FilesystemKeysCommand.php @@ -38,13 +38,13 @@ class FilesystemKeysCommand extends Command ->addArgument('filesystem', InputArgument::REQUIRED, 'The filesystem to use') ->addArgument('glob', InputArgument::OPTIONAL, 'An optional glob pattern') ->setHelp(<<<EOT -The <info>gaufrette:filesystem:list</info> command lists all the file keys of the specified filesystem: +The <info>%command.name%</info> command lists all the file keys of the specified filesystem: - <info>./app/console gaufrette:filesystem:list my_filesystem</info> + <info>php %command.full_name% my_filesystem</info> You can also optionaly specify a glob pattern to filter the results: - <info>./app/console gaufrette:filesystem:list my_filesystem media_*</info> + <info>php %command.full_name% my_filesystem media_*</info> EOT ); }
Fix command name in help (#<I>)
diff --git a/robolectric/src/main/java/org/robolectric/RobolectricTestRunner.java b/robolectric/src/main/java/org/robolectric/RobolectricTestRunner.java index <HASH>..<HASH> 100644 --- a/robolectric/src/main/java/org/robolectric/RobolectricTestRunner.java +++ b/robolectric/src/main/java/org/robolectric/RobolectricTestRunner.java @@ -362,6 +362,12 @@ public class RobolectricTestRunner extends SandboxTestRunner { return properties; } catch (IOException e) { return null; + } finally { + try { + resourceAsStream.close(); + } catch (IOException e) { + throw new RuntimeException("couldn't close test_config.properties", e); + } } }
Close test_config.properties after reading it.
diff --git a/server/controller/webmin.js b/server/controller/webmin.js index <HASH>..<HASH> 100644 --- a/server/controller/webmin.js +++ b/server/controller/webmin.js @@ -657,7 +657,7 @@ function WebAdmin (duniterServer, startServices, stopServices, listDuniterUIPlug const headInfos = head.message.split(':') let posPubkey = 3; // Gestion des différents formats - if (head.messageV2.match(/:2:/)) { + if (head.messageV2 && head.messageV2.match(/:2:/)) { //HEAD v2 const headV2Infos = head.messageV2.split(':') head.freeRooms = headV2Infos[9] + "/" + headV2Infos[10]
[fix] bug in webmin api : messageV2 maybe undefined
diff --git a/test/dexie-unittest-utils.js b/test/dexie-unittest-utils.js index <HASH>..<HASH> 100644 --- a/test/dexie-unittest-utils.js +++ b/test/dexie-unittest-utils.js @@ -1,4 +1,6 @@ import Dexie from 'dexie'; +import {ok, start, asyncTest} from 'QUnit'; + var no_optimize = window.no_optimize || window.location.search.indexOf('dontoptimize=true') != -1; @@ -99,3 +101,20 @@ export function supports (features) { if (/multiEntry/.test(features)) return hasPolyfillIE || (!isIE && !isEdge); } + +export function spawnedTest (name, num, promiseGenerator) { + if (!promiseGenerator) { + promiseGenerator = num; + asyncTest(name, function(){ + Dexie.spawn(promiseGenerator) + .catch(e => ok(false, e.stack || e)) + .finally(start); + }); + } else { + asyncTest(name, num, function(){ + Dexie.spawn(promiseGenerator) + .catch(e => ok(false, e.stack || e)) + .finally(start); + }); + } +}
Alternative to asyncTest: spawnedTest! Usage: spawnedTest("name", function*() { // Use yield as await. // Dont have to catch errors // Dont have to call start() when done. });
diff --git a/src/main/php/lang/exception/Exception.php b/src/main/php/lang/exception/Exception.php index <HASH>..<HASH> 100644 --- a/src/main/php/lang/exception/Exception.php +++ b/src/main/php/lang/exception/Exception.php @@ -46,7 +46,7 @@ class Exception extends \Exception implements Throwable */ public function __toString() { - $string = __CLASS__ . " {\n"; + $string = get_class($this) . " {\n"; $string .= ' message(string): ' . $this->getMessage() . "\n"; $string .= ' file(string): ' . $this->getFile() . "\n"; $string .= ' line(integer): ' . $this->getLine() . "\n";
use real class, not class in which method is defined
diff --git a/packages/provider-queries/src/article-fragment.js b/packages/provider-queries/src/article-fragment.js index <HASH>..<HASH> 100644 --- a/packages/provider-queries/src/article-fragment.js +++ b/packages/provider-queries/src/article-fragment.js @@ -33,6 +33,7 @@ export default gql` } keywords leadAsset { + __typename ... on Video { brightcoveAccountId brightcovePolicyKey @@ -47,6 +48,7 @@ export default gql` } } relatedArticleSlice { + __typename ... on StandardSlice { items { ...relatedProps @@ -144,6 +146,7 @@ export default gql` fragment relatedProps on Tile { leadAsset { + __typename ... on Image { crop169: crop(ratio: "16:9") { url @@ -169,6 +172,7 @@ export default gql` } article { leadAsset { + __typename ... on Image { crop169: crop(ratio: "16:9") { url
chore: Add typename to article fragment (#<I>) * Add typename to article fragment * Update provider snap * Update snaps
diff --git a/code/AssetTableField.php b/code/AssetTableField.php index <HASH>..<HASH> 100755 --- a/code/AssetTableField.php +++ b/code/AssetTableField.php @@ -107,7 +107,7 @@ class AssetTableField extends ComplexTableField { new TextField( 'PopupWidth', 'Popup Width' ), new TextField( 'PopupHeight', 'Popup Height' ), new HeaderField( 'SWF File Options' ), - new CheckboxField( 'Embed', 'Force Embeding' ), + new CheckboxField( 'Embed', 'Is A Flash Document' ), new CheckboxField( 'LimitDimensions', 'Limit The Dimensions In The Popup Window' ) ) );
Explicitation of the swf file which seem like pdf file (merged from <I> branch, r<I>) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9
diff --git a/test/helpers.py b/test/helpers.py index <HASH>..<HASH> 100644 --- a/test/helpers.py +++ b/test/helpers.py @@ -273,12 +273,12 @@ polyhedron_mesh = meshio.Mesh( numpy.array([3, 0, 7]), ], [ - numpy.array([0, 1, 6]), # pyramid base split in two triangles - numpy.array([0, 6, 7]), - numpy.array([0, 1, 5]), - numpy.array([0, 5, 7]), - numpy.array([5, 6, 7]), - numpy.array([1, 5, 6]), + numpy.array([0, 1, 5]), # pyramid base split in two triangles + numpy.array([0, 4, 5]), + numpy.array([0, 1, 7]), + numpy.array([1, 5, 7]), + numpy.array([5, 4, 7]), + numpy.array([0, 4, 7]), ], ], ),
More reasonable polyhedron mesh for testing
diff --git a/test/transaction.js b/test/transaction.js index <HASH>..<HASH> 100644 --- a/test/transaction.js +++ b/test/transaction.js @@ -1,5 +1,4 @@ var assert = require('assert') -var networks = require('../src/networks') var scripts = require('../src/scripts') var Address = require('../src/address') @@ -109,7 +108,7 @@ describe('Transaction', function() { var tx = new Transaction() f.raw.ins.forEach(function(txIn, i) { - var script = txIn.script ? Script.fromHex(txIn.script) : Script.EMPTY + var script = txIn.script ? Script.fromHex(txIn.script) : undefined var j = tx.addInput(txIn.hash, txIn.index, txIn.sequence, script) assert.equal(i, j) @@ -120,7 +119,7 @@ describe('Transaction', function() { if (sequence === undefined) sequence = Transaction.DEFAULT_SEQUENCE assert.equal(tx.ins[i].sequence, sequence) - assert.equal(tx.ins[i].script, script) + assert.equal(tx.ins[i].script, script || Script.EMPTY) }) }) })
tests: make use of the default behaviour
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -249,8 +249,9 @@ exports.init = function (sequelize, optionsArg) { log('revisionId', currentRevisionId); } - instance.set(options.revisionAttribute, (currentRevisionId || 0) + 1); if (delta && delta.length > 0) { + instance.set(options.revisionAttribute, (currentRevisionId || 0) + 1); + if (!instance.context) { instance.context = {}; }
Increment revisionId only if there is a delta Currently revisionId is incremented even if there is no change in data. This commit increments revisionId only if there is some chnage in data denoted by non null delta value.
diff --git a/Resources/public/js/modules/translation.js b/Resources/public/js/modules/translation.js index <HASH>..<HASH> 100644 --- a/Resources/public/js/modules/translation.js +++ b/Resources/public/js/modules/translation.js @@ -6,7 +6,7 @@ appTranslation .factory('translationService', function(){ return { trans: function(key) { - return Translator.get('icap_portfolio' + ':' + key); + return Translator.trans(key, {}, 'icap_portfolio'); } }; })
[PortfolioBundle] Update translation service for angularjs with new version of bazing js translation
diff --git a/src/core/Core.js b/src/core/Core.js index <HASH>..<HASH> 100644 --- a/src/core/Core.js +++ b/src/core/Core.js @@ -144,19 +144,13 @@ class Uppy { } addFile (file) { - const updatedFiles = Object.assign({}, this.state.files) - - const fileName = file.name || 'noname' - const fileExtension = Utils.getFileNameAndExtension(fileName)[1] - const isRemote = file.isRemote || false - - const fileID = Utils.generateFileID(fileName) - - // const fileType = Utils.getFileType(file) - // const fileTypeGeneral = fileType[0] - // const fileTypeSpecific = fileType[1] - Utils.getFileType(file).then((fileType) => { + const updatedFiles = Object.assign({}, this.state.files) + const fileName = file.name || 'noname' + const fileExtension = Utils.getFileNameAndExtension(fileName)[1] + const isRemote = file.isRemote || false + + const fileID = Utils.generateFileID(fileName) const fileTypeGeneral = fileType[0] const fileTypeSpecific = fileType[1]
move everything in addFile to .then callback
diff --git a/src/server/pfs/server/obj_block_api_server.go b/src/server/pfs/server/obj_block_api_server.go index <HASH>..<HASH> 100644 --- a/src/server/pfs/server/obj_block_api_server.go +++ b/src/server/pfs/server/obj_block_api_server.go @@ -182,7 +182,7 @@ func (s *objBlockAPIServer) PutObject(server pfsclient.ObjectAPI_PutObjectServer r := io.TeeReader(putObjectReader, hash) block := &pfsclient.Block{Hash: uuid.NewWithoutDashes()} var size int64 - if err := func() error { + if err := func() (retErr error) { w, err := s.objClient.Writer(s.localServer.blockPath(block)) if err != nil { return err
Fix bug that caused us to swallow errors.
diff --git a/gbdxtools/images/meta.py b/gbdxtools/images/meta.py index <HASH>..<HASH> 100644 --- a/gbdxtools/images/meta.py +++ b/gbdxtools/images/meta.py @@ -466,7 +466,6 @@ class GeoImage(Container): except AssertionError as ae: warnings.warn(ae.args) - print(bounds) image = self._slice_padded(bounds) image.__geo_interface__ = mapping(g) return image
removing a print of the image bounds
diff --git a/template/shared/directives/forms/formInput.js b/template/shared/directives/forms/formInput.js index <HASH>..<HASH> 100644 --- a/template/shared/directives/forms/formInput.js +++ b/template/shared/directives/forms/formInput.js @@ -5,7 +5,8 @@ angular.module('views') template: '<div ng-include="getContentUrl()"></div>', scope: { directiveData: '=', - key: '@' + key: '@', + required: '@' }, controller: function($rootScope, $scope, $translate, defaultSettings, settingsInstances) { @@ -20,6 +21,12 @@ angular.module('views') return data; }; + + //allow front end to force required + if ($scope.required){ + $scope.directiveData.required = true; + } + if($scope.directiveData.typeRef){ if(!$scope.directiveData.endPoint){ $scope.directiveData.endPoint = settingsInstances.getTypeRefsInstance('default');
add ability to force required fields on front end, even if data model says optional this basically lets us move soem biz logic to the front end as needed
diff --git a/template_functions.go b/template_functions.go index <HASH>..<HASH> 100644 --- a/template_functions.go +++ b/template_functions.go @@ -607,7 +607,7 @@ func parseInt(s string) (int64, error) { // parseJSON returns a structure for valid JSON func parseJSON(s string) (interface{}, error) { if s == "" { - return make([]interface{}, 0), nil + return map[string]interface{}{}, nil } var data interface{} diff --git a/template_functions_test.go b/template_functions_test.go index <HASH>..<HASH> 100644 --- a/template_functions_test.go +++ b/template_functions_test.go @@ -1440,7 +1440,7 @@ func TestParseJSON_empty(t *testing.T) { t.Fatal(err) } - expected := []interface{}{} + expected := map[string]interface{}{} if !reflect.DeepEqual(result, expected) { t.Errorf("expected %#v to be %#v", result, expected) }
Return a map instead of an array for parseJSON The default function for parseJSON currently returns an array. This is problematic. Fixes GH-<I> because it makes using functions like `index` more difficult due to arrays being unable to have string indexes. This should be backwards compatible because one can still index a map using a string (thus treating it as an array).
diff --git a/impala/hiveserver2.py b/impala/hiveserver2.py index <HASH>..<HASH> 100644 --- a/impala/hiveserver2.py +++ b/impala/hiveserver2.py @@ -315,12 +315,17 @@ class HiveServer2Cursor(Cursor): def _wait_to_finish(self): loop_start = time.time() while True: - operation_state = self._last_operation.get_status() + req = TGetOperationStatusReq(operationHandle=self._last_operation.handle) + resp = self._last_operation._rpc('GetOperationStatus', req) + operation_state = TOperationState._VALUES_TO_NAMES[resp.operationState] log.debug('_wait_to_finish: waited %s seconds so far', time.time() - loop_start) if self._op_state_is_error(operation_state): - raise OperationalError("Operation is in ERROR_STATE") + if resp.errorMessage: + raise OperationalError(resp.errorMessage) + else: + raise OperationalError("Operation is in ERROR_STATE") if not self._op_state_is_executing(operation_state): break time.sleep(self._get_sleep_interval(loop_start))
Return detailed Error Messages from query failures (#<I>) Allow the usage of the errorMessage field from the GetOperationStatus command in an exception on impala <I>+ where IMPALA-<I> has been implemented.
diff --git a/core/src/main/java/tech/tablesaw/api/Table.java b/core/src/main/java/tech/tablesaw/api/Table.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/tech/tablesaw/api/Table.java +++ b/core/src/main/java/tech/tablesaw/api/Table.java @@ -1047,6 +1047,14 @@ public class Table extends Relation implements IntIterable { return new Maximum(this, numericColumnName); } + public Minimum min(String numericColumnName) { + return new Minimum(this, numericColumnName); + } + + /** + * @deprecated use min(String) instead + */ + @Deprecated public Minimum minimum(String numericColumnName) { return new Minimum(this, numericColumnName); }
Standardize naming of min/max functions
diff --git a/lua.go b/lua.go index <HASH>..<HASH> 100644 --- a/lua.go +++ b/lua.go @@ -751,8 +751,8 @@ func ToThread(l *State, index int) *State { } // ToValue convertes the value at `index` into a generic Go interface{}. The -// value can be a userdata, a table, a thread, a function, or Go string, bool, -// uint, int or float64 types. Otherwise, the function returns nil. +// value can be a userdata, a table, a thread, a function, or Go string, bool +// or float64 types. Otherwise, the function returns nil. // // Different objects will give different values. There is no way to convert // the value back into its original value. @@ -763,12 +763,7 @@ func ToThread(l *State, index int) *State { func ToValue(l *State, index int) interface{} { v := l.indexToValue(index) switch v := v.(type) { - case string, uint, int, float64, bool: - case *table: - case *luaClosure: - case *goClosure: - case *goFunction: - case *State: + case string, float64, bool, *table, *luaClosure, *goClosure, *goFunction, *State: case *userData: return v.data default:
uint and int aren't saved in the vm, so they can't occur.
diff --git a/pygeoip/timezone.py b/pygeoip/timezone.py index <HASH>..<HASH> 100644 --- a/pygeoip/timezone.py +++ b/pygeoip/timezone.py @@ -652,6 +652,7 @@ country_dict = { '09': 'Europe/Kiev', '10': 'Europe/Zaporozhye', '11': 'Europe/Simferopol', + '12': 'Europe/Kiev', '13': 'Europe/Kiev', '14': 'Europe/Zaporozhye', '15': 'Europe/Uzhgorod',
Justice should be served: add missing Kiev region ID
diff --git a/test/email_alert_api_test.rb b/test/email_alert_api_test.rb index <HASH>..<HASH> 100644 --- a/test/email_alert_api_test.rb +++ b/test/email_alert_api_test.rb @@ -32,7 +32,7 @@ describe GdsApi::EmailAlertApi do it "posts a new alert" do assert api_client.send_alert(publication_params) - assert_requested(:post, "#{base_url}/notifications", publication_params) + assert_requested(:post, "#{base_url}/notifications", body: publication_params.to_json) end it "returns the an empty response" do
Pass correct parameters to assert_requested Previously, this was just passing an options hash to assert_requested, which isn't correct usage, and would have been failing to actually check the body. Webmock now (as of release <I>) validates the options passed to assert_requested, and will complain if unknown keys are passed. This has made the error obvious.
diff --git a/java/server/src/org/openqa/grid/web/servlet/RegistrationServlet.java b/java/server/src/org/openqa/grid/web/servlet/RegistrationServlet.java index <HASH>..<HASH> 100644 --- a/java/server/src/org/openqa/grid/web/servlet/RegistrationServlet.java +++ b/java/server/src/org/openqa/grid/web/servlet/RegistrationServlet.java @@ -80,6 +80,8 @@ public class RegistrationServlet extends RegistryBasedServlet { GridNodeConfiguration nodeConfig = new GridNodeConfiguration(); nodeConfig.merge(hubConfig); nodeConfig.merge(server.getConfiguration()); + nodeConfig.host = server.getConfiguration().host; + nodeConfig.port = server.getConfiguration().port; server.setConfiguration(nodeConfig); final RemoteProxy proxy = BaseRemoteProxy.getNewInstance(server, getRegistry());
actually register the requested node's host and port o<I> fixes tests :)
diff --git a/src/Report.php b/src/Report.php index <HASH>..<HASH> 100644 --- a/src/Report.php +++ b/src/Report.php @@ -212,9 +212,9 @@ class Report * * @return \Throwable|array|null */ - public function originalError() + public function getOriginalError() { - return $this->original; + return $this->originalError; } /**
Update src/Report.php
diff --git a/src/com/jfoenix/controls/JFXListView.java b/src/com/jfoenix/controls/JFXListView.java index <HASH>..<HASH> 100644 --- a/src/com/jfoenix/controls/JFXListView.java +++ b/src/com/jfoenix/controls/JFXListView.java @@ -102,13 +102,13 @@ public class JFXListView<T> extends ListView<T> { private DoubleProperty currentVerticalGapProperty = new SimpleDoubleProperty(); - public DoubleProperty currentVerticalGapProperty(){ + DoubleProperty currentVerticalGapProperty(){ return currentVerticalGapProperty; } - public double getCurrentVerticalGap(){ + double getCurrentVerticalGap(){ return currentVerticalGapProperty.get(); } - public void setCurrentVerticalGap(double gap){ + void setCurrentVerticalGap(double gap){ currentVerticalGapProperty.set(gap); }
change currentVerticalProperty scope to package scope