hash
stringlengths
40
40
diff
stringlengths
131
26.7k
message
stringlengths
7
694
project
stringlengths
5
67
split
stringclasses
1 value
diff_languages
stringlengths
2
24
1e214504085248b77a41d97e90cc9903cc524005
diff --git a/entry.go b/entry.go index <HASH>..<HASH> 100644 --- a/entry.go +++ b/entry.go @@ -13,12 +13,17 @@ import ( var bufferPool *sync.Pool +// regex for validation is external, to reduce compilation overhead +var matchesLogrus *regexp.Regexp + func init() { bufferPool = &sync.Pool{ New: func() interface{} { return new(bytes.Buffer) }, } + + matchesLogrus, _ = regexp.Compile("logrus.*") } // Defines the key when adding errors using WithError. @@ -51,11 +56,13 @@ type Entry struct { } func NewEntry(logger *Logger) *Entry { - return &Entry{ + entry := &Entry{ Logger: logger, // Default is three fields, plus one optional. Give a little extra room. Data: make(Fields, 6), } + + return entry } // Returns the string representation from the reader and ultimately the @@ -96,11 +103,6 @@ func getCaller() (method string) { // Restrict the lookback to 25 frames - if it's further than that, report UNKNOWN pcs := make([]uintptr, 25) - matchesLogrus, err := regexp.Compile("logrus.*") - if err != nil { - return "CALLER_LOOKUP_FAILED" - } - // the first non-logrus caller is at least three frames away depth := runtime.Callers(3, pcs) for i := 0; i < depth; i++ {
push compilation even higher, to reduce to one call
sirupsen_logrus
train
go
7fc70f35bdd1214bda9c6213d881e9513120a79d
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -384,7 +384,12 @@ class JanusAdapter { configureSubscriberSdp(originalSdp) { if (!isH264VideoSupported) { - return originalSdp; + if (navigator.userAgent.indexOf("HeadlessChrome") !== -1) { + // HeadlessChrome (e.g. puppeteer) doesn't support webrtc video streams, so we remove those lines from the SDP. + return originalSdp.replace(/m=video[^]*m=/, "m="); + } else { + return originalSdp; + } } // TODO: Hack to get video working on Chrome for Android. https://groups.google.com/forum/#!topic/mozilla.dev.media/Ye29vuMTpo8
workaround headless chrome webrtc video support
mozilla_naf-janus-adapter
train
js
650c6ac9355952f41814d1303164361ef680b6fa
diff --git a/local_settings/base.py b/local_settings/base.py index <HASH>..<HASH> 100644 --- a/local_settings/base.py +++ b/local_settings/base.py @@ -79,10 +79,7 @@ class Base(ColorPrinter): self.section = section def _make_parser(self, *args, **kwargs): - kwargs.setdefault('interpolation', ExtendedInterpolation()) - parser = ConfigParser(*args, **kwargs) - parser.optionxform = lambda option: option - return parser + return LocalSettingsConfigParser(*args, **kwargs) def _parse_setting(self, v): """Parse the string ``v`` and return the parsed value. @@ -101,3 +98,13 @@ class Base(ColorPrinter): except ValueError: raise ValueError('Could not parse `{0}` as JSON'.format(v)) return v + + +class LocalSettingsConfigParser(ConfigParser): + + def __init__(self, *args, interpolation=ExtendedInterpolation(), **kwargs): + kwargs['interpolation'] = interpolation + super().__init__(*args, **kwargs) + + def optionxform(self, option): + return option
Add subclass of ConfigParser Currently, this doesn't do any customization beyond what we were doing before, but this is A) a better way to override defaults and B) more- easily extensible.
PSU-OIT-ARC_django-local-settings
train
py
12a6992eedccd481fb6c3f91d8726f1019bf56ea
diff --git a/go/vt/tabletserver/queryctl.go b/go/vt/tabletserver/queryctl.go index <HASH>..<HASH> 100644 --- a/go/vt/tabletserver/queryctl.go +++ b/go/vt/tabletserver/queryctl.go @@ -241,10 +241,3 @@ func InitQueryService() { TxLogger.ServeLogs(*txLogHandler, buildFmter(TxLogger)) RegisterQueryService() } - -// QueryRules from custom rules -const CustomQueryRules string = "CUSTOM_QUERY_RULES" - -func init() { - QueryRuleSources.RegisterQueryRuleSource(CustomQueryRules) -}
custom rule support resturctured
vitessio_vitess
train
go
ede068ac74c2e6884c4900dc84f9f5b47280f213
diff --git a/email/views/structure/header.php b/email/views/structure/header.php index <HASH>..<HASH> 100644 --- a/email/views/structure/header.php +++ b/email/views/structure/header.php @@ -250,7 +250,8 @@ <div class="padder"> <?php - if (nailsEnvironment('not', 'PRODUCTION')) { + + if (\Nails\Environment::not('PRODUCTION')) { ?> <div id="non-production-environment">
Tidying up, removing deprecated function calls
nails_module-email
train
php
1e8fa503d67098b1441b035c855abe6a9e854ef6
diff --git a/pale/endpoint.py b/pale/endpoint.py index <HASH>..<HASH> 100644 --- a/pale/endpoint.py +++ b/pale/endpoint.py @@ -188,13 +188,23 @@ class Endpoint(object): * * ``_after_response_handler`` - The `_after_response_handlers` are sepcified by the Endpoint + The `_after_response_handlers` are specified by the Endpoint definition, and enable manipulation of the response object before it is returned to the client, but after the response is rendered. Because these are instancemethods, they may share instance data from `self` specified in the endpoint's `_handle` method. + ``_finalize_content`` + The `_finalize_content` method is overridden by the Endpoint and is called + after the response is rendered into a serializable result. + + This method is called with two arguments, the context and the rendered content, + and expected to return updated rendered content. + + For in-place modification of dicts, this method will still be expected + to return the given argument. + ``_allow_cors`` This value is set to enable CORs for a given endpoint. @@ -383,6 +393,14 @@ class Endpoint(object): rendered_content = self._returns._render_serializable( unrendered_content, context) + try: + if hasattr(self, '_finalize_content'): + rendered_content = self._finalize_content(context, rendered_content) + except: + logging.exception("Failed to complete %s._finalize_content", + self.__class__.__name__) + raise + # now build the response if rendered_content is None and \ isinstance(self._returns, NoContentResource):
Implements _finalize_content response handler.
Loudr_pale
train
py
ac72da9b0e6d15a8c65047ad637222311892bcb1
diff --git a/server/requirements/requirements.php b/server/requirements/requirements.php index <HASH>..<HASH> 100644 --- a/server/requirements/requirements.php +++ b/server/requirements/requirements.php @@ -6,10 +6,10 @@ /** @var RequirementsChecker $this */ $requirements = array( array( - 'name' => 'PHP 7.0+', + 'name' => 'PHP 7.2.5+', 'mandatory' => true, - 'condition' => version_compare(PHP_VERSION, '7.0.0', '>='), - 'memo' => 'PHP 7.0 or higher is required.', + 'condition' => PHP_VERSION_ID >= 70205, + 'memo' => 'PHP 7.2.5 or later is required.', ), );
Bump PHP requirement to <I> for Craft <I>
craftcms_server-check
train
php
0eb479d8110ccaab0b28af9adde30c8c133bd613
diff --git a/main/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java b/main/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java index <HASH>..<HASH> 100644 --- a/main/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java +++ b/main/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java @@ -221,6 +221,10 @@ public class WebInterfaceBrowseServlet extends HttpServlet { request.setAttribute("invalidPathError", "Error: Invalid Path " + ipe.getLocalizedMessage()); getServletContext().getRequestDispatcher("/browse.jsp").forward(request, response); return; + } catch (IOException ie) { + request.setAttribute("invalidPathError", "Error: File Not Existed " + ie.getMessage()); + getServletContext().getRequestDispatcher("/browse.jsp").forward(request, response); + return; } List<UiFileInfo> fileInfos = new ArrayList<UiFileInfo>(filesInfo.size());
fix UI: display file may crash due to IOException
Alluxio_alluxio
train
java
abb5ff8a2c8a77739808df1774004848ab2ecb39
diff --git a/lib/neo4j/active_node/query/query_proxy_methods.rb b/lib/neo4j/active_node/query/query_proxy_methods.rb index <HASH>..<HASH> 100644 --- a/lib/neo4j/active_node/query/query_proxy_methods.rb +++ b/lib/neo4j/active_node/query/query_proxy_methods.rb @@ -110,10 +110,9 @@ module Neo4j end def exists_query_start(origin, condition, target) - case - when condition.class == Fixnum + if condition.class == Fixnum self.where("ID(#{target}) = {exists_condition}").params(exists_condition: condition) - when condition.class == Hash + elsif condition.class == Hash self.where(condition.keys.first => condition.values.first) else self
if is cheaper than case, switch in query_proxy_methods
neo4jrb_neo4j
train
rb
f47a064f269d270e5b82e17135ea5efe9460b9f6
diff --git a/luigi/server.py b/luigi/server.py index <HASH>..<HASH> 100644 --- a/luigi/server.py +++ b/luigi/server.py @@ -123,7 +123,7 @@ def app(api): (r'/history/by_id/(.*?)', ByIdHandler, {'api': api}), (r'/history/by_params/(.*?)', ByParamsHandler, {'api': api}) ] - api_app = tornado.web.Application(handlers, gzip=True) + api_app = tornado.web.Application(handlers) return api_app
Disabling gzip compressions since it breaks the browser Change-Id: Ia2c1a<I>ab6df<I>ece5a<I>c<I>aa<I>b4 Reviewed-on: <URL>
spotify_luigi
train
py
7c966e745eeb15a0b2e2029a675aedc6d8ff4a35
diff --git a/src/Core42/Permission/Rbac/AuthorizationService.php b/src/Core42/Permission/Rbac/AuthorizationService.php index <HASH>..<HASH> 100644 --- a/src/Core42/Permission/Rbac/AuthorizationService.php +++ b/src/Core42/Permission/Rbac/AuthorizationService.php @@ -123,6 +123,14 @@ class AuthorizationService } /** + * @return Role\RoleInterface[]|\string[] + */ + public function getAllRoles() + { + return $this->identityRoleProvider->getRoles(); + } + + /** * Get the identity roles from the current identity, applying some more logic * * @return RoleInterface[] diff --git a/src/Core42/Permission/Rbac/Identity/IdentityRoleProviderInterface.php b/src/Core42/Permission/Rbac/Identity/IdentityRoleProviderInterface.php index <HASH>..<HASH> 100644 --- a/src/Core42/Permission/Rbac/Identity/IdentityRoleProviderInterface.php +++ b/src/Core42/Permission/Rbac/Identity/IdentityRoleProviderInterface.php @@ -9,10 +9,12 @@ namespace Core42\Permission\Rbac\Identity; +use Core42\Permission\Rbac\Role\RoleInterface; + interface IdentityRoleProviderInterface { /** - * @return string[]|\Rbac\Role\RoleInterface[] + * @return string[]|RoleInterface[] */ public function getRoles(); }
added getAllRoles for authorizationservice
kiwi-suite_core42
train
php,php
d9b7e38bb43d3519715bc359fbca8de5d3625d94
diff --git a/DataColumn.php b/DataColumn.php index <HASH>..<HASH> 100644 --- a/DataColumn.php +++ b/DataColumn.php @@ -18,7 +18,7 @@ class DataColumn extends \yii\grid\DataColumn protected function renderDataCellContent($model, $key, $index) { $content = parent::renderDataCellContent($model, $key, $index); - return Html::a($content,$this->getViewUrl($model),['class' => 'btn-block']); + return Html::a($content,$this->getViewUrl($model),['class' => 'btn-block','data-pjax' => 0]); } protected function getViewUrl($model)
Bugfix for incorrectly triggering pjax refreshes when target page also has a grid table
enigmatix_yii2-widgets
train
php
d3d39d1b74bb0b08ccc61cbf33242dce2937af68
diff --git a/openid/server/server.py b/openid/server/server.py index <HASH>..<HASH> 100644 --- a/openid/server/server.py +++ b/openid/server/server.py @@ -493,7 +493,8 @@ class CheckIDRequest(OpenIDRequest): @ivar trust_root: "Are you Frank?" asks the checkid request. "Who wants to know?" C{trust_root}, that's who. This URL identifies the party making the request, and the user will use that to make her decision - about what answer she trusts them to have. + about what answer she trusts them to have. Referred to as "realm" in + OpenID 2.0. @type trust_root: str @ivar return_to: The URL to send the user agent back to to reply to this
[project @ server.server.CheckIDRequest: mention that trust_root AKA realm in the docstring.]
openid_python-openid
train
py
aa905f25868f20eccf37b481d9c9041ec87e41c9
diff --git a/src/Kunstmaan/AdminBundle/Controller/SettingsController.php b/src/Kunstmaan/AdminBundle/Controller/SettingsController.php index <HASH>..<HASH> 100644 --- a/src/Kunstmaan/AdminBundle/Controller/SettingsController.php +++ b/src/Kunstmaan/AdminBundle/Controller/SettingsController.php @@ -42,12 +42,21 @@ class SettingsController extends BaseSettingsController $versionChecker = $this->container->get('kunstmaan_admin.versionchecker'); if (!$versionChecker->isEnabled()) { - return; + return array('data' => null); + } + + $data = null; + try { + $data = $versionChecker->check(); + } catch (\Exception $e) { + $this->container->get('logger')->error( + $e->getMessage(), + array('exception' => $e) + ); } return array( - 'data' => $versionChecker->check() + 'data' => $data ); } - -} \ No newline at end of file +}
Do not crash if version checker throws exception
Kunstmaan_KunstmaanBundlesCMS
train
php
096dfe582a8b4ec07c9522c387f55c0f70e5d211
diff --git a/src/Storage/Field/Type/FieldTypeBase.php b/src/Storage/Field/Type/FieldTypeBase.php index <HASH>..<HASH> 100644 --- a/src/Storage/Field/Type/FieldTypeBase.php +++ b/src/Storage/Field/Type/FieldTypeBase.php @@ -77,9 +77,9 @@ abstract class FieldTypeBase implements FieldTypeInterface $type = $this->getStorageType(); - if (null != $value) { + if (null !== $value) { $value = $type->convertToDatabaseValue($value, $this->getPlatform()); - } else { + } elseif (isset($this->mapping['default'])) { $value = $this->mapping['default']; } $qb->setValue($key, ':' . $key);
fix the persist to handle non-contenttype fields without default mappings
bolt_bolt
train
php
ca6a8f02b761f714c0be13ffd1c4dfbf490a1320
diff --git a/remi/gui.py b/remi/gui.py index <HASH>..<HASH> 100644 --- a/remi/gui.py +++ b/remi/gui.py @@ -3986,7 +3986,7 @@ class FileUploader(Container): def savepath(self, value): self._savepath = value - def __init__(self, savepath='./', multiple_selection_allowed=False, accepted_files='*.*' *args, **kwargs): + def __init__(self, savepath='./', multiple_selection_allowed=False, accepted_files='*.*', *args, **kwargs): super(FileUploader, self).__init__(*args, **kwargs) self._savepath = savepath self._multiple_selection_allowed = multiple_selection_allowed
Added missing comma in function declaration
dddomodossola_remi
train
py
37808fbc5353890cba413f347de37febcd596b21
diff --git a/salt/cloud/clouds/ec2.py b/salt/cloud/clouds/ec2.py index <HASH>..<HASH> 100644 --- a/salt/cloud/clouds/ec2.py +++ b/salt/cloud/clouds/ec2.py @@ -1818,7 +1818,9 @@ def request_instance(vm_=None, call=None): if userdata is not None: try: - params[spot_prefix + 'UserData'] = base64.b64encode(userdata) + params[spot_prefix + 'UserData'] = base64.b64encode( + salt.utils.stringutils.to_bytes(userdata) + ) except Exception as exc: log.exception('Failed to encode userdata: %s', exc)
Make sure we pass userdata as bytes to base<I> encoder
saltstack_salt
train
py
ed4cab65704fb5c1c5f0c1071590ca0a7b3fbf4e
diff --git a/kafka/conn.py b/kafka/conn.py index <HASH>..<HASH> 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -354,7 +354,7 @@ class BrokerConnection(object): next_lookup = self._next_afi_sockaddr() if not next_lookup: self.close(Errors.KafkaConnectionError('DNS failure')) - return + return self.state else: log.debug('%s: creating new socket', self) self._sock_afi, self._sock_addr = next_lookup @@ -409,6 +409,7 @@ class BrokerConnection(object): ' Disconnecting.', self, ret) errstr = errno.errorcode.get(ret, 'UNKNOWN') self.close(Errors.KafkaConnectionError('{} {}'.format(ret, errstr))) + return self.state # Needs retry else: @@ -443,6 +444,7 @@ class BrokerConnection(object): if time.time() > request_timeout + self.last_attempt: log.error('Connection attempt to %s timed out', self) self.close(Errors.KafkaConnectionError('timeout')) + return self.state return self.state
Return connection state explicitly after close in connect() (#<I>)
dpkp_kafka-python
train
py
f93617a9d02ab3d2ec2cfbd40b9f9cedd97a36d0
diff --git a/honeybadger/__init__.py b/honeybadger/__init__.py index <HASH>..<HASH> 100644 --- a/honeybadger/__init__.py +++ b/honeybadger/__init__.py @@ -14,4 +14,4 @@ from .version import __version__ __all__ = ['honeybadger', '__version__'] honeybadger = Honeybadger() -sys.excepthook = honeybadger.exception_hook +honeybadger.wrap_excepthook(sys.excepthook) diff --git a/honeybadger/core.py b/honeybadger/core.py index <HASH>..<HASH> 100644 --- a/honeybadger/core.py +++ b/honeybadger/core.py @@ -1,5 +1,6 @@ from contextlib import contextmanager import threading +import sys from .connection import send_notice from .payload import create_payload @@ -19,8 +20,13 @@ class Honeybadger(object): def request(self, request): self.thread_local.request = request + def wrap_excepthook(self, func): + self.existing_except_hook = func + sys.excepthook = self.exception_hook + def exception_hook(self, type, value, exc_traceback): self._send_notice(value, exc_traceback, context=self._context) + self.existing_except_hook(type, value, exc_traceback) def notify(self, exception=None, error_class=None, error_message=None, context={}): if exception is None:
added wrap_excepthook method which wraps allowing us to play nice with other libraries that might use that hook - fixes #<I>
honeybadger-io_honeybadger-python
train
py,py
aefa94a5cbb1599e63ca5f4528fb3e89efa57fb8
diff --git a/Kwc/Menu/EditableItems/Model.php b/Kwc/Menu/EditableItems/Model.php index <HASH>..<HASH> 100644 --- a/Kwc/Menu/EditableItems/Model.php +++ b/Kwc/Menu/EditableItems/Model.php @@ -37,12 +37,17 @@ class Kwc_Menu_EditableItems_Model extends Kwf_Model_Abstract ) { $childPagesComponentSelect[Kwf_Component_Select::IGNORE_VISIBLE] = true; } - $childPages = Kwf_Component_Data_Root::getInstance() + $component = Kwf_Component_Data_Root::getInstance() ->getComponentById($whereEquals['parent_component_id'], array( Kwf_Component_Select::IGNORE_VISIBLE => true - )) - ->getPageOrRoot() - ->getChildPages($childPagesComponentSelect); + )); + while ($component) { + $component = $component->parent; + if ($component->isPage) break; + if (!$component->parent) break; + if (Kwc_Abstract::getFlag($component->componentClass, 'menuCategory')) break; + } + $childPages = $component->getChildPages($childPagesComponentSelect); foreach ($childPages as $childPage) { if (is_numeric($childPage->dbId)) { $id = $childPage->dbId;
Menu_EditableItems: getPageOrRoot didn't give category-component but is necessary for menu
koala-framework_koala-framework
train
php
3851a99f513bd741bc0e9be85fc311c3881d6f0b
diff --git a/siphon/simplewebservice/igra2.py b/siphon/simplewebservice/igra2.py index <HASH>..<HASH> 100644 --- a/siphon/simplewebservice/igra2.py +++ b/siphon/simplewebservice/igra2.py @@ -178,7 +178,10 @@ class IGRAUpperAir: def _cdec(power=1): """Make a function to convert string 'value*10^power' to float.""" def _cdec_power(val): - return float(val) / 10**power + if val in ['-9999','-8888','-99999']: + return np.nan + else: + return float(val) / 10**power return _cdec_power def _cflag(val):
corrected bug where na_values were bypassed
Unidata_siphon
train
py
a96eb135c1a3fbd0f80d0dbef345bc509dfa18a3
diff --git a/lib/restful_resource/base.rb b/lib/restful_resource/base.rb index <HASH>..<HASH> 100644 --- a/lib/restful_resource/base.rb +++ b/lib/restful_resource/base.rb @@ -68,6 +68,19 @@ module RestfulResource @action_prefix = action_prefix.to_s end + def self.fetch_all!(conditions={}) + Enumerator.new do |y| + next_page = 1 + begin + resources = self.where(conditions.merge(page: next_page)) + resources.each do |resource| + y << resource + end + next_page = resources.next_page + end while(!next_page.nil?) + end + end + protected def self.http @http || superclass.http diff --git a/lib/restful_resource/version.rb b/lib/restful_resource/version.rb index <HASH>..<HASH> 100644 --- a/lib/restful_resource/version.rb +++ b/lib/restful_resource/version.rb @@ -1,3 +1,3 @@ module RestfulResource - VERSION = '0.9.4' + VERSION = '0.9.5' end
Method fetch_all! that retrieves all data using multiple requests
carwow_restful_resource
train
rb,rb
202a030b82a1853b7730babe85614c2848ff1b84
diff --git a/tests/test_metadata.py b/tests/test_metadata.py index <HASH>..<HASH> 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -2,6 +2,7 @@ import re from datetime import datetime, timedelta, timezone import os from pathlib import Path +import sys import xml.etree.ElementTree as ET import pytest @@ -412,6 +413,8 @@ def test_no_x_xmpmeta(trivial): ], ) def test_degenerate_xml(trivial, xml): + if xml == b'' and sys.version_info[0:2] <= (3, 5): + pytest.skip(msg="fails on macOS/Python 3.5; unknown cause") trivial.Root.Metadata = trivial.make_stream(xml) with trivial.open_metadata() as xmp: xmp['pdfaid:part'] = '2'
Skip one of the degenerate xml tests For Python <I>, naturally.
pikepdf_pikepdf
train
py
b05956346b093965721943f42875a0d3e655a7de
diff --git a/src/PanelGroup.js b/src/PanelGroup.js index <HASH>..<HASH> 100644 --- a/src/PanelGroup.js +++ b/src/PanelGroup.js @@ -1,3 +1,5 @@ +/* eslint react/prop-types: [1, {ignore: ["children", "className", "bsStyle"]}]*/ +/* BootstrapMixin contains `bsStyle` type validation */ import React, { cloneElement } from 'react'; import classNames from 'classnames'; @@ -9,6 +11,7 @@ const PanelGroup = React.createClass({ propTypes: { collapsable: React.PropTypes.bool, + accordion: React.PropTypes.bool, activeKey: React.PropTypes.any, defaultActiveKey: React.PropTypes.any, onSelect: React.PropTypes.func
Define type for `accordion` property in PanelGroup.js and disable superfluous warning for `bsStyle`. BootstrapMixin contains type validation for it.
react-bootstrap_react-bootstrap
train
js
c81e977941aa5bdbffd4a3eb7743bbd08531e59b
diff --git a/uri.js b/uri.js index <HASH>..<HASH> 100644 --- a/uri.js +++ b/uri.js @@ -82,7 +82,7 @@ function parseUri(uri, callbacks){ return callbacks.ifError("too many question marks"); var address = decodeURIComponent(arrParts[0]); var query_string = arrParts[1]; - if (!ValidationUtils.isValidAddress(address) && !ValidationUtils.isValidEmail(address) && !address.match(/^(steem\/|reddit\/|@)/i)) + if (!ValidationUtils.isValidAddress(address) && !ValidationUtils.isValidEmail(address) && !address.match(/^(steem\/|reddit\/|@).{3,}/i) && !address.match(/^\+\d{9,14}$/)) return callbacks.ifError("address "+address+" is invalid"); objRequest.type = "address"; objRequest.address = address;
more accurate username checks, add phone number
byteball_ocore
train
js
79962015ab8d020a390aa4872777efcc727f5440
diff --git a/tests/oauth2/rfc6749/endpoints/test_error_responses.py b/tests/oauth2/rfc6749/endpoints/test_error_responses.py index <HASH>..<HASH> 100644 --- a/tests/oauth2/rfc6749/endpoints/test_error_responses.py +++ b/tests/oauth2/rfc6749/endpoints/test_error_responses.py @@ -237,7 +237,6 @@ class ErrorResponseTest(TestCase): def test_access_denied(self): self.validator.authenticate_client.side_effect = self.set_client - self.validator.confirm_redirect_uri.return_value = False token_uri = 'https://i.b/token' # Authorization code grant _, body, _ = self.web.create_token_response(token_uri,
confirm_r. is called after auth_client
oauthlib_oauthlib
train
py
c20f7decd374c1e582fb05d65ba67fa25742354a
diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -100,7 +100,6 @@ class TestVNCDoToolClient(object): image.histogram.return_value = [1, 2, 3] result = cli._expectCompare(image, 5) assert result == cli - assert cli.deferred is None def test_expectCompareExactSuccess(self): cli = self.client @@ -110,8 +109,6 @@ class TestVNCDoToolClient(object): image.histogram.return_value = [2, 2, 2] result = cli._expectCompare(image, 0) assert result == cli - assert cli.deferred is None - def test_expectCompareFails(self): cli = self.client @@ -176,10 +173,12 @@ class TestVNCDoToolClient(object): def test_commitUpdate(self): rects = mock.Mock() - self.client.deferred = mock.Mock() + self.deferred = mock.Mock() + self.client.deferred = self.deferred self.client.commitUpdate(rects) - self.client.deferred.callback.assert_called_once_with(self.client.screen) + self.deferred.callback.assert_called_once_with(self.client.screen) + def test_vncRequestPassword_prompt(self): cli = self.client
test_client: update for client bugfixes
sibson_vncdotool
train
py
29ee67c7e8548391cc197429b91ae1346db472a4
diff --git a/lib/yard/cli/yardoc.rb b/lib/yard/cli/yardoc.rb index <HASH>..<HASH> 100644 --- a/lib/yard/cli/yardoc.rb +++ b/lib/yard/cli/yardoc.rb @@ -220,8 +220,10 @@ module YARD @has_markup = false if defined?(::Encoding) && ::Encoding.respond_to?(:default_external=) - ::Encoding.default_external = 'utf-8' - ::Encoding.default_internal = 'utf-8' + utf8 = ::Encoding.find('utf-8') + + ::Encoding.default_external = utf8 unless ::Encoding.default_external == utf8 + ::Encoding.default_internal = utf8 unless ::Encoding.default_internal == utf8 end end
Avoid repeated "warning: setting Encoding.default_internal/external" Instead of always setting the internal/external encoding to utf8, only change it when it wasn't already utf8.
lsegal_yard
train
rb
c1cb26bf67b9ed2db5a7081883b2326eecac285e
diff --git a/test/features/pagecontent/access_checks.js b/test/features/pagecontent/access_checks.js index <HASH>..<HASH> 100644 --- a/test/features/pagecontent/access_checks.js +++ b/test/features/pagecontent/access_checks.js @@ -78,17 +78,25 @@ describe('Access checks', function() { api = setUpNockResponse(api, deletedPageTitle, deletedPageOlderRevision); api = setUpNockResponse(api, deletedPageTitle, deletedPageRevision); + // Need to supply no-cache header to make the summary update synchronous + // to avoid races on mocks. Can remove when switched to change propagation return preq.get({ uri: server.config.bucketURL + '/html/' + encodeURIComponent(deletedPageTitle) - + '/' + deletedPageOlderRevision + + '/' + deletedPageOlderRevision, + headers: { + 'cache-control': 'no-cache' + } }) .then(function(res) { assert.deepEqual(res.status, 200); return preq.get({ uri: server.config.bucketURL + '/html/' + encodeURIComponent(deletedPageTitle) - + '/' + deletedPageRevision + + '/' + deletedPageRevision, + headers: { + 'cache-control': 'no-cache' + } }); }) .then(function (res) {
Modified test to make it more stable
wikimedia_restbase
train
js
03160a6f12b96156363dfff773d8e892caa1bb15
diff --git a/python/thunder/regression/regression.py b/python/thunder/regression/regression.py index <HASH>..<HASH> 100755 --- a/python/thunder/regression/regression.py +++ b/python/thunder/regression/regression.py @@ -25,7 +25,7 @@ if not os.path.exists(outputDir) : os.makedirs(outputDir) # parse data lines = sc.textFile(dataFile) -data = parse(lines, "dff").cache() +data = parse(lines, "sub").cache() # create model model = regressionModel(modelFile,mode) diff --git a/python/thunder/util/dataio.py b/python/thunder/util/dataio.py index <HASH>..<HASH> 100644 --- a/python/thunder/util/dataio.py +++ b/python/thunder/util/dataio.py @@ -13,6 +13,8 @@ def parse(data, filter="raw", inds=None) : if filter == "dff" : # convert to dff meanVal = mean(ts) ts = (ts - meanVal) / (meanVal + 0.1) + if filter == "sub" : # convert to dff + ts = (ts - mean(ts)) if inds is not None : if inds == "xyz" : return ((int(vec[0]),int(vec[1]),int(vec[2])),ts)
Added option for mean subtraction preprocessing
thunder-project_thunder
train
py,py
63451543ac2c0d14e2be8a40e153d456407e3596
diff --git a/lib/dirty.js b/lib/dirty.js index <HASH>..<HASH> 100644 --- a/lib/dirty.js +++ b/lib/dirty.js @@ -57,7 +57,7 @@ Dirty.prototype.load = function() { buffer = '', offset = 0, read = function() { - self.file.read(10).addCallback(function(chunk) { + self.file.read(16*1024).addCallback(function(chunk) { if (!chunk) { return promise.emitSuccess(); }
Changed load read chunk size to something more sensible
felixge_node-dirty
train
js
5a3953579bc404e6078f027a713095d4aeac1f82
diff --git a/imagemounter/__init__.py b/imagemounter/__init__.py index <HASH>..<HASH> 100644 --- a/imagemounter/__init__.py +++ b/imagemounter/__init__.py @@ -1,8 +1,8 @@ from __future__ import print_function from __future__ import unicode_literals -__ALL__ = ['Volume', 'Disk', 'ImageParser'] -__version__ = '2.0.0b3' +__ALL__ = ['Volume', 'Disk', 'ImageParser', 'Unmounter'] +__version__ = '2.0.0' BLOCK_SIZE = 512 VOLUME_SYSTEM_TYPES = ('detect', 'dos', 'bsd', 'sun', 'mac', 'gpt', 'dbfiller')
Think I am about ready for a <I> release. No backwards incompatible changes anymore I hope
ralphje_imagemounter
train
py
6f0fa070689214eb6a123eab99f7bb1bdaba7a8f
diff --git a/src/LayoutNodeManager.js b/src/LayoutNodeManager.js index <HASH>..<HASH> 100644 --- a/src/LayoutNodeManager.js +++ b/src/LayoutNodeManager.js @@ -497,9 +497,16 @@ define(function(require, exports, module) { return undefined; } - // Arrays are not supported here + // Return array if (renderNode instanceof Array) { - return undefined; + var result = []; + for (var i = 0 ; i < renderNode.length; i++) { + result.push({ + renderNode: renderNode[i], + arrayElement: true + }); + } + return result; } // Create context node
Fixed getting arrays from context due to recent changes
IjzerenHein_famous-flex
train
js
f06beaeddd02c20b740fe2d4790d6cb8bc0a3253
diff --git a/tests/Reform/Tests/Validation/Rule/RuleTest.php b/tests/Reform/Tests/Validation/Rule/RuleTest.php index <HASH>..<HASH> 100644 --- a/tests/Reform/Tests/Validation/Rule/RuleTest.php +++ b/tests/Reform/Tests/Validation/Rule/RuleTest.php @@ -21,13 +21,13 @@ abstract class RuleTest extends \PHPUnit_Framework_TestCase /** * @dataProvider dataProvider() */ - public function testRule($email, $pass) + public function testRule($value, $pass) { $result = $this->getMock('Reform\Validation\Result'); if ($pass) { - $this->assertTrue($this->rule->validate($result, 'email_address', $email)); + $this->assertTrue($this->rule->validate($result, 'value', $value)); } else { - $this->assertFalse($this->rule->validate($result, 'email_address', $email)); + $this->assertFalse($this->rule->validate($result, 'value', $value)); } }
Cleanup RuleTest to use more generic variables.
glynnforrest_reform
train
php
53bfbb55ab0704ec20ec8f4565cf51847b82a753
diff --git a/query/src/test/java/org/infinispan/query/config/MultipleCachesTest.java b/query/src/test/java/org/infinispan/query/config/MultipleCachesTest.java index <HASH>..<HASH> 100644 --- a/query/src/test/java/org/infinispan/query/config/MultipleCachesTest.java +++ b/query/src/test/java/org/infinispan/query/config/MultipleCachesTest.java @@ -98,7 +98,7 @@ public class MultipleCachesTest extends SingleCacheManagerTest { SearchManager queryFactory = Search.getSearchManager(indexedCache); SearchFactoryImplementor searchImpl = (SearchFactoryImplementor) queryFactory.getSearchFactory(); - IndexManager[] indexManagers = searchImpl.getIndexBindingForEntity(Person.class).getIndexManagers(); + IndexManager[] indexManagers = searchImpl.getIndexBinding(Person.class).getIndexManagers(); assert indexManagers != null && indexManagers.length == 1; DirectoryBasedIndexManager directory = (DirectoryBasedIndexManager)indexManagers[0]; DirectoryProvider directoryProvider = directory.getDirectoryProvider();
ISPN-<I> Additional API changes of Hibernate Search5
infinispan_infinispan
train
java
8a288ff3913e1651dc101dba5bd90c007d581e8f
diff --git a/linshareapi/user/shares.py b/linshareapi/user/shares.py index <HASH>..<HASH> 100644 --- a/linshareapi/user/shares.py +++ b/linshareapi/user/shares.py @@ -98,13 +98,17 @@ class Shares2(Shares): def get_rbu(self): rbu = ResourceBuilder("shares") rbu.add_field('secured', e_type=bool) + rbu.add_field('enableUSDA', e_type=bool, arg='enable_USDA') + rbu.add_field('forceAnonymousSharing', e_type=bool) + rbu.add_field('creationAcknowledgement', e_type=bool, arg='sharing_acknowledgement') rbu.add_field('expirationDate') rbu.add_field('subject') rbu.add_field('message') # [document uuids,] rbu.add_field('documents', required=True) # [GenericUserDto,] - rbu.add_field('recipients',required=True) + rbu.add_field('recipients', required=True) + rbu.add_field('mailingListUuid', arg='contact_list') return rbu def get_rbu_user(self):
Add missing fields to Shares2 api
fred49_linshare-api
train
py
745522efd34919aebb11e09f451245e55f650d2b
diff --git a/lib/ronin/network/udp/proxy.rb b/lib/ronin/network/udp/proxy.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/network/udp/proxy.rb +++ b/lib/ronin/network/udp/proxy.rb @@ -73,13 +73,13 @@ module Ronin readable, writtable, errors = IO.select(sockets,nil,sockets) (errors & server_connections).each do |server_socket| - client_socket = client_for(server_socket) + client_socket = client_connection_for(server_socket) close_connection(client_socket,server_socket) end (readable & server_connections).each do |server_socket| - client_socket = client_for(server_socket) + client_socket = client_connection_for(server_socket) data, addrinfo = recv(server_socket) server_data(client_socket,server_socket,data)
Renamed client_for to client_connection_for.
ronin-ruby_ronin-support
train
rb
f03229b6ccc4e9ee50c0a07dab69f80d69fc8d00
diff --git a/fbchat_archive_parser/time.py b/fbchat_archive_parser/time.py index <HASH>..<HASH> 100644 --- a/fbchat_archive_parser/time.py +++ b/fbchat_archive_parser/time.py @@ -20,6 +20,7 @@ FACEBOOK_TIMESTAMP_FORMATS = [ ("de_de", "dddd, D. MMMM YYYY [um] HH:mm"), # German (Germany) ("nb_no", "D. MMMM YYYY kl. HH:mm"), # Norwegian (Bokmål) ("es_es", "dddd, D [de] MMMM [de] YYYY [a las?] H:mm"), # Spanish (General) + ("sl_si", "D. MMMM YYYY [ob] H:mm"), # Slovenian ] # Generate a mapping of all timezones to their offsets.
Added slovenian-style timestamp
ownaginatious_fbchat-archive-parser
train
py
473d352065e6bedfdd84742fc1296da5ed27eba9
diff --git a/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/VariantAnnotation.java b/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/VariantAnnotation.java index <HASH>..<HASH> 100644 --- a/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/VariantAnnotation.java +++ b/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/VariantAnnotation.java @@ -293,7 +293,7 @@ public class VariantAnnotation { public ProteinSubstitutionScores getProteinSubstitutionScores() { // TODO: broken compatibility with VariantPolyphenSIFTAnnotator - return new ProteinSubstitutionScores(); + return null; } // public List<Score> getProteinSubstitutionScores() { @@ -306,7 +306,7 @@ public class VariantAnnotation { public RegulatoryEffect getRegulatoryEffect() { // TODO: broken compatibility with VariantEffectConverter - return new RegulatoryEffect(); + return null; } // public RegulatoryEffect getRegulatoryEffect() {
feature/<I>.x: small changes at VariantAnnotation to ensure compatibility with OpenCGA annotation client
opencb_biodata
train
java
7b6f607fbb2340994ca55c9bac61d8bcca231461
diff --git a/synapse/lib/lmdbslab.py b/synapse/lib/lmdbslab.py index <HASH>..<HASH> 100644 --- a/synapse/lib/lmdbslab.py +++ b/synapse/lib/lmdbslab.py @@ -587,7 +587,7 @@ class Slab(s_base.Base): COMMIT_PERIOD = float(os.environ.get('SYN_SLAB_COMMIT_PERIOD', '0.2')) # warn if commit takes too long - WARN_COMMIT_TIME_MS = int(float(os.environ.get('SYN_SLAB_COMMIT_WARN', '5.0')) * 1000) + WARN_COMMIT_TIME_MS = int(float(os.environ.get('SYN_SLAB_COMMIT_WARN', '1.0')) * 1000) DEFAULT_MAPSIZE = s_const.gibibyte DEFAULT_GROWSIZE = None
Change SYN_SLAB_COMMIT_WARN from <I> to <I> (SYN-<I>) (#<I>)
vertexproject_synapse
train
py
07af97d361163de7b4e0bb49a465a86c86dfd381
diff --git a/openquake/engine/export/core.py b/openquake/engine/export/core.py index <HASH>..<HASH> 100644 --- a/openquake/engine/export/core.py +++ b/openquake/engine/export/core.py @@ -52,6 +52,7 @@ def export_from_datastore(output_key, calc_id, datadir, target): :param datadir: directory containing the datastore :param target: directory, temporary when called from the engine server """ + makedirs(target) ds_key, fmt = output_key dstore = datastore.read(calc_id, datadir=datadir) dstore.export_dir = target
Added a forgotten call to makedirs
gem_oq-engine
train
py
05eb40c4c784388b21cc42e06d326d20aa81e53d
diff --git a/beaver/transports/base_transport.py b/beaver/transports/base_transport.py index <HASH>..<HASH> 100644 --- a/beaver/transports/base_transport.py +++ b/beaver/transports/base_transport.py @@ -116,6 +116,7 @@ class BaseTransport(object): def format(self, filename, line, timestamp, **kwargs): """Returns a formatted log line""" + line = unicode(line.encode("utf-8")[:32766], "utf-8", errors="ignore") formatter = self._beaver_config.get_field('format', filename) if formatter not in self._formatters: formatter = self._default_formatter
Ensure log lines confirm to utf-8 standard We've come across cases when certain characters break Beaver transmitting log lines. This PR ensures all log lines correctly conform to UTF-8 when they're formatted for transmission.
python-beaver_python-beaver
train
py
4c150f6fada796da1f9928e6ece4d76318750c37
diff --git a/lib/mqtt/client.rb b/lib/mqtt/client.rb index <HASH>..<HASH> 100644 --- a/lib/mqtt/client.rb +++ b/lib/mqtt/client.rb @@ -287,8 +287,11 @@ class MQTT::Client # If a block is given, then yield and disconnect if block_given? - yield(self) - disconnect + begin + yield(self) + ensure + disconnect + end end end diff --git a/spec/mqtt_client_spec.rb b/spec/mqtt_client_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mqtt_client_spec.rb +++ b/spec/mqtt_client_spec.rb @@ -282,9 +282,19 @@ describe MQTT::Client do ) end - it "should disconnect after connecting, if a block is given" do - expect(client).to receive(:disconnect).once - client.connect('myclient') { nil } + context "if a block is given" do + it "should disconnect after connecting" do + expect(client).to receive(:disconnect).once + client.connect('myclient') { nil } + end + + it "should disconnect even if the block raises an exception" do + expect(client).to receive(:disconnect).once + begin + client.connect('myclient') { raise StandardError } + rescue StandardError + end + end end it "should not disconnect after connecting, if no block is given" do
put "disconnect" inside an "ensure" block Also includes a spec for this behavior. This will cause the client to disconnect even in cases where the connect block raises an exception.
njh_ruby-mqtt
train
rb,rb
c381192e07fe5d98652937168e01a025da83a597
diff --git a/spec/javascripts/ui_spec.js b/spec/javascripts/ui_spec.js index <HASH>..<HASH> 100644 --- a/spec/javascripts/ui_spec.js +++ b/spec/javascripts/ui_spec.js @@ -57,4 +57,20 @@ describe("UI testing", function() { expect(parseFloat(latEl.val())).toBe(40.73); expect(parseFloat(lngEl.val())).toBe(-73.92); }); + + it("Checks scale listener output the correct scale of the boxes", function() { + var fixture = loadFixtures('index.html'); + + blurredLocation.setZoomByPrecision(2); + var scale = blurredLocation.getDistanceMetrics() + + expect(scale).toBe(1.57); + + blurredLocation.setZoomByPrecision(3); + + var scale = blurredLocation.getDistanceMetrics() + expect(scale).toBe(0.15); + }); + + });
Test added for blurry-distance metrics (#<I>) * tweaks * Test added
publiclab_leaflet-blurred-location
train
js
78a5a6a7eb964ee55cf16d79b895d6869b8c1cc3
diff --git a/salt/beacons/diskusage.py b/salt/beacons/diskusage.py index <HASH>..<HASH> 100644 --- a/salt/beacons/diskusage.py +++ b/salt/beacons/diskusage.py @@ -12,9 +12,6 @@ from __future__ import absolute_import import logging import re -# Import Salt libs -import salt.utils - # Import Third Party Libs try: import psutil
removing unused import to make lint happy
saltstack_salt
train
py
89226e3c6bba126f4e36a7b0f88739720b79ef0f
diff --git a/src/commands/dev/index.js b/src/commands/dev/index.js index <HASH>..<HASH> 100644 --- a/src/commands/dev/index.js +++ b/src/commands/dev/index.js @@ -154,8 +154,8 @@ function startDevServer(settings, log) { env: { ...settings.env, FORCE_COLOR: 'true' }, stdio: settings.stdio || 'inherit' }) - if (ps.stdout) ps.stdout.on('data', settings.onStdout || (() => {})) - if (ps.stderr) ps.stderr.on('data', settings.onStderr || (() => {})) + if (ps.stdout) ps.stdout.on('data', settings.onStdout || ((buff) => process.stdout.write(buff.toString('utf8')))) + if (ps.stderr) ps.stderr.on('data', settings.onStderr || ((buff) => process.stderr.write(buff.toString('utf8')))) ps.on('close', code => process.exit(code)) ps.on('SIGINT', process.exit) ps.on('SIGTERM', process.exit)
Dev stdio: Provide a fallback for piping
netlify_cli
train
js
9e7722ea7fe7d622be2986dd1a1949804c92be8c
diff --git a/test/unit/test_action.rb b/test/unit/test_action.rb index <HASH>..<HASH> 100644 --- a/test/unit/test_action.rb +++ b/test/unit/test_action.rb @@ -9,7 +9,7 @@ end class ActionTest < Test::Unit::TestCase - context "A CloudCrowd Job" do + context "A CloudCrowd::Action" do setup do @store = CloudCrowd::AssetStore.new @@ -41,13 +41,18 @@ class ActionTest < Test::Unit::TestCase end should "be able to count the number of words in this file" do - assert @action.process == 195 + assert @action.process == 212 + end + + should "raise an exception when backticks fail" do + def @action.process; `utter failure 2>&1`; end + assert_raise(CloudCrowd::Error::CommandFailed) { @action.process } end end - context "A CloudCrowd Job without URL input" do + context "A CloudCrowd::Action without URL input" do setup do @store = CloudCrowd::AssetStore.new
adding a test that ensures that failed attempts to shell out in an Action raise an exception (which in turns marks the WorkUnit as failed)
documentcloud_cloud-crowd
train
rb
28734001b0d3cffa5a8f6f54e691c427a6e63f1f
diff --git a/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java b/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java index <HASH>..<HASH> 100644 --- a/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java +++ b/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java @@ -174,7 +174,7 @@ public class SlidingUpPanelLayout extends ViewGroup { /** * If the current slide state is DRAGGING, this will store the last non dragging state */ - private PanelState mLastNotDraggingSlideState = null; + private PanelState mLastNotDraggingSlideState = DEFAULT_SLIDE_STATE; /** * How far the panel is offset from its expanded position.
Have a default state for mLastNotDraggingSlideState mLastNotDraggingSlideState is used to store the saved instance state for the activity, therefore if null will cause the parcel serialization to fail with a NPE Fixes #<I>.
umano_AndroidSlidingUpPanel
train
java
d85082858e50181d10164e1394a7f9b4b7f3908e
diff --git a/github/PullRequest.py b/github/PullRequest.py index <HASH>..<HASH> 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -474,16 +474,21 @@ class PullRequest(github.GithubObject.CompletableGithubObject): """ return self.get_review_comments() - def get_review_comments(self): + def get_review_comments(self, since=github.GithubObject.NotSet): """ :calls: `GET /repos/:owner/:repo/pulls/:number/comments <http://developer.github.com/v3/pulls/comments>`_ + :param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment` """ + assert since is github.GithubObject.NotSet or isinstance(since, datetime.datetime), since + url_parameters = dict() + if since is not github.GithubObject.NotSet: + url_parameters["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ") return github.PaginatedList.PaginatedList( github.PullRequestComment.PullRequestComment, self._requester, self.url + "/comments", - None + url_parameters ) def get_commits(self):
adding since to PR review comments get (#<I>)
PyGithub_PyGithub
train
py
86d983dc9a9b4ce9ebf51d26fcb3024a5c11cd48
diff --git a/lib/Redis.php b/lib/Redis.php index <HASH>..<HASH> 100644 --- a/lib/Redis.php +++ b/lib/Redis.php @@ -140,7 +140,13 @@ class Redis { } $this->readWatcher = $this->reactor->onReadable($this->socket, function () { - $this->onRead(); + $read = fread($this->socket, 8192); + + if ($read != "") { + $this->parser->append($read); + } elseif (!is_resource($this->socket) || @feof($this->socket)) { + $this->close(true); + } }); $this->writeWatcher = $this->reactor->onWritable($this->socket, function (Reactor $reactor, $watcherId) { @@ -153,16 +159,6 @@ class Redis { return $this->connectPromisor->promise(); } - private function onRead () { - $read = fread($this->socket, 8192); - - if ($read != "") { - $this->parser->append($read); - } elseif (!is_resource($this->socket) || @feof($this->socket)) { - $this->close(true); - } - } - private function onResponse ($result) { if ($this->mode === self::MODE_DEFAULT) { $promisor = array_shift($this->promisors);
inlined onRead code saves a method call per read
amphp_redis
train
php
0ce0e6de0a91c542ebe8f040052c6573bfe6a517
diff --git a/src/CoandaCMS/Coanda/Pages/Renderer/PageRenderer.php b/src/CoandaCMS/Coanda/Pages/Renderer/PageRenderer.php index <HASH>..<HASH> 100644 --- a/src/CoandaCMS/Coanda/Pages/Renderer/PageRenderer.php +++ b/src/CoandaCMS/Coanda/Pages/Renderer/PageRenderer.php @@ -44,14 +44,22 @@ class PageRenderer { private $view; /** + * @var \Illuminate\Foundation\Application + */ + private $app; + + /** * @param PageStaticCacher $cacher * @param PageManager $manager + * @param \Illuminate\View\Factory $view + * @param \Illuminate\Foundation\Application $app */ - public function __construct(PageStaticCacher $cacher, PageManager $manager, \Illuminate\View\Factory $view) + public function __construct(PageStaticCacher $cacher, PageManager $manager, \Illuminate\View\Factory $view, \Illuminate\Foundation\Application $app) { $this->cacher = $cacher; $this->manager = $manager; $this->view = $view; + $this->app = $app; } /** @@ -232,7 +240,7 @@ class PageRenderer { { if ($this->page->is_trashed || !$this->page->is_visible || $this->page->is_hidden) { - App::abort('404'); + $this->app->abort('404'); } }
Fixed reference to App. Injected the app instance instead and used that.
CoandaCMS_coanda-core
train
php
0010de2873ebb18c46c347fe051d802b4eceeb4f
diff --git a/GestureHandler.js b/GestureHandler.js index <HASH>..<HASH> 100644 --- a/GestureHandler.js +++ b/GestureHandler.js @@ -660,17 +660,20 @@ function createNativeWrapper(Component, config = {}) { _refHandler = node => { // bind native component's methods - for (let methodName in node) { - const method = node[methodName]; - if ( - !methodName.startsWith('_') && // private methods - !methodName.startsWith('component') && // lifecycle methods - !NATIVE_WRAPPER_BIND_BLACKLIST.has(methodName) && // other - typeof method === 'function' && - this[methodName] === undefined - ) { - this[methodName] = method; + let source = node; + while (source != null) { + for (let methodName of Object.getOwnPropertyNames(source)) { + if ( + !methodName.startsWith('_') && // private methods + !methodName.startsWith('component') && // lifecycle methods + !NATIVE_WRAPPER_BIND_BLACKLIST.has(methodName) && // other + typeof source[methodName] === 'function' && + this[methodName] === undefined + ) { + this[methodName] = source[methodName].bind(node); + } } + source = Object.getPrototypeOf(source); } };
Copy classes methods properly in _refHandler (#<I>) I noticed some methods missing from the gesture handler wrapped components since updating RN to latest master. It happens because a lot of core components were changed to use classes instead of React.createClass and the logic to copy methods did not handle classes properly. This fixes it by looping through the prototype and using Object. getOwnPropertyNames to get methods instead of for ... in. This way it handles classes and regular objects properly.
kmagiera_react-native-gesture-handler
train
js
c1f990d8c7c01ae9326f51c4108289a8126cb686
diff --git a/php/HtmlSnippet.php b/php/HtmlSnippet.php index <HASH>..<HASH> 100644 --- a/php/HtmlSnippet.php +++ b/php/HtmlSnippet.php @@ -22,6 +22,9 @@ class HtmlSnippet { * @param string $content HTML snippet */ public function __construct( $content ) { + if ( !is_string( $content ) ) { + throw new Exception( 'Content passed to HtmlSnippet must be a string' ); + } $this->content = $content; }
HtmlSnippet: Throw exception if given non-string content Otherwise we will end up with a PHP fatal error somewhere later when we try to stringify the HtmlSnippet object. An exception when constructing it is easier to debug. Change-Id: Id6e0d<I>a<I>b8f<I>e6ae<I>bb<I>d0e<I>fbc
wikimedia_oojs-ui
train
php
660e2cd96ca5abc37276d35c4ae3612c6d44785c
diff --git a/spec/definition_spec.rb b/spec/definition_spec.rb index <HASH>..<HASH> 100644 --- a/spec/definition_spec.rb +++ b/spec/definition_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/spec_helper.rb' +require 'spec/spec_helper' class RoxmlObject include ROXML diff --git a/spec/roxml_spec.rb b/spec/roxml_spec.rb index <HASH>..<HASH> 100644 --- a/spec/roxml_spec.rb +++ b/spec/roxml_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/spec_helper.rb' +require 'spec/spec_helper' describe ROXML, "#from_xml" do describe "from_xml call", :shared => true do diff --git a/spec/shared_specs.rb b/spec/shared_specs.rb index <HASH>..<HASH> 100644 --- a/spec/shared_specs.rb +++ b/spec/shared_specs.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/spec_helper.rb' +require 'spec/spec_helper' describe "freezable xml reference", :shared => true do describe "with :frozen option" do
Banish File.dirname from specs
Empact_roxml
train
rb,rb,rb
96bba451ed31a4da1b9a955abc3726dcafe71090
diff --git a/rapidoid-model/src/main/java/org/rapidoid/model/Model.java b/rapidoid-model/src/main/java/org/rapidoid/model/Model.java index <HASH>..<HASH> 100644 --- a/rapidoid-model/src/main/java/org/rapidoid/model/Model.java +++ b/rapidoid-model/src/main/java/org/rapidoid/model/Model.java @@ -97,7 +97,8 @@ public class Model { if (propertyNames.length == 0) { for (Prop prop : props.values()) { - if (!prop.getName().equalsIgnoreCase("id")) { + if (!prop.getName().equalsIgnoreCase("id") && !prop.getName().equalsIgnoreCase("version") + && !prop.isReadOnly()) { pr.add(new BeanProperty(prop.getName(), prop.getType())); } }
Fixed filter for read-only properties.
rapidoid_rapidoid
train
java
20e52b41b53684e494c4d3971645452422e88275
diff --git a/common/src/js/core/scripts/selenium-api.js b/common/src/js/core/scripts/selenium-api.js index <HASH>..<HASH> 100644 --- a/common/src/js/core/scripts/selenium-api.js +++ b/common/src/js/core/scripts/selenium-api.js @@ -950,7 +950,7 @@ Selenium.prototype.doOpen = function(url, ignoreResponseCode) { * @param ignoreResponseCode (optional) turn off ajax head request functionality * */ - if (ignoreResponseCode == null) { + if (ignoreResponseCode == null || ignoreResponseCode.length == 0) { this.browserbot.ignoreResponseCode = true; } else if (ignoreResponseCode.toLowerCase() == "true") { this.browserbot.ignoreResponseCode = true;
AdamGoucher - really fixing the ignoring of the extra check on 'open' if there is nothing being passed in. i still think that this needs to be changed at some point to invert the logic so that rather than setting something to ignore that something should be set to turn on r<I>
SeleniumHQ_selenium
train
js
23c80fca5738dcf532993306d90b43524ec805d8
diff --git a/src/test/java/com/buschmais/jqassistant/plugin/yaml/impl/scanner/YAMLFileScannerPluginIT.java b/src/test/java/com/buschmais/jqassistant/plugin/yaml/impl/scanner/YAMLFileScannerPluginIT.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/buschmais/jqassistant/plugin/yaml/impl/scanner/YAMLFileScannerPluginIT.java +++ b/src/test/java/com/buschmais/jqassistant/plugin/yaml/impl/scanner/YAMLFileScannerPluginIT.java @@ -350,6 +350,7 @@ public class YAMLFileScannerPluginIT extends AbstractPluginIT { // {"/probes/yamlspec/1.1/sec-2.1-example-2.4-sequence-of-mappings.yaml"}, } + @Ignore("Test cannot succeed because of the wrong implementation of the YAML scanner.") @Test public void scanSequenceOfSequencesYAML() { File yamlFile = new File(getClassesDirectory(YAMLFileScannerPluginValidFileSetIT.class),
Disabled YAMLFileScannerPluginIT#scanSequenceOfSequencesYAML. The YAML plugin is actually brocken and I consider a total rewrite.
buschmais_jqa-yaml-plugin
train
java
26e3ab63b1d916c2168d373f9cabbc6d4fdeede9
diff --git a/pr-tagger.js b/pr-tagger.js index <HASH>..<HASH> 100755 --- a/pr-tagger.js +++ b/pr-tagger.js @@ -50,8 +50,18 @@ if (!semverRegex().test(program.tag)) { logger.error('Tag not semver compliant: %s', program.tag) process.exit(1) } -if (tags.indexOf(program.tag) === -1) { + +const toTagIndex = tags.indexOf(program.tag) +if (toTagIndex === -1) { logger.error('Tag not found in repository: %s', program.tag) process.exit(1) } +const toTag = program.tag +const fromTag = tags[toTagIndex + 1] + +const gitLogCmd = `git log ${fromTag}..${toTag} --format='%s' --grep='^Merge pull request #[0-9]\\+ from '` +logger.debug('Command: %s', gitLogCmd) + +const commits = exec(gitLogCmd).toString().trimRight() +logger.debug('Commits: %s', commits)
Get commits with a PR merge The PR merge is detected based on the text that GitHub adds to the commit by default
jcollado_pr-tagger
train
js
35033c601163d41c7993c8ca3a97d1820f414233
diff --git a/src/main/java/de/thetaphi/forbiddenapis/CliMain.java b/src/main/java/de/thetaphi/forbiddenapis/CliMain.java index <HASH>..<HASH> 100644 --- a/src/main/java/de/thetaphi/forbiddenapis/CliMain.java +++ b/src/main/java/de/thetaphi/forbiddenapis/CliMain.java @@ -54,7 +54,7 @@ public final class CliMain { public static final int EXIT_UNSUPPORTED_JDK = 3; public static final int EXIT_ERR_OTHER = 4; - @SuppressWarnings("static-access") + @SuppressWarnings({"static-access","static"}) public CliMain(String... args) throws ExitException { final OptionGroup required = new OptionGroup(); required.setRequired(true);
Also suppress warnings in Java 7, not only Eclipse
policeman-tools_forbidden-apis
train
java
5bf3b0a879d7276ecbde281135e6768f1cecf29b
diff --git a/mike/app_version.py b/mike/app_version.py index <HASH>..<HASH> 100644 --- a/mike/app_version.py +++ b/mike/app_version.py @@ -1 +1 @@ -version = '0.1.1' +version = '0.2.0.dev0'
Update version to <I>.dev0
jimporter_mike
train
py
1a6f4481e380eb3a3fdf95ac3aa6c72d51b910bf
diff --git a/src/FeatureResolve.php b/src/FeatureResolve.php index <HASH>..<HASH> 100644 --- a/src/FeatureResolve.php +++ b/src/FeatureResolve.php @@ -1,7 +1,39 @@ <?php +namespace KawaiiGherkin; -class FeatureResolve +use Symfony\Component\Finder\Finder; + +final class FeatureResolve { + /** + * @var string + */ + private $directoryOrFile; + + /** + * @param string $directoryOrFile + */ + public function __construct($directoryOrFile) + { + $this->directoryOrFile = $directoryOrFile; + } + + private function getDirectory() + { + return is_dir($this->directoryOrFile) ? $this->directoryOrFile : dirname($this->directoryOrFile); + } + + private function getFeatureMatch() + { + return is_dir($this->directoryOrFile) ? '*.feature' : basename($this->directoryOrFile); + } + public function __invoke() + { + return Finder::create() + ->files() + ->in($this->getDirectory()) + ->name($this->getFeatureMatch()); + } }
Added class to solve feature file/directory
malukenho_kawaii-gherkin
train
php
85fbeb0bb94b2429bbde831ab39948da20e45f94
diff --git a/test/test_action.py b/test/test_action.py index <HASH>..<HASH> 100755 --- a/test/test_action.py +++ b/test/test_action.py @@ -111,6 +111,7 @@ class TestAction(ShinkenTest): self.wait_finished(a) self.assertEqual(a.output, 'TITI=est en vacance') + def test_environment_variables(self): class ActionWithoutPerfData(Action): @@ -253,6 +254,23 @@ class TestAction(ShinkenTest): + def test_execve_fail_with_utf8(self): + if os.name == 'nt': + return + + a = Action() + a.timeout = 10 + a.env = {} # :fixme: this sould be pre-set in Action.__init__() + + a.command = u"/bin/echo Wiadomo\u015b\u0107" + + a.execute() + self.wait_finished(a) + #print a.output + self.assertEqual(a.output.decode('utf8'), u"Wiadomo\u015b\u0107") + + + if __name__ == '__main__': import sys
Add : a test case about the #<I> . Cannot reproduce on <I>, maybe <I> or below will fail.
Alignak-monitoring_alignak
train
py
a323fa6b93290f6ec3c13630380b713cc63d7d0d
diff --git a/test/org/mockitousage/constructor/CreatingMocksWithConstructorTest.java b/test/org/mockitousage/constructor/CreatingMocksWithConstructorTest.java index <HASH>..<HASH> 100644 --- a/test/org/mockitousage/constructor/CreatingMocksWithConstructorTest.java +++ b/test/org/mockitousage/constructor/CreatingMocksWithConstructorTest.java @@ -79,14 +79,11 @@ public class CreatingMocksWithConstructorTest extends TestBase { } @Test - @Ignore //TODO SF - public void prevents_mocking_interfaces_with_constructor() { - try { - //when - mock(IMethods.class, withSettings().useConstructor()); - //then - fail(); - } catch (MockitoException e) {} + public void mocking_interfaces_with_constructor() { + //at the moment this is allowed however we can be more strict if needed + //there is not much sense in creating a spy of an interface + mock(IMethods.class, withSettings().useConstructor()); + spy(IMethods.class); } @Test
Documented current behavior via a test Issue #<I>
mockito_mockito
train
java
b2f2ed35265dc48673c6bc981926b4d7e570feb4
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,8 +15,6 @@ import sys import os -import sphinx_rtd_theme - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -121,7 +119,7 @@ html_theme = "sphinx_rtd_theme" #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation".
Get rid of import of sphinx_rtd_them in conf.py
IvanMalison_okcupyd
train
py
2d4e72f1fab6455805c47cab97f13bfe3c348451
diff --git a/pkg/registry/etcd/etcd.go b/pkg/registry/etcd/etcd.go index <HASH>..<HASH> 100644 --- a/pkg/registry/etcd/etcd.go +++ b/pkg/registry/etcd/etcd.go @@ -347,7 +347,17 @@ func (r *Registry) WatchControllers(ctx api.Context, label, field labels.Selecto } match := label.Matches(labels.Set(controller.Labels)) if match { - pods, _ := r.ListPods(ctx, labels.Set(controller.Spec.Selector).AsSelector()) + pods, err := r.ListPods(ctx, labels.Set(controller.Spec.Selector).AsSelector()) + if err != nil { + glog.Warningf("Error listing pods: %v", err) + // No object that's useable so drop it on the floor + return false + } + if pods == nil { + glog.Warningf("Pods list is nil. This should never happen...") + // No object that's useable so drop it on the floor + return false + } controller.Status.Replicas = len(pods.Items) } return match
Add some extra checking around a call to list pods.
kubernetes_kubernetes
train
go
f47d61d9d321a040d4c24eeb0bf1676c8526b21f
diff --git a/lib/librarian/source/git.rb b/lib/librarian/source/git.rb index <HASH>..<HASH> 100644 --- a/lib/librarian/source/git.rb +++ b/lib/librarian/source/git.rb @@ -124,9 +124,8 @@ module Librarian def cache_key @cache_key ||= begin uri_part = uri - path_part = "/#{path}" if path ref_part = "##{ref}" - key_source = [uri_part, path_part, ref_part].join + key_source = [uri_part, ref_part].join Digest::MD5.hexdigest(key_source)[0..15] end end
Improve caching: same git repo/ref and different path = single cached copy.
applicationsonline_librarian
train
rb
29d434562921eeaa6ce4e41f183962b3ce42ceb1
diff --git a/Zara4/API/Client.php b/Zara4/API/Client.php index <HASH>..<HASH> 100644 --- a/Zara4/API/Client.php +++ b/Zara4/API/Client.php @@ -67,6 +67,16 @@ class Client { /** + * Get the access token + * + * @return AccessToken|Communication\AccessToken\ReissuableAccessToken|null + */ + public function accessToken() { + return $this->accessToken; + } + + + /** * @param Request $imageProcessingRequest * @return array */
Add ability to read access token from client
zara-4_php-sdk
train
php
7d0423425a857ccc98c6a84c8e0d093bb3b360d0
diff --git a/src/components/Avatar/Avatar.react.js b/src/components/Avatar/Avatar.react.js index <HASH>..<HASH> 100644 --- a/src/components/Avatar/Avatar.react.js +++ b/src/components/Avatar/Avatar.react.js @@ -5,7 +5,11 @@ import { Icon } from "../"; import cn from "classnames"; import AvatarList from "./AvatarList.react"; +import type { MouseEvents, PointerEvents } from "../../"; + export type Props = {| + ...MouseEvents, + ...PointerEvents, +children?: React.Node, +className?: string, /** @@ -45,6 +49,11 @@ function Avatar({ placeholder, icon, color = "", + onClick, + onMouseEnter, + onMouseLeave, + onPointerEnter, + onPointerLeave, }: Props): React.Node { const classes = cn( { @@ -68,6 +77,11 @@ function Avatar({ ) : style } + onClick={onClick} + onMouseEnter={onMouseEnter} + onMouseLeave={onMouseLeave} + onPointerEnter={onPointerEnter} + onPointerLeave={onPointerLeave} > {icon && <Icon name={icon} />} {status && <span className={`avatar-status bg-${status}`} />}
feat(Avatar): Add mouse and pointer event props
tabler_tabler-react
train
js
28015f9211e8e3a07f1173e97e252109a2d389dc
diff --git a/openstack_dashboard/dashboards/admin/info/tables.py b/openstack_dashboard/dashboards/admin/info/tables.py index <HASH>..<HASH> 100644 --- a/openstack_dashboard/dashboards/admin/info/tables.py +++ b/openstack_dashboard/dashboards/admin/info/tables.py @@ -21,6 +21,10 @@ class QuotaFilterAction(tables.FilterAction): def get_quota_name(quota): + if quota.name == "cores": + return _('VCPUs') + if quota.name == "floating_ips": + return _('Floating IPs') return quota.name.replace("_", " ").title()
Quotas names fixed Cores->VCPUs, Floating Ips->Floating IPs Change-Id: I<I>adc<I>fc3aa0dc<I>f6d<I>e<I>ac0c<I> Fixes: bug #<I>
openstack_horizon
train
py
c9f55380805e4ad8087170d1119e76d7d0ae71ac
diff --git a/nif_neuron.py b/nif_neuron.py index <HASH>..<HASH> 100755 --- a/nif_neuron.py +++ b/nif_neuron.py @@ -114,7 +114,7 @@ def make_mutually_disjoint(graph, members): def type_check(tup, types): return all([type(t) is ty for t, ty in zip(tup, types)]) -def add_types(graph, phenotypes): +def add_types(graph, phenotypes): # TODO missing expression phenotypes! """ Add disjoint union classes so that it is possible to see the invariants associated with individual phenotypes """
need to have expression covered in add_types as well
tgbugs_pyontutils
train
py
dee486a81f92e6eb2e842720798a935f74de30fa
diff --git a/openquake/calculators/ucerf_base.py b/openquake/calculators/ucerf_base.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/ucerf_base.py +++ b/openquake/calculators/ucerf_base.py @@ -271,13 +271,6 @@ class UCERFSource(BaseSeismicSource): plane = hdf5[trace + "/RupturePlanes"][:].astype("float64") yield trace, plane - @property - def weight(self): - """ - Weight of the source, equal to the number of ruptures contained - """ - return self.num_ruptures - def get_background_sids(self, src_filter): """ We can apply the filtering of the background sites as a pre-processing
Fixed weight [skip hazardlib]
gem_oq-engine
train
py
b97ae495e4c8c6ac50ff686c050c7f9cd3abaf05
diff --git a/src/main/java/org/jboss/aerogear/unifiedpush/rest/security/AuthenticationEndpoint.java b/src/main/java/org/jboss/aerogear/unifiedpush/rest/security/AuthenticationEndpoint.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jboss/aerogear/unifiedpush/rest/security/AuthenticationEndpoint.java +++ b/src/main/java/org/jboss/aerogear/unifiedpush/rest/security/AuthenticationEndpoint.java @@ -21,6 +21,7 @@ import org.jboss.aerogear.security.auth.AuthenticationManager; import org.jboss.aerogear.security.authz.IdentityManagement; import org.jboss.aerogear.security.exception.AeroGearSecurityException; import org.jboss.aerogear.security.picketlink.auth.CredentialMatcher; +import org.picketlink.idm.model.basic.Agent; import org.picketlink.idm.model.basic.User; import javax.ejb.Stateless; @@ -39,7 +40,8 @@ import javax.ws.rs.core.Response.Status; public class AuthenticationEndpoint { @Inject - private AuthenticationManager authenticationManager; + private AuthenticationManager<Agent> authenticationManager; + @Inject private CredentialMatcher credential; @Inject
Using Agent as parameterized type for the AuthenticationManager injection point
aerogear_aerogear-unifiedpush-server
train
java
52ff6df4e90f6d308059cb2ede41ffaec3b1f7bc
diff --git a/dock/plugins/pre_pyrpkg_fetch_artefacts.py b/dock/plugins/pre_pyrpkg_fetch_artefacts.py index <HASH>..<HASH> 100644 --- a/dock/plugins/pre_pyrpkg_fetch_artefacts.py +++ b/dock/plugins/pre_pyrpkg_fetch_artefacts.py @@ -3,6 +3,7 @@ To have everything for a build in dist-git you need to fetch artefacts using 'fe This plugin should do it. """ +import os import subprocess from dock.plugin import PreBuildPlugin @@ -27,4 +28,14 @@ class DistgitFetchArtefactsPlugin(PreBuildPlugin): """ fetch artefacts """ + sources_file_path = os.path.join(self.workflow.builder.git_path, 'sources') + try: + with open(sources_file_path, 'r') as f: + self.log.info('Sources file:\n', f.read()) + except IOError as ex: + if ex.errno == 2: + self.log.info("no sources file") + else: + raise + subprocess.check_call([self.binary, "--path", self.workflow.builder.git_path, "sources"])
pyrpkg sources: print sources file before exec
projectatomic_atomic-reactor
train
py
c825373971d0ad24e4ca71fd4da88e55e62a6b17
diff --git a/productmd/__init__.py b/productmd/__init__.py index <HASH>..<HASH> 100644 --- a/productmd/__init__.py +++ b/productmd/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2015 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/>. + +from .compose import Compose # noqa +from .composeinfo import ComposeInfo # noqa +from .discinfo import DiscInfo # noqa +from .images import Images # noqa +from .rpms import Rpms # noqa +from .treeinfo import TreeInfo # noqa
Allow importing major classes directly from productmd This should simplify things for most users: just import productmd module and Compose (the one for metadata loading), Rpms and Images classes are directly available as well as ComposeInfo, DiscInfo and TreeInfo.
release-engineering_productmd
train
py
163e530c0c96c4639fe2fc778f18fba0b0d1642f
diff --git a/ca/django_ca/tests/tests_utils.py b/ca/django_ca/tests/tests_utils.py index <HASH>..<HASH> 100644 --- a/ca/django_ca/tests/tests_utils.py +++ b/ca/django_ca/tests/tests_utils.py @@ -345,7 +345,7 @@ class ParseKeyCurveTestCase(TestCase): self.assertIsInstance(parse_key_curve(), type(ca_settings.CA_DEFAULT_ECC_CURVE)) self.assertIsInstance(parse_key_curve('SECT409R1'), ec.SECT409R1) self.assertIsInstance(parse_key_curve('SECP521R1'), ec.SECP521R1) - self.assertIsInstance(parse_key_curve('BrainpoolP256R1'), ec.BrainpoolP256R1) + self.assertIsInstance(parse_key_curve('SECP192R1'), ec.SECP192R1) def test_error(self): with self.assertRaisesRegex(ValueError, '^FOOBAR: Not a known Eliptic Curve$'):
do not use brainpool, it was added in <I>
mathiasertl_django-ca
train
py
c01482e1275b2220921877020f5d48ebc78ebb5d
diff --git a/Plugin/ExcludeFilesFromMinification.php b/Plugin/ExcludeFilesFromMinification.php index <HASH>..<HASH> 100644 --- a/Plugin/ExcludeFilesFromMinification.php +++ b/Plugin/ExcludeFilesFromMinification.php @@ -31,15 +31,17 @@ class ExcludeFilesFromMinification { /** * @param Minification $subject - * @param array $result + * @param callable $proceed * @param $contentType * @return array */ - public function afterGetExcludes(Minification $subject, array $result, $contentType) + public function aroundGetExcludes(Minification $subject, callable $proceed, $contentType) { - if ($contentType == 'js' && $subject->isEnabled($contentType)) { - $result[] = 'https://www.gstatic.com/charts/loader.js'; + $result = $proceed($contentType); + if ($contentType != 'js' && !$subject->isEnabled($contentType)) { + return $result; } + $result[] = 'https://www.gstatic.com/charts/loader.js'; return $result; } }
Changed ExcludeFilesFromMinification code to work with Magento versions < <I>
fastly_fastly-magento2
train
php
5cb536b57909cbf05c5237845ad6a2c072e567b2
diff --git a/core/src/main/java/io/undertow/client/http2/Http2ClientConnection.java b/core/src/main/java/io/undertow/client/http2/Http2ClientConnection.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/io/undertow/client/http2/Http2ClientConnection.java +++ b/core/src/main/java/io/undertow/client/http2/Http2ClientConnection.java @@ -127,7 +127,7 @@ public class Http2ClientConnection implements ClientConnection { } @Override - public void sendRequest(ClientRequest request, ClientCallback<ClientExchange> clientCallback) { + public synchronized void sendRequest(ClientRequest request, ClientCallback<ClientExchange> clientCallback) { request.getRequestHeaders().put(METHOD, request.getMethod().toString()); boolean connectRequest = request.getMethod().equals(Methods.CONNECT); if(!connectRequest) {
UNDERTOW-<I> Http2ClientConnection.sendRequest should be syncronized to make sure streams arrive in order
undertow-io_undertow
train
java
d46ca4d78eb7700c3650757350e7bf3e767aebdc
diff --git a/FsContext.php b/FsContext.php index <HASH>..<HASH> 100644 --- a/FsContext.php +++ b/FsContext.php @@ -2,6 +2,7 @@ namespace Enqueue\Fs; +use Doctrine\ORM\Cache\Lock; use Interop\Queue\InvalidDestinationException; use Interop\Queue\PsrContext; use Interop\Queue\PsrDestination; @@ -94,6 +95,11 @@ class FsContext implements PsrContext InvalidDestinationException::assertDestinationInstanceOf($destination, FsDestination::class); set_error_handler(function ($severity, $message, $file, $line) { + // do not throw on a deprecation notice. + if (E_USER_DEPRECATED === $severity && false !== strpos($message, LockHandler::class)) { + return; + } + throw new \ErrorException($message, 0, $severity, $file, $line); });
[fs] Do not throw error on deprecation notice.
php-enqueue_fs
train
php
e1e774a29223c5fafee139a64411fec416e1fdb4
diff --git a/command/build_ext.py b/command/build_ext.py index <HASH>..<HASH> 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -278,7 +278,9 @@ class build_ext (Command): 'extra_objects', 'extra_compile_args', 'extra_link_args'): - setattr(ext, key, build_info.get(key)) + val = build_info.get(key) + if val is not None: + setattr(ext, key, val) # Medium-easy stuff: same syntax/semantics, different names. ext.runtime_library_dirs = build_info.get('rpath')
In 'check_extensions_list()': when converting old-style 'buildinfo' dict, don't assign None to any attributes of the Extension object.
pypa_setuptools
train
py
b32d8fb75042c4ff26af9d22b260130f91050291
diff --git a/Entity/CacheRepository.php b/Entity/CacheRepository.php index <HASH>..<HASH> 100644 --- a/Entity/CacheRepository.php +++ b/Entity/CacheRepository.php @@ -149,6 +149,8 @@ class CacheRepository extends CommonRepository $interval = new \DateInterval('P1M'); } $oldest->sub($interval); + // Switch back to UTC for the format output. + $oldest->setTimezone(new \DateTimeZone('UTC')); return $oldest->format('Y-m-d H:i:s'); }
Switch back to UTC for format output.
TheDMSGroup_mautic-contact-client
train
php
677df72dda2d3373ba8f59ca8d9c9fab36d3ff9a
diff --git a/cmd/helm/doctor.go b/cmd/helm/doctor.go index <HASH>..<HASH> 100644 --- a/cmd/helm/doctor.go +++ b/cmd/helm/doctor.go @@ -42,7 +42,7 @@ func doctor(c *cli.Context) error { if client.IsInstalled(runner) { format.Success("You have everything you need. Go forth my friend!") } else { - format.Warning("Looks like you don't have DM installed.\nRun: `helm install`") + format.Warning("Looks like you don't have DM installed.\nRun: `helm server install`") } return nil diff --git a/pkg/kubectl/get.go b/pkg/kubectl/get.go index <HASH>..<HASH> 100644 --- a/pkg/kubectl/get.go +++ b/pkg/kubectl/get.go @@ -34,7 +34,7 @@ func (r RealRunner) GetByKind(kind, name, ns string) (string, error) { args := []string{"get", kind} if name != "" { - args = append([]string{name}, args...) + args = append(args, name) } if ns != "" {
fix(cli): fix 'helm doctor' Rather than remove 'helm doctor' for MVP, I just fixed the one small bug that was preventing it from working.
helm_helm
train
go,go
be254b7942354fb797e5bd4e6ebb50a3c4a7b717
diff --git a/Kwf/Util/Maintenance/Dispatcher.php b/Kwf/Util/Maintenance/Dispatcher.php index <HASH>..<HASH> 100644 --- a/Kwf/Util/Maintenance/Dispatcher.php +++ b/Kwf/Util/Maintenance/Dispatcher.php @@ -88,6 +88,7 @@ class Kwf_Util_Maintenance_Dispatcher if (!$e instanceof Kwf_Exception_Abstract) $e = new Kwf_Exception_Other($e); $e->logOrThrow(); } + Kwf_Events_ModelObserver::getInstance()->process(); } $t = microtime(true)-$t; if ($debug) echo "executed ".get_class($job)." in ".round($t, 3)."s\n";
Also call ModelObserver::process() after executing minutely/seconds maintenance jobs
koala-framework_koala-framework
train
php
54fec0878864cf786b6b3711b2dd48798a17ce13
diff --git a/publish.py b/publish.py index <HASH>..<HASH> 100755 --- a/publish.py +++ b/publish.py @@ -49,7 +49,8 @@ def main(): # create the new tag check_call(['git', 'tag', tag, '-m', 'Tagged {}'.format(tag)]) # build - check_call(['python3', 'setup.py', 'sdist', 'bdist_wheel']) + check_call(['python3', 'setup.py', 'sdist']) + check_call(['python3', 'setup.py', 'bdist_wheel', '--universal']) # upload files = ['dist/homely-{}.tar.gz'.format(tag)] files.extend(glob.glob('dist/homely-{}-py*.whl'.format(tag)))
[9] publish.py creates universal wheel for py2/3
phodge_homely
train
py
55904e67028a5914be442ae1f1590ceb1eb938ad
diff --git a/test/serializer_test.rb b/test/serializer_test.rb index <HASH>..<HASH> 100644 --- a/test/serializer_test.rb +++ b/test/serializer_test.rb @@ -49,8 +49,9 @@ class SerializerTest < Test::Unit::TestCase assert_equal '302', encoded end - def test_encode_invalid_file - encoded = Fewer::Serializer.encode(fs, ['doesnt-exist.css']) + def test_encode_invalid_files + encoded = Fewer::Serializer.encode(fs, %w(0 1 2 3 4 5 6 7 8 9 a b c d e f + g h i j k l m n o p q r s t u v w x y z 10)) assert_equal '', encoded end
Modify test so that it actually requires the call to compact.
benpickles_fewer
train
rb
143d9528defea0525277a13082e4e714043bcd7e
diff --git a/src/date-functions.js b/src/date-functions.js index <HASH>..<HASH> 100644 --- a/src/date-functions.js +++ b/src/date-functions.js @@ -403,6 +403,7 @@ Date.patterns = { ISO8601ShortPattern:"Y-m-d", ShortDatePattern: "n/j/Y", FiShortDatePattern: "j.n.Y", + FiWeekdayDatePattern: "D j.n.Y", LongDatePattern: "l, F d, Y", FullDateTimePattern: "l, F d, Y g:i:s A", MonthDayPattern: "F d",
date pattern for weekdays and finnish date
continuouscalendar_dateutils
train
js
5516b174901cc6c8028868d0305e96fb5869fe17
diff --git a/client/src/index.js b/client/src/index.js index <HASH>..<HASH> 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -188,7 +188,7 @@ function createFS(options) { // Bail if we're already connected if(sync.state !== sync.SYNC_DISCONNECTED && sync.state !== sync.ERROR) { - // TODO: https://github.com/mozilla/makedrive/issues/117 + console.error("MakeDrive: Attempted to connect to \"" + url + "\", but a connection already exists!"); return; } @@ -313,7 +313,7 @@ function createFS(options) { // Bail if we're not already connected if(sync.state === sync.SYNC_DISCONNECTED || sync.state === sync.ERROR) { - // TODO: https://github.com/mozilla/makedrive/issues/117 + console.error("MakeDrive: Attempted to disconnect, but no server connection exists!"); return; }
Fixed #<I> - Error handling for disconnect/connect MakeDrive.js silently errored if `sync.connect()` was called when already connected, or `sync.disconnect()` was called when no connection existed.
mozilla_makedrive
train
js
9356abbac14e24014c27824a3e9e275f706f9126
diff --git a/benchmark.js b/benchmark.js index <HASH>..<HASH> 100644 --- a/benchmark.js +++ b/benchmark.js @@ -23,7 +23,7 @@ function timeit(top, callback) { var fork = require('child_process').fork; function bench(name, callback) { - var cp = fork(__filename, ['baseline']); + var cp = fork(__filename, [name]); cp.once('message', function (stat) { console.log(name + ': ' + stat.mean.toFixed(4) + ' ± ' + (1.96 * stat.sd).toFixed(4) + ' ns/tick'); }); @@ -46,7 +46,7 @@ function timeit(top, callback) { 'trace': function () { require('./trace.js'); - var top = 100000; + var top = 5000; timeit(top, function (stat) { process.send({ "mean": stat.mean(), "sd": stat.sd() }); });
[bench] finally got the benchmark working :p
AndreasMadsen_trace
train
js
4b04b822727b64964652485d234f6b8d503b5861
diff --git a/qiskit/unroll/_dagunroller.py b/qiskit/unroll/_dagunroller.py index <HASH>..<HASH> 100644 --- a/qiskit/unroll/_dagunroller.py +++ b/qiskit/unroll/_dagunroller.py @@ -78,11 +78,12 @@ class DagUnroller(object): gatedefs.append(Gate(children)) # Walk through the DAG and examine each node builtins = ["U", "CX", "measure", "reset", "barrier"] + simulator_builtins = ['snapshot', 'save', 'load', 'noise'] topological_sorted_list = list(nx.topological_sort(self.dag_circuit.multi_graph)) for node in topological_sorted_list: current_node = self.dag_circuit.multi_graph.node[node] if current_node["type"] == "op" and \ - current_node["name"] not in builtins + basis and \ + current_node["name"] not in builtins + basis + simulator_builtins and \ not self.dag_circuit.gates[current_node["name"]]["opaque"]: subcircuit, wires = self._build_subcircuit(gatedefs, basis,
Handle simulator builtins in dag unroller (#<I>) This commit fixes an issue in the dag unroller when it encounters simulator builtin instructions like snapshot(). It doesn't know what those are so it assumes it's a gate. But since it's not a gate when it tries to look that up it fails on a KeyError. This fixes that by having a list of simulator builtins to check against and treats those like other builtins (barrier, reset, etc). Fixes #<I>
Qiskit_qiskit-terra
train
py
0e8dbd638b8623b67be31a30b139c68bff31862a
diff --git a/src/interactivity/Interactivity.js b/src/interactivity/Interactivity.js index <HASH>..<HASH> 100644 --- a/src/interactivity/Interactivity.js +++ b/src/interactivity/Interactivity.js @@ -154,23 +154,16 @@ export default class Interactivity { _subscribeToMapEvents (map) { map.on('mousemove', this._onMouseMove.bind(this)); map.on('click', this._onClick.bind(this)); - this._disableDuringMapEvents(map); + this._disableWhileMovingMap(map); } - _disableDuringMapEvents (map) { - const disableEvents = ['movestart']; - const enableEvents = ['moveend']; - - disableEvents.forEach((eventName) => { - map.on(eventName, () => { - this.disable(); - }); + _disableWhileMovingMap (map) { + map.on('movestart', () => { + this.disable(); }); - enableEvents.forEach((eventName) => { - map.on(eventName, () => { - this.enable(); - }); + map.on('moveend', () => { + this.enable(); }); }
Refactor to simplify automatic enable & disable in Interactivity
CartoDB_carto-vl
train
js
eddeeafff4ab430e4ec49d6306646f91ba7a3eb7
diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js index <HASH>..<HASH> 100644 --- a/docs/gatsby-config.js +++ b/docs/gatsby-config.js @@ -30,7 +30,8 @@ module.exports = { root: __dirname, subtitle: 'SDK Resources', description: 'Documentation for Resources', - gitRepo: 'availity/sdk-js', + gitRepo: 'github.com/availity/sdk-js', + gitType: 'github', contentDir: 'docs/source', sidebarCategories: { null: ['index', 'contributing'],
fix: edit on github button working now
Availity_sdk-js
train
js
58cf1c3a00fbc1c88c994992a5c9ad71a4dfa751
diff --git a/gxa/src/main/webapp/resources/js/geneQueryTagEditorModule.js b/gxa/src/main/webapp/resources/js/geneQueryTagEditorModule.js index <HASH>..<HASH> 100644 --- a/gxa/src/main/webapp/resources/js/geneQueryTagEditorModule.js +++ b/gxa/src/main/webapp/resources/js/geneQueryTagEditorModule.js @@ -2,6 +2,10 @@ var geneQueryTagEditorModule = (function($) { + function sanitize(str) { + return $('<span>' + str + '</span>').text(); + } + function initAutocomplete(element, species, onChange, placeholderText, contextPath) { $(element) // TODO paste items @@ -61,7 +65,7 @@ var geneQueryTagEditorModule = (function($) { .appendTo(ul); }, select: function(event, ui) { - ui.item.value = '{"value":"' + ui.item.value + '", "category":"' + ui.item.category + '"}'; + ui.item.value = '{"value":"' + sanitize(ui.item.value) + '", "category":"' + ui.item.category + '"}'; } }, onChange: onChange,
Remove any markup from the selected tag text The new Solr suggester highlights the matched substrings with <b>
ebi-gene-expression-group_atlas
train
js
6ada35595a5184ab00d59ae850d1fc8dbddfbac1
diff --git a/holoviews/plotting/bokeh/element.py b/holoviews/plotting/bokeh/element.py index <HASH>..<HASH> 100644 --- a/holoviews/plotting/bokeh/element.py +++ b/holoviews/plotting/bokeh/element.py @@ -153,7 +153,7 @@ class ElementPlot(BokehPlot, GenericElementPlot): return plot - def _update_plot(self, key, element, plot): + def _update_plot(self, key, plot, element=None): """ Updates plot parameters on every frame """ @@ -234,7 +234,7 @@ class ElementPlot(BokehPlot, GenericElementPlot): self.handles['source'] = source self._init_glyph(element, plot, source, ranges) if not self.overlaid: - self._update_plot(key, element, plot) + self._update_plot(key, plot, element) self._process_legend() self.drawn = True @@ -254,7 +254,7 @@ class ElementPlot(BokehPlot, GenericElementPlot): source = self.handles['source'] self._update_datasource(source, element, ranges) if not self.overlaid: - self._update_plot(key, element, plot) + self._update_plot(key, plot, element) class BokehMPLWrapper(ElementPlot):
Updated signature of _update_plot to show element is not always used
pyviz_holoviews
train
py
38b60c86c11c9cf0a18ddea78a97505c774c15c8
diff --git a/jodd-http/src/main/java/jodd/http/HttpBrowser.java b/jodd-http/src/main/java/jodd/http/HttpBrowser.java index <HASH>..<HASH> 100644 --- a/jodd-http/src/main/java/jodd/http/HttpBrowser.java +++ b/jodd-http/src/main/java/jodd/http/HttpBrowser.java @@ -176,7 +176,6 @@ public class HttpBrowser { if (newCookies != null) { for (String cookieValue : newCookies) { Cookie cookie = new Cookie(cookieValue); - cookies.put(cookie.getName(), cookie); } } @@ -193,6 +192,12 @@ public class HttpBrowser { if (!cookies.isEmpty()) { for (Cookie cookie: cookies.values()) { + + Integer maxAge = cookie.getMaxAge(); + if (maxAge != null && maxAge.intValue() == 0) { + continue; + } + if (!first) { cookieString.append("; "); } @@ -205,4 +210,4 @@ public class HttpBrowser { httpRequest.header("cookie", cookieString.toString(), true); } } -} \ No newline at end of file +}
- don't add cookies to the header that have been deleted
oblac_jodd
train
java
65031f5900782ce70d029d375345ff8212dbcda1
diff --git a/server.js b/server.js index <HASH>..<HASH> 100644 --- a/server.js +++ b/server.js @@ -107,11 +107,18 @@ if(config.tls){ } restify.CORS.ALLOW_HEADERS.push('authorization'); +restify.CORS.ALLOW_HEADERS.push('accept'); +restify.CORS.ALLOW_HEADERS.push('sid'); +restify.CORS.ALLOW_HEADERS.push('lang'); +restify.CORS.ALLOW_HEADERS.push('origin'); +restify.CORS.ALLOW_HEADERS.push('withcredentials'); +restify.CORS.ALLOW_HEADERS.push('x-requested-with'); server.use(restify.acceptParser(server.acceptable)); server.use(restify.queryParser()); server.use(restify.bodyParser()); server.use(restify.CORS()); +server.use(restify.fullResponse()); // Add throttling to HTTP API requests // server.use(restify.throttle({
added more CORS logic to support mobile app
octoblu_meshblu
train
js
94bbd7b6873429d21a0493958a63b0faabcdb619
diff --git a/test/test_master_slave_connection.py b/test/test_master_slave_connection.py index <HASH>..<HASH> 100644 --- a/test/test_master_slave_connection.py +++ b/test/test_master_slave_connection.py @@ -182,11 +182,11 @@ class TestMasterSlaveConnection(unittest.TestCase): self.assert_("pymongo_test_mike" in dbs) def test_drop_database(self): - raise SkipTest("This test often fails due to SERVER-2329") - self.assertRaises(TypeError, self.connection.drop_database, 5) self.assertRaises(TypeError, self.connection.drop_database, None) + raise SkipTest("This test often fails due to SERVER-2329") + self.connection.pymongo_test.test.save({"dummy": u"object"}, safe=True) dbs = self.connection.database_names() self.assert_("pymongo_test" in dbs)
Restore two useful asserts before skipping a test that fails due to SERVER-<I>
mongodb_mongo-python-driver
train
py
5a298d3ad2c86091c3da5094af58d300ef443043
diff --git a/lang/en_utf8/xmldb.php b/lang/en_utf8/xmldb.php index <HASH>..<HASH> 100644 --- a/lang/en_utf8/xmldb.php +++ b/lang/en_utf8/xmldb.php @@ -76,6 +76,7 @@ $string['missingvaluesinsentence'] = 'Missing values in sentence'; $string['mustselectonefield'] = 'You must select one field to see field related actions!'; $string['mustselectoneindex'] = 'You must select one index to see index related actions!'; $string['mustselectonekey'] = 'You must select one key to see key related actions!'; +$string['mysqlextracheckbigints'] = 'Under MySQL it also looks for incorrectly signed bigints, generating the required SQL to be executed in order to fix all them.'; $string['new_statement'] = 'New Statement'; $string['new_table_from_mysql'] = 'New Table From MySQL'; $string['newfield'] = 'New Field';
Added one new string to explain the signed ints hunting under MySQL. MDL-<I>
moodle_moodle
train
php
89ef795a8b0315deaa97377205bac3c4a655fb52
diff --git a/ufork/ufork.py b/ufork/ufork.py index <HASH>..<HASH> 100644 --- a/ufork/ufork.py +++ b/ufork/ufork.py @@ -166,7 +166,7 @@ class Arbiter(object): log.info('shutting down arbiter '+repr(self)+\ repr(threading.current_thread())+"N:{0} t:{1}".format(os.getpid(),time.time()%1)) if self.parent_pre_stop: - self.parent_pre_stop() + self.parent_pre_stop() #hope this doesn't error #give workers the opportunity to shut down cleanly for worker in workers: worker.parent_notify_stop() @@ -259,14 +259,11 @@ else: sock.listen(128) #TODO: what value? server = gevent.pywsgi.WSGIServer(sock, wsgi) server.stop_timeout = stop_timeout - arbiter = Arbiter(post_fork=server.start, child_pre_exit=server.stop, sleep=gevent.sleep) - try: - arbiter.run() - finally: #TODO: clean shutdown should be 1- stop listening, 2- close socket when accept queue is clear - try: - sock.close() - except socket.error: - pass #TODO: log it? + def close_socket(): + sock.close() + arbiter = Arbiter(post_fork=server.start, child_pre_exit=server.stop, + parent_pre_stop=close_socket, sleep=gevent.sleep) + arbiter.run() def serve_wsgiref_thread(wsgi, host, port):
migrating gevent function to use parent_pre_exit to shutdown socket
kurtbrose_ufork
train
py
f5d3b215660c740e9bdda6071bd3d5dc980cc304
diff --git a/searx/utils.py b/searx/utils.py index <HASH>..<HASH> 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -17,17 +17,16 @@ from searx import logger logger = logger.getChild('utils') -ua_versions = ('31.0', - '32.0', - '33.0', +ua_versions = ('33.0', '34.0', - '35.0') + '35.0', + '36.0', + '37.0') ua_os = ('Windows NT 6.3; WOW64', 'X11; Linux x86_64', 'X11; Linux x86') - -ua = "Mozilla/5.0 ({os}) Gecko/20100101 Firefox/{version}" +ua = "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}" blocked_tags = ('script', 'style')
[fix] user agent : the "rv:{version}" was missing (can be a issue with some engine, like flickr)
asciimoo_searx
train
py
6ee028e60432cd2cd010786bd738b8e8eabb842c
diff --git a/vault/generate_root.go b/vault/generate_root.go index <HASH>..<HASH> 100644 --- a/vault/generate_root.go +++ b/vault/generate_root.go @@ -191,7 +191,7 @@ func (c *Core) GenerateRootUpdate(key []byte, nonce string) (*GenerateRootResult // Check if we already have this piece for _, existing := range c.generateRootProgress { if bytes.Equal(existing, key) { - return nil, nil + return nil, fmt.Errorf("given key has already been provided during this generation operation") } }
Return bad request error on providing same key for root generation (#<I>) Fixes #<I>
hashicorp_vault
train
go
cda3abccb54284770cb599a10f1d485a4904cbd7
diff --git a/config/dashboard-plugins/MelisCoreDashboardRecentUserActivityPlugin.config.php b/config/dashboard-plugins/MelisCoreDashboardRecentUserActivityPlugin.config.php index <HASH>..<HASH> 100644 --- a/config/dashboard-plugins/MelisCoreDashboardRecentUserActivityPlugin.config.php +++ b/config/dashboard-plugins/MelisCoreDashboardRecentUserActivityPlugin.config.php @@ -29,7 +29,7 @@ 'module' => 'MelisCore', 'controller' => 'Dashboard', 'action' => 'recentActivityUsers', - 'jscallback' => 'console.log("test");', + 'jscallback' => '', 'jsdatas' => array() ), ),
Dashboard plugin user recent active test function on jscallback removed
melisplatform_melis-core
train
php