diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py b/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py index <HASH>..<HASH> 100644 --- a/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py +++ b/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py @@ -61,7 +61,7 @@ class Policy(base.BasePolicy): # Create a queue for keeping track of shared state. if queue is None: queue = Queue() - self._request_queue = Queue() + self._request_queue = queue # Call the superclass constructor. super(Policy, self).__init__(
Use queue if provided in kwargs (#<I>) Fix for a new Queue being instantiated regardless of whether a queue is passed in or not.
diff --git a/src/main/java/org/telegram/mtproto/MTProto.java b/src/main/java/org/telegram/mtproto/MTProto.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/telegram/mtproto/MTProto.java +++ b/src/main/java/org/telegram/mtproto/MTProto.java @@ -542,18 +542,20 @@ public class MTProto { return null; } -// if (TimeOverlord.getInstance().getTimeAccuracy() < 10) { -// long time = (messageId >> 32); -// long serverTime = TimeOverlord.getInstance().getServerTime(); -// -// if (serverTime + 30 < time) { -// return null; -// } -// -// if (time < serverTime - 300) { -// return null; -// } -// } + if (TimeOverlord.getInstance().getTimeAccuracy() < 10) { + long time = (messageId >> 32); + long serverTime = TimeOverlord.getInstance().getServerTime(); + + if (serverTime + 30 < time) { + Logger.w(TAG, "Ignored message: " + time + " with server time: " + serverTime); + return null; + } + + if (time < serverTime - 300) { + Logger.w(TAG, "Ignored message: " + time + " with server time: " + serverTime); + return null; + } + } return new MTMessage(messageId, mes_seq, message); }
Restored time checking with logging
diff --git a/umis/umis.py b/umis/umis.py index <HASH>..<HASH> 100644 --- a/umis/umis.py +++ b/umis/umis.py @@ -391,7 +391,7 @@ def tagcount(sam, out, genemap, output_evidence_table, positional, minevidence, buf = StringIO() for key in evidence: line = '{},{}\n'.format(key, evidence[key]) - buf.write(unicode(line), "utf-8") + buf.write(unicode(line, "utf-8")) buf.seek(0) evidence_table = pd.read_csv(buf)
Fix typo in handling unicode This appears to be a misplaced end parenthesis from: <I>d6ad<I>eb<I>a<I>a<I>a<I>d<I>e<I>a2
diff --git a/airflow/api_connexion/endpoints/dag_run_endpoint.py b/airflow/api_connexion/endpoints/dag_run_endpoint.py index <HASH>..<HASH> 100644 --- a/airflow/api_connexion/endpoints/dag_run_endpoint.py +++ b/airflow/api_connexion/endpoints/dag_run_endpoint.py @@ -102,7 +102,7 @@ def get_dag_run(*, dag_id: str, dag_run_id: str, session: Session = NEW_SESSION) def get_upstream_dataset_events( *, dag_id: str, dag_run_id: str, session: Session = NEW_SESSION ) -> APIResponse: - """Get a DAG Run.""" + """If dag run is dataset-triggered, return the dataset events that triggered it.""" dag_run: Optional[DagRun] = ( session.query(DagRun) .filter( @@ -123,7 +123,6 @@ def get_upstream_dataset_events( def _get_upstream_dataset_events(*, dag_run: DagRun, session: Session) -> List["DagRun"]: - """If dag run is dataset-triggered, return the dataset events that triggered it.""" if not dag_run.run_type == DagRunType.DATASET_TRIGGERED: return []
fix comments (#<I>)
diff --git a/src/CmsAdmin/Resource/web/js/form.js b/src/CmsAdmin/Resource/web/js/form.js index <HASH>..<HASH> 100644 --- a/src/CmsAdmin/Resource/web/js/form.js +++ b/src/CmsAdmin/Resource/web/js/form.js @@ -63,10 +63,11 @@ $(document).ready(function () { }); //on focus na submit - $('input[type="submit"]').on('click', function () { + $('input[type="submit"]').on('focus', function () { + var submitBtn = $(this); setTimeout(function () { - $(this).closest('form').trigger('submit'); - }, 500); + submitBtn.closest('form').trigger('submit'); + }, 3000); }); //pola do przeciwdziałania robotom bez JS
Submit.onfocus -> Form.submit
diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index <HASH>..<HASH> 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -149,12 +149,7 @@ class Widget(LoggingConfigurable): self.send_state(key=name) def _handle_displayed(self, **kwargs): - """Called when a view has been displayed for this widget instance - - Parameters - ---------- - [view_name]: unicode (optional kwarg) - Name of the view that was displayed.""" + """Called when a view has been displayed for this widget instance""" for handler in self._display_callbacks: if callable(handler): argspec = inspect.getargspec(handler) @@ -169,8 +164,6 @@ class Widget(LoggingConfigurable): handler() elif nargs == 1: handler(self) - elif nargs == 2: - handler(self, kwargs.get('view_name', None)) else: handler(self, **kwargs) @@ -256,7 +249,6 @@ class Widget(LoggingConfigurable): Can have a signature of: - callback() - callback(sender) - - callback(sender, view_name) - callback(sender, **kwargs) kwargs from display call passed through without modification. remove: bool
remove 3rd callback type from on_displayed
diff --git a/builtin/providers/digitalocean/resource_digitalocean_ssh_key.go b/builtin/providers/digitalocean/resource_digitalocean_ssh_key.go index <HASH>..<HASH> 100644 --- a/builtin/providers/digitalocean/resource_digitalocean_ssh_key.go +++ b/builtin/providers/digitalocean/resource_digitalocean_ssh_key.go @@ -74,7 +74,7 @@ func resourceDigitalOceanSSHKeyRead(d *schema.ResourceData, meta interface{}) er if err != nil { // If the key is somehow already destroyed, mark as // successfully gone - if resp.StatusCode == 404 { + if resp != nil && resp.StatusCode == 404 { d.SetId("") return nil }
provider/digitalocean: Check for nil response This applies the same fix to `digitalocean_ssh_key` as #<I> applies to droplets. Fixes #<I>. The report there gives weight to my theory that this occurs when there are transport issues.
diff --git a/lib/facemock/version.rb b/lib/facemock/version.rb index <HASH>..<HASH> 100644 --- a/lib/facemock/version.rb +++ b/lib/facemock/version.rb @@ -1,3 +1,3 @@ module Facemock - VERSION = "0.0.3" + VERSION = "0.0.4" end diff --git a/spec/facemock_spec.rb b/spec/facemock_spec.rb index <HASH>..<HASH> 100644 --- a/spec/facemock_spec.rb +++ b/spec/facemock_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Facemock do - let(:version) { "0.0.3" } + let(:version) { "0.0.4" } let(:db_name) { ".test" } describe 'VERSION' do
:arrow_up: Upgrade version to <I>
diff --git a/src/Component.php b/src/Component.php index <HASH>..<HASH> 100644 --- a/src/Component.php +++ b/src/Component.php @@ -5,6 +5,7 @@ namespace mito\sentry; use Closure; use mito\sentry\assets\RavenAsset; use Yii; +use yii\base\Exception; use yii\base\InvalidConfigException; use yii\helpers\ArrayHelper; use yii\helpers\Json; @@ -117,10 +118,21 @@ class Component extends \yii\base\Component */ private function registerAssets() { - if ($this->jsNotifier && Yii::$app instanceof \yii\web\Application) { + if ($this->jsNotifier === false){ + return; + } + + if(!Yii::$app instanceof \yii\web\Application) { + return; + } + + try { $view = Yii::$app->getView(); RavenAsset::register($view); $view->registerJs('Raven.config(' . Json::encode($this->publicDsn) . ', ' . Json::encode($this->jsOptions) . ').install();', View::POS_HEAD); + } catch (Exception $e) { + // initialize Sentry component even if unable to register the assets + // (eg. the assets folder is not writable by the webserver user) } }
register component even if unable to register assets
diff --git a/lib/platformexploit.rb b/lib/platformexploit.rb index <HASH>..<HASH> 100644 --- a/lib/platformexploit.rb +++ b/lib/platformexploit.rb @@ -31,8 +31,12 @@ module Ronin super(advisory) @targets = [] - params << Param.new('target','default target index',0) - params << Param.new('custom_target','custom target to use',nil) + params.add_param('target','default target index',0) + params.add_param('custom_target','custom target to use') + end + + def add_target(target) + @targets << target end def get_target
* Use the add_param method for adding parameters. * Added the 'add_target' method to the Target class.
diff --git a/thefuck/system/win32.py b/thefuck/system/win32.py index <HASH>..<HASH> 100644 --- a/thefuck/system/win32.py +++ b/thefuck/system/win32.py @@ -1,5 +1,4 @@ import os -import sys import msvcrt import win_unicode_console from .. import const @@ -12,20 +11,18 @@ def init_output(): def get_key(): - ch = msvcrt.getch() - if ch in (b'\x00', b'\xe0'): # arrow or function key prefix? - ch = msvcrt.getch() # second call returns the actual key code + ch = msvcrt.getwch() + if ch in ('\x00', '\xe0'): # arrow or function key prefix? + ch = msvcrt.getwch() # second call returns the actual key code if ch in const.KEY_MAPPING: return const.KEY_MAPPING[ch] - if ch == b'H': + if ch == 'H': return const.KEY_UP - if ch == b'P': + if ch == 'P': return const.KEY_DOWN - encoding = (sys.stdout.encoding - or os.environ.get('PYTHONIOENCODING', 'utf-8')) - return ch.decode(encoding) + return ch def open_command(arg):
Fix Win<I> get_key (#<I>) PR #<I> moved the arrow and cancel key codes to `const.py`. However, the move also changed the codes from byte arrays to strings, which broke the use of `msvcrt.getch()` for Windows. The fix is to use `msvcrt.getwch()` so the key is a Unicode character, matching the Unix implementation.
diff --git a/tests/helper.py b/tests/helper.py index <HASH>..<HASH> 100644 --- a/tests/helper.py +++ b/tests/helper.py @@ -184,7 +184,7 @@ if __name__ == '__main__': print('Starting ...') import signalfd signalfd.sigprocmask(signalfd.SIG_BLOCK, [signal.SIGCHLD]) - fd = signalfd.signalfd(0, [signal.SIGCHLD], signalfd.SFD_NONBLOCK|signalfd.SFD_CLOEXEC) + fd = signalfd.signalfd(-1, [signal.SIGCHLD], signalfd.SFD_NONBLOCK|signalfd.SFD_CLOEXEC) for i in range(1000): print('Forking %s:' % i) pid = os.fork()
Dooh! Was setting up signalfd the wrong way.
diff --git a/server.go b/server.go index <HASH>..<HASH> 100644 --- a/server.go +++ b/server.go @@ -409,7 +409,7 @@ func (srv *Server) ImagePull(name, tag, endpoint string, out io.Writer, sf *util remote := name parts := strings.Split(name, "/") if len(parts) > 2 { - remote = fmt.Sprintf("src/%s", strings.Join(parts, "%2F")) + remote = fmt.Sprintf("src/%s", url.QueryEscape(strings.Join(parts, "/"))) } if err := srv.pullRepository(r, out, name, remote, tag, sf); err != nil { return err @@ -496,7 +496,7 @@ func (srv *Server) pushRepository(r *registry.Registry, out io.Writer, name stri srvName := name parts := strings.Split(name, "/") if len(parts) > 2 { - srvName = fmt.Sprintf("src/%s", strings.Join(parts, "%2F")) + srvName = fmt.Sprintf("src/%s", url.QueryEscape(strings.Join(parts, "/"))) } repoData, err := r.PushImageJSONIndex(srvName, imgList, false)
Escape remote names on repo push/pull
diff --git a/generators/cleanup.js b/generators/cleanup.js index <HASH>..<HASH> 100644 --- a/generators/cleanup.js +++ b/generators/cleanup.js @@ -221,11 +221,13 @@ function cleanupOldServerFiles(generator, javaDir, testDir, mainResourceDir, tes generator.removeFile(`${testDir}web/rest/ClientForwardControllerIT.java`); } if (generator.isJhipsterVersionLessThan('6.6.1')) { - generator.removeFile(`${javaDir}security/oauth2/JwtAuthorityExtractor.java`); generator.removeFile(`${javaDir}web/rest/errors/EmailNotFoundException.java`); generator.removeFile(`${javaDir}config/DefaultProfileUtil.java`); generator.removeFolder(`${javaDir}service/util`); } + if (generator.isJhipsterVersionLessThan('6.8.0')) { + generator.removeFile(`${javaDir}security/oauth2/JwtAuthorityExtractor.java`); + } } /**
Move clean file 'JwtAuthorityExtractor' for older version than <I>
diff --git a/cmd/jujud/machine.go b/cmd/jujud/machine.go index <HASH>..<HASH> 100644 --- a/cmd/jujud/machine.go +++ b/cmd/jujud/machine.go @@ -172,9 +172,14 @@ func (a *MachineAgent) APIWorker(ensureStateWorker func()) (worker.Worker, error runner.StartWorker("logger", func() (worker.Worker, error) { return workerlogger.NewLogger(st.Logger(), agentConfig), nil }) - runner.StartWorker("authenticationworker", func() (worker.Worker, error) { - return authenticationworker.NewWorker(st.KeyUpdater(), agentConfig), nil - }) + + // If not a local provider, start the worker to manage SSH keys. + providerType := agentConfig.Value(agent.ProviderType) + if providerType != provider.Local && providerType != provider.Null { + runner.StartWorker("authenticationworker", func() (worker.Worker, error) { + return authenticationworker.NewWorker(st.KeyUpdater(), agentConfig), nil + }) + } // Perform the operations needed to set up hosting for containers. if err := a.setupContainerSupport(runner, st, entity); err != nil {
Do not start auth worker for local provider
diff --git a/src/main/java/org/sikuli/slides/processing/Relationship.java b/src/main/java/org/sikuli/slides/processing/Relationship.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/sikuli/slides/processing/Relationship.java +++ b/src/main/java/org/sikuli/slides/processing/Relationship.java @@ -24,7 +24,7 @@ import org.sikuli.slides.utils.Constants; public class Relationship extends DefaultHandler { private String relationshipXMLFile; - private String imageFileName; + private String mediaFileName; private String relationshipID; public Relationship(String fileName){ @@ -33,7 +33,7 @@ public class Relationship extends DefaultHandler { public String getImageFileName(String relationshipID){ this.relationshipID=relationshipID; parseDocument(); - return imageFileName; + return mediaFileName; } private void parseDocument(){ @@ -61,7 +61,7 @@ public class Relationship extends DefaultHandler { if (qName.equalsIgnoreCase("Relationship")) { // get the image location if(relationshipID.equals(attributes.getValue("Id"))){ - imageFileName=new File(attributes.getValue("Target")).getName(); + mediaFileName=new File(attributes.getValue("Target")).getName(); } } }
refactor to get any media file
diff --git a/openhtf/core/phase_executor.py b/openhtf/core/phase_executor.py index <HASH>..<HASH> 100644 --- a/openhtf/core/phase_executor.py +++ b/openhtf/core/phase_executor.py @@ -131,6 +131,7 @@ class PhaseExecutorThread(threads.KillableThread): once it is known (_phase_execution_outcome is None until then), and it will be a PhaseExecutionOutcome instance. """ + daemon = True def __init__(self, phase_desc, test_state): super(PhaseExecutorThread, self).__init__( diff --git a/openhtf/core/test_executor.py b/openhtf/core/test_executor.py index <HASH>..<HASH> 100644 --- a/openhtf/core/test_executor.py +++ b/openhtf/core/test_executor.py @@ -47,6 +47,7 @@ class TestStopError(Exception): # pylint: disable=too-many-instance-attributes class TestExecutor(threads.KillableThread): """Encompasses the execution of a single test.""" + daemon = True def __init__(self, test_descriptor, execution_uid, test_start, teardown_function=None):
Make PhaseExecutorThread and TestExecutor daemon threads (#<I>)
diff --git a/lib/autokey/scripting/engine.py b/lib/autokey/scripting/engine.py index <HASH>..<HASH> 100644 --- a/lib/autokey/scripting/engine.py +++ b/lib/autokey/scripting/engine.py @@ -99,7 +99,8 @@ class Engine: temporary=False): """ Create a new text phrase inside the given folder. Use C{engine.get_folder(folder_name)} to retrieve the folder - you wish to create the Phrase in. + you wish to create the Phrase in. If the folder is a temporary + one, the phrase will be created as temporary. The first three arguments (folder, name and contents) are required. All further arguments are optional and considered to be keyword-argument only. Do not rely on the order of the optional arguments. @@ -172,6 +173,8 @@ class Engine: It can be used for _really_ advanced use cases, where further customizations are desired. Use at your own risk. No guarantees are made about the object’s structure. Read the AutoKey source code for details. """ + if folder.temporary: + temporary = True # TODO: The validation should be done by some controller functions in the model base classes. if abbreviations: if isinstance(abbreviations, str):
Phrases created in temporary folders are made temporary
diff --git a/components/SeoPatternHelper.php b/components/SeoPatternHelper.php index <HASH>..<HASH> 100644 --- a/components/SeoPatternHelper.php +++ b/components/SeoPatternHelper.php @@ -46,6 +46,16 @@ class SeoPatternHelper { const SEPARATOR_PATTERN_KEY = 'sep'; /** + * Global view separator parameter key name. + */ + const SEPARATOR_VIEW_PARAMETER_KEY = 'titleSeparator'; + + /** + * Default separator value. + */ + const SEPARATOR_DEFAULT = '-'; + + /** * Pattern delimeter for represents that its pattern or not static text. */ const PATTERN_DELIMETER = '%%'; @@ -271,7 +281,8 @@ class SeoPatternHelper { * @return mixed|string */ public static function retrieveSeparator() { - return '-'; + $separatorViewParamKey = self::SEPARATOR_VIEW_PARAMETER_KEY; + return (ArrayHelper::keyExists($separatorViewParamKey, Yii::$app->view->params)) ? Yii::$app->view->params[$separatorViewParamKey] : self::SEPARATOR_DEFAULT; } /* *********************** SANITIZIED FUNCTIONS ************************** */
add feature to change separator by setting view param
diff --git a/tests/unit_tests/test_utils/test_handlers.py b/tests/unit_tests/test_utils/test_handlers.py index <HASH>..<HASH> 100644 --- a/tests/unit_tests/test_utils/test_handlers.py +++ b/tests/unit_tests/test_utils/test_handlers.py @@ -90,7 +90,8 @@ class TestHandlers(SetMeUp): c = h.Repeater( self.counter, self.year, self.month, end_repeat=end_repeat, event=event - ).repeat_reverse(start, end) - self.assertEqual(len(c), 2) - self.assertEqual(c[30], [('event', event.pk)]) - self.assertEqual(c[31], [('event', event.pk)]) + ) + c.repeat_reverse(start, end) + self.assertEqual(len(c.count), 2) + self.assertEqual(c.count[30], [('event', event.pk)]) + self.assertEqual(c.count[31], [('event', event.pk)])
fixed broken test in test_handlers.
diff --git a/bin/php/checkdbfiles.php b/bin/php/checkdbfiles.php index <HASH>..<HASH> 100755 --- a/bin/php/checkdbfiles.php +++ b/bin/php/checkdbfiles.php @@ -132,9 +132,16 @@ $versions47 = array( 'unstable' => array( array( '4.6.0', '4.7.0alpha1' ), ); $versions50 = array( 'unstable' => array( array( '4.7.0', '5.0.0alpha1' ), + array( '5.0.0alpha1', '5.0.0' ), ), 'unstable_subdir' => 'unstable', - 'stable' => array( array( '4.6.0', '4.7.0' ) ), + 'stable' => array( array( '4.7.0', '5.0.0' ) ), + ); + +// Note: DB updates are kept in base sql file regardless of state as of 5.1 +$versions51 = array( 'unstable' => array( ), + 'unstable_subdir' => 'unstable', + 'stable' => array( array( '5.0.0', '5.1.0' ) ), ); @@ -146,6 +153,7 @@ $versions['4.5'] = $versions45; $versions['4.6'] = $versions46; $versions['4.7'] = $versions47; $versions['5.0'] = $versions50; +$versions['5.1'] = $versions51; $fileList = array(); $missingFileList = array();
Fix a minor mistake in <I>a<I>cd<I>c<I>ec6fc2c0c4ba
diff --git a/tangy-form-item.js b/tangy-form-item.js index <HASH>..<HASH> 100644 --- a/tangy-form-item.js +++ b/tangy-form-item.js @@ -720,7 +720,16 @@ export class TangyFormItem extends PolymerElement { this .querySelectorAll('[name]') .forEach(input => inputs.push(input.getModProps && window.useShrinker ? input.getModProps() : input.getProps())) + let score = 0 this.inputs = inputs + const tangyFormItem = this.querySelector('[name]').parentElement; + if(tangyFormItem.hasAttribute('scoring-section')){ + const scoreEl = document.createElement('tangy-input') + scoreEl.name = `${tangyFormItem.getAttribute('id')}_score` + scoreEl.value = score + this.inputs = [...inputs, scoreEl.getModProps && window.useShrinker ? scoreEl.getModProps() : scoreEl.getProps()] + } + const selections = tangyFormItem.getAttribute('scoring-fields') || [] if (window.devtools && window.devtools.open) { console.table(this.inputs.map(input => { return {name: input.name, value: input.value} })) }
feat(scoring-fields): Add Scoring Functionality Part of Tangerine-Community/tangy-form-editor#<I> Refs Tangerine-Community/Tangerine#<I>
diff --git a/lib/u2f/u2f.rb b/lib/u2f/u2f.rb index <HASH>..<HASH> 100644 --- a/lib/u2f/u2f.rb +++ b/lib/u2f/u2f.rb @@ -95,10 +95,14 @@ module U2F # Convert a binary public key to PEM format def self.public_key_pem(key) fail PublicKeyDecodeError unless key.length == 65 || key[0] == "\x04" - - der = "\x30\x59\x30\x13\x06\x07\x2a\x86\x48\xce\x3d\x02\x01".force_encoding('ASCII-8BIT') << - "\x06\x08\x2a\x86\x48\xce\x3d\x03\x01\x07\x03\x42".force_encoding('ASCII-8BIT') << - "\0".force_encoding('ASCII-8BIT') << key + # http://tools.ietf.org/html/rfc5480 + der = OpenSSL::ASN1::Sequence([ + OpenSSL::ASN1::Sequence([ + OpenSSL::ASN1::ObjectId('1.2.840.10045.2.1'), # id-ecPublicKey + OpenSSL::ASN1::ObjectId('1.2.840.10045.3.1.7') # secp256r1 + ]), + OpenSSL::ASN1::BitString(key) + ]).to_der pem = "-----BEGIN PUBLIC KEY-----\r\n" + Base64.strict_encode64(der).scan(/.{1,64}/).join("\r\n") +
Get rid of hard coded bytes for generating PEM from private key
diff --git a/lib/veewee/provider/core/helper/web.rb b/lib/veewee/provider/core/helper/web.rb index <HASH>..<HASH> 100644 --- a/lib/veewee/provider/core/helper/web.rb +++ b/lib/veewee/provider/core/helper/web.rb @@ -26,8 +26,8 @@ module Veewee content=displayfile.read() response.body=content #If we shut too fast it might not get the complete file - sleep 2 - @server.shutdown + # sleep 2 + # @server.shutdown end end @@ -58,8 +58,8 @@ module Veewee :Logger => webrick_logger, :AccessLog => webrick_logger ) - env.logger.debug("mounting file /#{filename}") - s.mount("/#{filename}", Veewee::Provider::Core::Helper::Servlet::FileServlet,File.join(web_dir,filename),env) + env.logger.debug("mounting file #{filename}") + s.mount("#{filename}", Veewee::Provider::Core::Helper::Servlet::FileServlet,File.join(web_dir,filename),env) trap("INT"){ s.shutdown env.ui.info "Stopping webserver"
Leave the web thread running until we shut down, and mount it a bit more pragmatically (full paths only)
diff --git a/lxd/cluster/gateway.go b/lxd/cluster/gateway.go index <HASH>..<HASH> 100644 --- a/lxd/cluster/gateway.go +++ b/lxd/cluster/gateway.go @@ -195,15 +195,15 @@ func (g *Gateway) HandlerFuncs(heartbeatHandler HeartbeatHandler, trustedCerts f if r.Method == "PUT" { if g.shutdownCtx.Err() != nil { logger.Warn("Rejecting heartbeat request as shutting down") - http.Error(w, "503 shutting down", http.StatusServiceUnavailable) + http.Error(w, "503 Shutting down", http.StatusServiceUnavailable) return } var heartbeatData APIHeartbeat err := json.NewDecoder(r.Body).Decode(&heartbeatData) if err != nil { - logger.Error("Error decoding heartbeat body", log.Ctx{"err": err}) - http.Error(w, "400 invalid heartbeat payload", http.StatusBadRequest) + logger.Error("Failed decoding heartbeat", log.Ctx{"err": err}) + http.Error(w, "400 Failed decoding heartbeat", http.StatusBadRequest) return }
lxd/cluster/gateway: Error message and log improvements
diff --git a/src/options/block-indent.js b/src/options/block-indent.js index <HASH>..<HASH> 100644 --- a/src/options/block-indent.js +++ b/src/options/block-indent.js @@ -45,7 +45,7 @@ let option = { var spaces = whitespaceNode.content.replace(/\n[ \t]+/gm, '\n'); if (spaces === '') { - ast.remove(i); + ast.removeChild(i); } else { whitespaceNode.content = spaces; }
Fix ast.remove is not a function error This PR fixes an error that occurs when `"eof-newline": false,` as reported and solved here: <URL>
diff --git a/lib/browser.js b/lib/browser.js index <HASH>..<HASH> 100644 --- a/lib/browser.js +++ b/lib/browser.js @@ -25,7 +25,13 @@ function W3CWebSocket(uri, protocols) { */ return native_instance; } - +if (NativeWebSocket) { + ["CONNECTING", "OPEN", "CLOSING", "CLOSED"].forEach(function(prop) { + Object.defineProperty(W3CWebSocket, prop, { + get: function() { return NativeWebSocket[prop]; } + }); + }); +} /** * Module exports.
add readyState constants to browser `w3cwebsocket` Now the exposed `w3cwebsocket` export mirrors the native WebSocket more closely. I hit this bug when moving previously native code to use this wrapper, the server-sde code was fine, but the client-side code failed because `WebSocket.OPEN` was `undefined`.
diff --git a/src/BootstrapChannelClient.js b/src/BootstrapChannelClient.js index <HASH>..<HASH> 100644 --- a/src/BootstrapChannelClient.js +++ b/src/BootstrapChannelClient.js @@ -61,7 +61,7 @@ class BootstrapChannelClient { } send(id,type,data){ - u.log(this.chord, "BSTRAP: SENDING "+type); + u.log(this.chord, "BSTRAP: SENDING "); switch(type){ case msg_types.MSG_SDP_OFFER: diff --git a/src/BootstrapChannelServer.js b/src/BootstrapChannelServer.js index <HASH>..<HASH> 100644 --- a/src/BootstrapChannelServer.js +++ b/src/BootstrapChannelServer.js @@ -72,7 +72,7 @@ class BootstrapChannelServer{ } send(id,type,data){ - u.log(this.chord, "Send instruction given to server bootstrap: "+type); + u.log(this.chord, "Send instruction given to server bootstrap"); let obj = { type: null,
I cannot print a Symbol. Aww phooey!
diff --git a/statsd/statsd_test.go b/statsd/statsd_test.go index <HASH>..<HASH> 100644 --- a/statsd/statsd_test.go +++ b/statsd/statsd_test.go @@ -1,26 +1,32 @@ package statsd import ( - "io" "testing" "time" "github.com/stretchr/testify/assert" ) -type statsdWriterWrapper struct { - io.WriteCloser -} +type statsdWriterWrapper struct{} func (statsdWriterWrapper) SetWriteTimeout(time.Duration) error { return nil } +func (statsdWriterWrapper) Close() error { + return nil +} + +func (statsdWriterWrapper) Write(p []byte) (n int, err error) { + return 0, nil +} + func TestCustomWriterBufferConfiguration(t *testing.T) { client, err := NewWithWriter(statsdWriterWrapper{}) if err != nil { t.Fatal(err) } + defer client.Close() assert.Equal(t, OptimalUDPPayloadSize, client.bufferPool.bufferMaxSize) assert.Equal(t, DefaultUDPBufferPoolSize, cap(client.bufferPool.pool))
Fix race condition in the test The race only happen when also runnin the benchmark which leave enough time to the un-closed client to flush
diff --git a/src/Command/Project/ProjectCreateCommand.php b/src/Command/Project/ProjectCreateCommand.php index <HASH>..<HASH> 100644 --- a/src/Command/Project/ProjectCreateCommand.php +++ b/src/Command/Project/ProjectCreateCommand.php @@ -42,8 +42,23 @@ class ProjectCreateCommand extends CommandBase $this->form->configureInputDefinition($this->getDefinition()); $this->addOption('check-timeout', null, InputOption::VALUE_REQUIRED, 'The API timeout while checking the project status', 30) - ->addOption('timeout', null, InputOption::VALUE_REQUIRED, 'The total timeout for all API checks', 900); + ->addOption('timeout', null, InputOption::VALUE_REQUIRED, 'The total timeout for all API checks (0 to disable the timeout)', 900); + $this->setHelp(<<<EOF +Use this command to create a new project. + +An interactive form will be presented with the available options. But if the +command is run non-interactively (with --yes), the form will not be displayed, +and the --region option will be required. + +A project subscription will be requested, and then checked periodically (every 3 +seconds) until the project has been activated, or until the process times out +(after 15 minutes by default). + +If known, the project ID will be output to STDOUT. All other output will be sent +to STDERR. +EOF + ); } /**
[project:create] add detailed help
diff --git a/src/Model/Subscription.php b/src/Model/Subscription.php index <HASH>..<HASH> 100644 --- a/src/Model/Subscription.php +++ b/src/Model/Subscription.php @@ -30,7 +30,7 @@ class Subscription extends Resource const STATUS_ACTIVE = 'active'; const STATUS_REQUESTED = 'requested'; const STATUS_PROVISIONING = 'provisioning'; - const STATUS_FAILED = 'provisioning Failure'; + const STATUS_FAILED = 'provisioning failure'; const STATUS_SUSPENDED = 'suspended'; const STATUS_DELETED = 'deleted'; @@ -115,7 +115,8 @@ class Subscription extends Resource * * This could be one of Subscription::STATUS_ACTIVE, * Subscription::STATUS_REQUESTED, Subscription::STATUS_PROVISIONING, - * Subscription::STATUS_SUSPENDED, or Subscription::STATUS_DELETED. + * Subscription::STATUS_FAILED, Subscription::STATUS_SUSPENDED, + * or Subscription::STATUS_DELETED. * * @return string */
Fix wrong case in Subscription::STATUS_FAILED constant
diff --git a/src/SteamAuth.php b/src/SteamAuth.php index <HASH>..<HASH> 100644 --- a/src/SteamAuth.php +++ b/src/SteamAuth.php @@ -217,7 +217,7 @@ class SteamAuth implements SteamAuthInterface */ public function parseSteamID() { - preg_match("#^https://steamcommunity.com/openid/id/([0-9]{17,25})#", $this->request->get('openid_claimed_id'), $matches); + preg_match("#^https?://steamcommunity.com/openid/id/([0-9]{17,25})#", $this->request->get('openid_claimed_id'), $matches); $this->steamId = is_numeric($matches[1]) ? $matches[1] : 0; }
Make the `s` in https optional in case Valve changes their mind
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInXLSTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInXLSTest.java index <HASH>..<HASH> 100644 --- a/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInXLSTest.java +++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInXLSTest.java @@ -34,7 +34,7 @@ public class UnicodeInXLSTest { if (kbuilder.hasErrors()) { System.out.println(kbuilder.getErrors().toString()); System.out.println(DecisionTableFactory.loadFromInputStream(getClass().getResourceAsStream("unicode.xls"), dtconf)); - fail("Cannot build XLS decision table containing utf-8 characters."); + fail("Cannot build XLS decision table containing utf-8 characters\n" + kbuilder.getErrors().toString() ); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
Added additional error information to failing test
diff --git a/src/Illuminate/Encryption/Encrypter.php b/src/Illuminate/Encryption/Encrypter.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Encryption/Encrypter.php +++ b/src/Illuminate/Encryption/Encrypter.php @@ -114,6 +114,8 @@ class Encrypter implements EncrypterContract * * @param string $value * @return string + * + * @throws \Illuminate\Contracts\Encryption\EncryptException */ public function encryptString($value) { @@ -154,6 +156,8 @@ class Encrypter implements EncrypterContract * * @param string $payload * @return string + * + * @throws \Illuminate\Contracts\Encryption\DecryptException */ public function decryptString($payload) {
Add encrypter throws docblock (#<I>)
diff --git a/lib/compiless.js b/lib/compiless.js index <HASH>..<HASH> 100644 --- a/lib/compiless.js +++ b/lib/compiless.js @@ -3,8 +3,7 @@ var Path = require('path'), fs = require('fs'), async = require('async'), _ = require('underscore'), - passError = require('passerror'), - less = require('less'); + passError = require('passerror'); require('express-hijackresponse'); require('bufferjs'); @@ -27,6 +26,7 @@ module.exports = function compiless(options) { if (!options || !options.root) { throw new Error('options.root is mandatory'); } + var less = options.less || require('less'); return function (req, res, next) { if ((req.headers.accept && req.accepts('text/css')) || /\.less(?:\?.*)?$/.test(req.url)) { // Prevent If-None-Match revalidation with the downstream middleware with ETags that aren't suffixed with "-compiless":
Made the 'less' module a config option so that the caller can choose to up- or downgrade the bundled version.
diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index <HASH>..<HASH> 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -57,7 +57,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $htmleditors[$editor] = $editor; } $temp->add(new admin_setting_configselect('defaulthtmleditor', get_string('defaulthtmleditor', 'admin'), null, 'tinymce', $htmleditors)); - $temp->add(new admin_setting_configcheckbox('usehtmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1)); + $temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1)); $ADMIN->add('htmleditor', $temp); $temp = new admin_settingpage('htmlarea', get_string('htmlarea', 'admin'));
MDL-<I> - Correction to previous change: going back to previous variable name, to prevent bugs
diff --git a/src/ContaoCommunityAlliance/UrlBuilder/UrlBuilder.php b/src/ContaoCommunityAlliance/UrlBuilder/UrlBuilder.php index <HASH>..<HASH> 100644 --- a/src/ContaoCommunityAlliance/UrlBuilder/UrlBuilder.php +++ b/src/ContaoCommunityAlliance/UrlBuilder/UrlBuilder.php @@ -86,7 +86,10 @@ class UrlBuilder $parsed = parse_url($url); // If only one field present it is the path which must be mapped to the query string. - if ((count($parsed) === 1) && isset($parsed['path'])) { + if ((count($parsed) === 1) + && isset($parsed['path']) + && (0 === strpos($parsed['path'], '?') || false !== strpos($parsed['path'], '&')) + ) { $parsed = array( 'query' => $parsed['path'] );
Only treat path as query if it really is one
diff --git a/nfc/tag/tt1_broadcom.py b/nfc/tag/tt1_broadcom.py index <HASH>..<HASH> 100644 --- a/nfc/tag/tt1_broadcom.py +++ b/nfc/tag/tt1_broadcom.py @@ -49,7 +49,7 @@ class Topaz(tt1.Type1Tag): unless the wipe argument is set. """ - return super(Type1Tag, self).format(version, wipe) + return super(tt1.Type1Tag, self).format(version, wipe) def _format(self, version, wipe): tag_memory = tt1.Type1TagMemoryReader(self) @@ -76,7 +76,7 @@ class Topaz(tt1.Type1Tag): have any effect. """ - return super(Type1Tag, self).protect( + return super(tt1.Type1Tag, self).protect( password, read_protect, protect_from) def _protect(self, password, read_protect, protect_from): @@ -109,7 +109,7 @@ class Topaz512(tt1.Type1Tag): unless the wipe argument is set. """ - return super(Type1Tag, self).format(version, wipe) + return super(tt1.Type1Tag, self).format(version, wipe) def _format(self, version, wipe): tag_memory = tt1.Type1TagMemoryReader(self) @@ -138,7 +138,7 @@ class Topaz512(tt1.Type1Tag): have any effect. """ - return super(Type1Tag, self).protect( + return super(tt1.Type1Tag, self).protect( password, read_protect, protect_from) def _protect(self, password, read_protect, protect_from):
Type1Tag is imported under tt1 in tt1_broadcom
diff --git a/examples/chat/model.js b/examples/chat/model.js index <HASH>..<HASH> 100755 --- a/examples/chat/model.js +++ b/examples/chat/model.js @@ -61,8 +61,15 @@ function setup (channelHex, nick, onReady) { render(doc) } - // FIXME: Commit something to the document? + // Hack alert!!!!! hm.on('peer:joined', () => { + setTimeout(() => { + doc = hm.update( + Automerge.change(doc, changeDoc => { + changeDoc.messages[Date.now()] = {} + }) + ) + }, 1000) }) // This callback is supplied to the onReady callback - it is used diff --git a/examples/chat/ui.js b/examples/chat/ui.js index <HASH>..<HASH> 100755 --- a/examples/chat/ui.js +++ b/examples/chat/ui.js @@ -37,7 +37,9 @@ function render (renderDoc) { if (joined) { displayMessages.push(`${nick} has joined.`) } else { - displayMessages.push(`${nick}: ${message}`) + if (message) { + displayMessages.push(`${nick}: ${message}`) + } } }) // Delete old messages
Implement workaround for getting new peers into the document Waiting on a timeout is not very nice, but it mostly works.
diff --git a/lib/writeexcel/workbook.rb b/lib/writeexcel/workbook.rb index <HASH>..<HASH> 100644 --- a/lib/writeexcel/workbook.rb +++ b/lib/writeexcel/workbook.rb @@ -78,7 +78,6 @@ class Workbook < BIFFWriter @biffsize = 0 @sheet_count = 0 @chart_count = 0 - @url_format = '' @codepage = 0x04E4 @country = 1 @worksheets = []
* delete meaningless @url_format value set.
diff --git a/question/type/multianswer/questiontype.php b/question/type/multianswer/questiontype.php index <HASH>..<HASH> 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -141,14 +141,14 @@ class qtype_multianswer extends question_type { if ($previousid != 0 && $previousid != $wrapped->id) { // for some reasons a new question has been created // so delete the old one - delete_question($previousid); + question_delete_question($previousid); } } // Delete redundant wrapped questions if (is_array($oldwrappedquestions) && count($oldwrappedquestions)) { foreach ($oldwrappedquestions as $oldwrappedquestion) { - delete_question($oldwrappedquestion->id); + question_delete_question($oldwrappedquestion->id); } }
MDL-<I> qtype multianswer refers to old name for the question_delete_questions function.
diff --git a/scriptcwl/step.py b/scriptcwl/step.py index <HASH>..<HASH> 100644 --- a/scriptcwl/step.py +++ b/scriptcwl/step.py @@ -13,14 +13,19 @@ from .reference import Reference # Helper function to make the import of cwltool.load_tool quiet @contextmanager def quiet(): + # save stdout/stderr + # Jupyter doesn't support setting it back to + # sys.__stdout__ and sys.__stderr__ + _sys_stdout = sys.stdout + _sys_stderr = sys.stderr # Divert stdout and stderr to devnull sys.stdout = sys.stderr = open(os.devnull, "w") try: yield finally: # Revert back to standard stdout/stderr - sys.stdout = sys.__stdout__ - sys.stderr = sys.__stderr__ + sys.stdout = _sys_stdout + sys.stderr = _sys_stderr # import cwltool.load_tool functions
don't set sys.stdout and sys.stderr back to sys.__stdout__ and sys.__stderr__. This doesn't work in Jupyter notebooks, so save previous state to variable instead and setting back to saved state
diff --git a/app/scripts/TiledPlot.js b/app/scripts/TiledPlot.js index <HASH>..<HASH> 100644 --- a/app/scripts/TiledPlot.js +++ b/app/scripts/TiledPlot.js @@ -982,8 +982,11 @@ class TiledPlot extends React.Component { * Try to zoom in or out so that the bounds of the view correspond to the * extent of the data. */ - const minPos = [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER]; - const maxPos = [Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER]; + const maxSafeInt = Number.MAX_SAFE_INTEGER; + const minSafeInt = Number.MIN_SAFE_INTEGER; + console.log(maxSafeInt, minSafeInt); + const minPos = [maxSafeInt, maxSafeInt]; + const maxPos = [minSafeInt, minSafeInt]; const trackObjectsToCheck = this.listAllTrackObjects();
Fix strange zoomToData issue This seems to be an issue with babel rather than HiGlass
diff --git a/app/src/Bolt/Storage.php b/app/src/Bolt/Storage.php index <HASH>..<HASH> 100644 --- a/app/src/Bolt/Storage.php +++ b/app/src/Bolt/Storage.php @@ -2481,6 +2481,20 @@ class Storage array(\PDO::PARAM_INT, \PDO::PARAM_STR) )->fetchAll(); + // And the other way around.. + $query = sprintf( + "SELECT id, from_contenttype AS to_contenttype, from_id AS to_id FROM %s WHERE to_id=? AND to_contenttype=?", + $tablename + ); + $currentvalues2 = $this->app['db']->executeQuery( + $query, + array($content_id, $contenttype), + array(\PDO::PARAM_INT, \PDO::PARAM_STR) + )->fetchAll(); + + // Merge them. + $currentvalues = array_merge($currentvalues, $currentvalues2); + // Delete the ones that have been removed. foreach ($currentvalues as $currentvalue) {
Allow removal of relations, if relations were originally created from 'the other end'.
diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -425,15 +425,11 @@ class Parser /** * Checks if the given token indicates a mathematical operator. * - * @return boolean TRUE is the token is a mathematical operator, FALSE otherwise. + * @return boolean TRUE if the token is a mathematical operator, FALSE otherwise. */ private function _isMathOperator($token) { - if (in_array($token['value'], array("+", "-", "/", "*"))) { - return true; - } - - return false; + return in_array($token['value'], array("+", "-", "/", "*")); } /**
Fixed typo and simplified method as mentioned in an earlier comment.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -59,17 +59,6 @@ REQUIREMENTS = [ 'google-cloud-storage', ] -GRPC_PACKAGES = [ - 'grpcio >= 1.0.0', - 'google-gax >= 0.14.1, < 0.15dev', - 'gapic-google-logging-v2 >= 0.9.0, < 0.10dev', - 'grpc-google-logging-v2 >= 0.9.0, < 0.10dev', -] - -RTD_ENV_VAR = 'READTHEDOCS' -if RTD_ENV_VAR not in os.environ: - REQUIREMENTS.extend(GRPC_PACKAGES) - setup( name='google-cloud', version='0.20.0dev',
Remove logging deps from setup.py. In the process removing GRPC_PACKAGES entirely.
diff --git a/packages/demos-react/.pundle.js b/packages/demos-react/.pundle.js index <HASH>..<HASH> 100644 --- a/packages/demos-react/.pundle.js +++ b/packages/demos-react/.pundle.js @@ -5,9 +5,9 @@ const mainTSConfig = require('../../tsconfig'); module.exports = { entry: ['./src/mount.tsx'], output: { - bundlePath: '/dist/bundle.js', + bundlePath: './site/dist/bundle.js', sourceMap: true, - sourceMapPath: '/dist/bundle.js.map', + sourceMapPath: './site/dist/bundle.js.map', }, server: { port: 8080,
[fixed] deploy path Reviewers: O3 Material JavaScript platform reviewers, #material_motion, O2 Material Motion, featherless Reviewed By: #material_motion, O2 Material Motion, featherless Tags: #material_motion Differential Revision: <URL>
diff --git a/core/metrics-core-impl/src/main/java/org/hawkular/metrics/core/impl/transformers/BatchStatementTransformer.java b/core/metrics-core-impl/src/main/java/org/hawkular/metrics/core/impl/transformers/BatchStatementTransformer.java index <HASH>..<HASH> 100644 --- a/core/metrics-core-impl/src/main/java/org/hawkular/metrics/core/impl/transformers/BatchStatementTransformer.java +++ b/core/metrics-core-impl/src/main/java/org/hawkular/metrics/core/impl/transformers/BatchStatementTransformer.java @@ -32,7 +32,7 @@ import rx.functions.Func0; * @author Thomas Segismont */ public class BatchStatementTransformer implements Transformer<Statement, BatchStatement> { - public static final int MAX_BATCH_SIZE = 64; + public static final int MAX_BATCH_SIZE = 10; /** * Creates {@link com.datastax.driver.core.BatchStatement.Type#UNLOGGED} batch statements.
HWKMETRICS-<I> Warning about batch size threshold in the logs Use more conservative value since warnings are still present on Openshift.
diff --git a/src/util.js b/src/util.js index <HASH>..<HASH> 100644 --- a/src/util.js +++ b/src/util.js @@ -190,9 +190,10 @@ util.getFileReplacement = function( src, settings, callback ) { var fileName = util.getInlineFilePath( src, settings.relativeTo ); var mimetype = mime.getType( fileName ); - var base64 = fs.readFileSync( fileName, 'base64' ); - var datauri = `data:${mimetype};base64,${base64}`; - callback( null, datauri ); + fs.readFile( fileName, 'base64', function( err, base64 ) { + var datauri = `data:${mimetype};base64,${base64}`; + callback( err, datauri ); + } ); } };
Use callback version of readFile
diff --git a/billy/importers/bills.py b/billy/importers/bills.py index <HASH>..<HASH> 100644 --- a/billy/importers/bills.py +++ b/billy/importers/bills.py @@ -85,7 +85,7 @@ def import_bill(data, votes, categorizer): # clean up bill_ids data['bill_id'] = fix_bill_id(data['bill_id']) data['alternate_bill_ids'] = [fix_bill_id(bid) for bid in - data['alternate_bill_ids']] + data.get('alternate_bill_ids', [])] # move subjects to scraped_subjects # NOTE: intentionally doesn't copy blank lists of subjects
fix case of missing alternate_bill_ids
diff --git a/test/types/exec.rb b/test/types/exec.rb index <HASH>..<HASH> 100755 --- a/test/types/exec.rb +++ b/test/types/exec.rb @@ -524,6 +524,8 @@ class TestExec < Test::Unit::TestCase end def test_missing_checks_cause_failures + # Solaris's sh exits with 1 here instead of 127 + return if Facter.value(:operatingsystem) == "Solaris" exec = Puppet::Type.newexec( :command => "echo true", :path => ENV["PATH"],
Disabling a test on solaris, since apparently sh on solaris is different than everywhere else git-svn-id: <URL>
diff --git a/src/main/java/org/asteriskjava/manager/event/QueueMemberStatusEvent.java b/src/main/java/org/asteriskjava/manager/event/QueueMemberStatusEvent.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/asteriskjava/manager/event/QueueMemberStatusEvent.java +++ b/src/main/java/org/asteriskjava/manager/event/QueueMemberStatusEvent.java @@ -29,8 +29,9 @@ public class QueueMemberStatusEvent extends QueueMemberEvent */ private static final long serialVersionUID = -2293926744791895763L; - String ringinuse; - String iface; + private String ringinuse; + private String iface; + private Integer incall; /** * @param source @@ -65,4 +66,16 @@ public class QueueMemberStatusEvent extends QueueMemberEvent { this.ringinuse = ringinuse; } + + public Integer getIncall() + { + return incall; + } + + public void setIncall(Integer incall) + { + this.incall = incall; + } + + }
WARN [Asterisk-Java ManagerConnection-0-Reader-0] (AbstractBuilder.java:<I>) - Unable to set property 'incall' to '0' on org.asteriskjava.manager.event.QueueMemberStatusEvent: no setter. Please report at <URL>
diff --git a/src/view/element-own-attached.js b/src/view/element-own-attached.js index <HASH>..<HASH> 100644 --- a/src/view/element-own-attached.js +++ b/src/view/element-own-attached.js @@ -15,7 +15,7 @@ var NodeType = require('./node-type'); var elementGetTransition = require('./element-get-transition'); var getEventListener = require('./get-event-listener'); var warnEventListenMethod = require('./warn-event-listen-method'); -const handleError = require('../util/handle-error'); +var handleError = require('../util/handle-error'); /** * 双绑输入框CompositionEnd事件监听函数
fix: const handleError to var
diff --git a/tests/test_animalqtl.py b/tests/test_animalqtl.py index <HASH>..<HASH> 100644 --- a/tests/test_animalqtl.py +++ b/tests/test_animalqtl.py @@ -6,15 +6,15 @@ from dipper.sources.AnimalQTLdb import AnimalQTLdb from tests.test_source import SourceTestCase logging.basicConfig(level=logging.WARNING) -logger = logging.getLogger(__name__) +LOG = logging.getLogger(__name__) class AnimalQTLdbTestCase(SourceTestCase): def setUp(self): self.source = AnimalQTLdb('rdf_graph', True) - self.source.gene_ids = self._get_conf()['test_ids']['gene'] - self.source.disease_ids = self._get_conf()['test_ids']['disease'] + self.source.gene_ids = self.source.all_test_ids['gene'] + self.source.disease_ids = self.source.all_test_ids['disease'] self.source.settestonly(True) self._setDirToSource() return
conventions & use common test ids
diff --git a/salt/returners/redis_return.py b/salt/returners/redis_return.py index <HASH>..<HASH> 100644 --- a/salt/returners/redis_return.py +++ b/salt/returners/redis_return.py @@ -21,4 +21,7 @@ def returner(ret): host=__opts__['redis.host'], port=__opts__['redis.port'], db=__opts__['redis.db']) - serv.set(ret['id'] + ':' + ret['jid'], json.dumps(ret['return'])) + serv.sadd(ret['id'] + 'jobs', ret['jid']) + serv.set(ret['jid'] + ':' + ret['id'], json.dumps(ret['return'])) + serv.sadd('jobs', ret['jid']) + serv.sadd(ret['jid'], ret['id'])
Change the redis returner to better use data structures
diff --git a/interact.js b/interact.js index <HASH>..<HASH> 100644 --- a/interact.js +++ b/interact.js @@ -5577,6 +5577,7 @@ * interact.margin [ method ] * + * Deprecated. Use `interact(target).resizable({ margin: number });` instead. * Returns or sets the margin for autocheck resizing used in * @Interactable.getAction. That is the distance from the bottom and right * edges of an element clicking in which will start resizing @@ -5584,14 +5585,15 @@ - newValue (number) #optional = (number | interact) The current margin value or interact \*/ - interact.margin = function (newvalue) { + interact.margin = warnOnce(function (newvalue) { if (isNumber(newvalue)) { margin = newvalue; return interact; } return margin; - }; + }, + 'interact.margin is deprecated. Use interact(target).resizable({ margin: number }); instead.') ; /*\ * interact.supportsTouch
Mark interact.margin as deprecated Suggest providing `margin` property in the resizable method's options.
diff --git a/src/fonduer/utils/utils_visual.py b/src/fonduer/utils/utils_visual.py index <HASH>..<HASH> 100644 --- a/src/fonduer/utils/utils_visual.py +++ b/src/fonduer/utils/utils_visual.py @@ -1,9 +1,17 @@ -from collections import namedtuple +from typing import NamedTuple from fonduer.candidates.models.span_mention import TemporarySpanMention from fonduer.parser.models import Sentence -Bbox = namedtuple("bbox", ["page", "top", "bottom", "left", "right"]) + +class Bbox(NamedTuple): + """Bounding box.""" + + page: int + top: int + bottom: int + left: int + right: int def bbox_from_span(span: TemporarySpanMention) -> Bbox:
Use NamedTuple, a typed version of namedtuple, for Bbox
diff --git a/gwpy/timeseries/statevector.py b/gwpy/timeseries/statevector.py index <HASH>..<HASH> 100644 --- a/gwpy/timeseries/statevector.py +++ b/gwpy/timeseries/statevector.py @@ -650,7 +650,7 @@ class StateVector(TimeSeriesBase): gap : `str`, optional how to handle gaps in the cache, one of - - 'ignore': do nothing, let the undelying reader method handle it + - 'ignore': do nothing, let the underlying reader method handle it - 'warn': do nothing except print a warning to the screen - 'raise': raise an exception upon finding a gap (default) - 'pad': insert a value to fill the gaps @@ -1003,7 +1003,7 @@ class StateVectorDict(TimeSeriesBaseDict): gap : `str`, optional how to handle gaps in the cache, one of - - 'ignore': do nothing, let the undelying reader method handle it + - 'ignore': do nothing, let the underlying reader method handle it - 'warn': do nothing except print a warning to the screen - 'raise': raise an exception upon finding a gap (default) - 'pad': insert a value to fill the gaps
Fix typo: undelying -> underlying
diff --git a/tpl/template_funcs_test.go b/tpl/template_funcs_test.go index <HASH>..<HASH> 100644 --- a/tpl/template_funcs_test.go +++ b/tpl/template_funcs_test.go @@ -151,6 +151,8 @@ func TestArethmic(t *testing.T) { {float64(1), uint(2), '+', float64(3)}, {float64(1), "do", '+', false}, {uint(1), int(2), '+', uint64(3)}, + {uint(1), int(-2), '+', int64(-1)}, + {int(-1), uint(2), '+', int64(1)}, {uint(1), float64(2), '+', float64(3)}, {uint(1), "do", '+', false}, {"do ", "be", '+', "do be"},
tpl: Add two more doArithmetic test cases
diff --git a/lib/ImageCache.js b/lib/ImageCache.js index <HASH>..<HASH> 100644 --- a/lib/ImageCache.js +++ b/lib/ImageCache.js @@ -10,6 +10,7 @@ function Img (src) { this._img = new Image(); this._img.onload = this.emit.bind(this, 'load'); this._img.onerror = this.emit.bind(this, 'error'); + this._img.crossOrigin = true; this._img.src = src; // The default impl of events emitter will throw on any 'error' event unless
Use crossOrigin=true on images to allow getImageData/WebGL If not using crossOrigin=true, the canvas get "tainted" which throws an exception when you want to use it as a WebGL texture or if using getImageData()
diff --git a/src/Injector.php b/src/Injector.php index <HASH>..<HASH> 100644 --- a/src/Injector.php +++ b/src/Injector.php @@ -94,15 +94,13 @@ class Injector implements InjectorInterface throw new InjectorInvocationException( "Can't create $className " . " - __construct() missing parameter '".$e->getParameterString()."'" . - " could not be found. Either register it as a service or pass it to create via parameters.", - $e + " could not be found. Either register it as a service or pass it to create via parameters." ); } catch (InjectorInvocationException $e) { //Wrap the exception stack for recursive calls to aid debugging throw new InjectorInvocationException( $e->getMessage() . - PHP_EOL . " => (Called when creating $className)", - $e + PHP_EOL . " => (Called when creating $className)" ); } } @@ -143,8 +141,7 @@ class Injector implements InjectorInterface throw new InjectorInvocationException( "Can't invoke method $className::$methodName()" . " - missing parameter '".$e->getParameterString()."'" . - " could not be found. Either register it as a service or pass it to invoke via parameters.", - $e + " could not be found. Either register it as a service or pass it to invoke via parameters." ); } catch (\ReflectionException $e) { throw new InjectorInvocationException(
Removed exception wrapping for internal exceptions - default exception handler is unwrapping them and displaying non-detailed exception messages.
diff --git a/src/org/apache/cassandra/gms/Gossiper.java b/src/org/apache/cassandra/gms/Gossiper.java index <HASH>..<HASH> 100644 --- a/src/org/apache/cassandra/gms/Gossiper.java +++ b/src/org/apache/cassandra/gms/Gossiper.java @@ -470,7 +470,6 @@ public class Gossiper implements IFailureDetectionEventListener, IEndPointStateC void doStatusCheck() { - long now = System.currentTimeMillis(); Set<EndPoint> eps = endPointStateMap_.keySet(); for ( EndPoint endpoint : eps ) @@ -482,8 +481,7 @@ public class Gossiper implements IFailureDetectionEventListener, IEndPointStateC EndPointState epState = endPointStateMap_.get(endpoint); if ( epState != null ) { - long l = now - epState.getUpdateTimestamp(); - long duration = now - l; + long duration = System.currentTimeMillis() - epState.getUpdateTimestamp(); if ( !epState.isAlive() && (duration > aVeryLongTime_) ) { evictFromMembership(endpoint);
fix duration calculation to avoid evicting dead endpoints instantly git-svn-id: <URL>
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -11,6 +11,7 @@ var find = require('es5-ext/array/#/find') , memoizeMethods = require('memoizee/methods-plain') , getNormalizer = partial.call(require('memoizee/normalizers/get-fixed'), 2) , ensureDocument = require('dom-ext/html-document/valid-html-document') + , reflow = require('dom-ext/html-document/#/reflow') , resetForms = require('html-dom-ext/element/#/reset-forms') , ensureNodeConf = require('./lib/ensure-node-conf') , SiteNode = require('./lib/node'); @@ -44,6 +45,8 @@ ee(Object.defineProperties(SiteTree.prototype, assign({ }); node._load(); this.current = node; + // Assure repaint after content change + reflow.call(this.document); this.emit('load', node); }),
Assure repaint after view load
diff --git a/src/oauth.js b/src/oauth.js index <HASH>..<HASH> 100644 --- a/src/oauth.js +++ b/src/oauth.js @@ -190,7 +190,7 @@ async function getTokenEndpoints (wellKnown) { // set cache timeout wellKnownTimeoutId = setTimeout(() => { debug.wellKnown('cache expired') - getTokenEndpoints() + getTokenEndpoints(wellKnown) .catch(err => { debug.wellKnown('unable to refresh well known information') console.error(err.stack)
fix: pass through wellknown url to timeout callback
diff --git a/lib/desktop/osx.rb b/lib/desktop/osx.rb index <HASH>..<HASH> 100644 --- a/lib/desktop/osx.rb +++ b/lib/desktop/osx.rb @@ -35,8 +35,7 @@ module Desktop end def update_desktop_image_permissions - system chown_command - system chmod_command + system(chown_command) && system(chmod_command) end def chown_command
Only run chmod if chown is successful
diff --git a/engine/env/spark/src/main/java/org/datacleaner/spark/utils/ResultFilePathUtils.java b/engine/env/spark/src/main/java/org/datacleaner/spark/utils/ResultFilePathUtils.java index <HASH>..<HASH> 100644 --- a/engine/env/spark/src/main/java/org/datacleaner/spark/utils/ResultFilePathUtils.java +++ b/engine/env/spark/src/main/java/org/datacleaner/spark/utils/ResultFilePathUtils.java @@ -48,6 +48,7 @@ public class ResultFilePathUtils { public static String getResultFilePath(final JavaSparkContext sparkContext, final SparkJobContext sparkJobContext) { String resultPath = sparkJobContext.getResultPath(); final Configuration hadoopConfiguration = sparkContext.hadoopConfiguration(); + /** The default value would be read from hadoop configuration at runtime from core-site.xml. It represents the machine's hostname and port. Example: hdfs://bigdatavm:9000 **/ final String fileSystemPrefix = hadoopConfiguration.get("fs.defaultFS"); if (resultPath == null || resultPath.isEmpty()) { resultPath = createPath(fileSystemPrefix, DEFAULT_RESULT_PATH);
added a comment about fileSystemPrefix
diff --git a/src/renderable/container.js b/src/renderable/container.js index <HASH>..<HASH> 100644 --- a/src/renderable/container.js +++ b/src/renderable/container.js @@ -468,7 +468,7 @@ var childIndex = this.getChildIndex(child); if (childIndex > 0) { // note : we use an inverted loop - this.splice(0, 0, this.splice(childIndex, 1)[0]); + this.children.splice(0, 0, this.children.splice(childIndex, 1)[0]); // increment our child z value based on the previous child depth child.z = this.children[1].z + 1; } @@ -485,7 +485,7 @@ var childIndex = this.getChildIndex(child); if (childIndex < (this.children.length - 1)) { // note : we use an inverted loop - this.splice((this.children.length - 1), 0, this.splice(childIndex, 1)[0]); + this.children.splice((this.children.length - 1), 0, this.children.splice(childIndex, 1)[0]); // increment our child z value based on the next child depth child.z = this.children[(this.children.length - 2)].z - 1; }
Fixed the moveToTop and moveToBottom functions (thanks Lamberto!)
diff --git a/django_tenants/management/commands/create_tenant.py b/django_tenants/management/commands/create_tenant.py index <HASH>..<HASH> 100644 --- a/django_tenants/management/commands/create_tenant.py +++ b/django_tenants/management/commands/create_tenant.py @@ -28,7 +28,7 @@ class Command(BaseCommand): for field in self.domain_fields: self.option_list += (make_option('--%s' % field.name, - help='Specifies the %s for tenant.' % field.name), ) + help="Specifies the %s for the tenant's domain." % field.name), ) self.option_list += (make_option('-s', action="store_true", help='Create a superuser afterwards.'),) @@ -95,6 +95,7 @@ class Command(BaseCommand): try: domain = get_tenant_domain_model().objects.create(**fields) domain.save() + return domain except exceptions.ValidationError as e: self.stderr.write("Error: %s" % '; '.join(e.messages)) return None
Fix domain creation bug in create_tenant management command. The 'create_tenant' management command was not handling domain creation options properly and was running into an infinite loop. This was because the store_tenant_domain() method was not returning the domain that it had newly created.
diff --git a/lib/relations/belongs_to.js b/lib/relations/belongs_to.js index <HASH>..<HASH> 100644 --- a/lib/relations/belongs_to.js +++ b/lib/relations/belongs_to.js @@ -15,8 +15,6 @@ _.str = require('underscore.string'); /** * The belongs to property for models. * - * Documentation forthcoming. - * * For example: * * var Article = Model.extend({ @@ -287,7 +285,8 @@ BelongsTo.reopen(/** @lends BelongsTo# */ { }), /** - * Documentation forthcoming. + * Fetch the related object. If there is no foreign key defined on the + * instance, this method will not actually query the database. * * @since 1.0 * @protected @@ -318,7 +317,8 @@ BelongsTo.reopen(/** @lends BelongsTo# */ { }, /** - * Documentation forthcoming. + * Validate fetched objects, ensuring that exactly one object was obtained + * when the foreign key is set. * * @since 1.0 * @protected
Finished docs for belongs to.
diff --git a/geomdl/helpers.py b/geomdl/helpers.py index <HASH>..<HASH> 100644 --- a/geomdl/helpers.py +++ b/geomdl/helpers.py @@ -84,7 +84,7 @@ def find_span_linear(degree, knot_vector, num_ctrlpts, knot, **kwargs): :return: knot span :rtype: int """ - span = 0 # Knot span index starts from zero + span = degree + 1 # Knot span index starts from zero while span < num_ctrlpts and knot_vector[span] <= knot: span += 1
Fix span finding for out-of-domain evaluation
diff --git a/src/server/middleware/auth/gmeauth.js b/src/server/middleware/auth/gmeauth.js index <HASH>..<HASH> 100644 --- a/src/server/middleware/auth/gmeauth.js +++ b/src/server/middleware/auth/gmeauth.js @@ -496,7 +496,8 @@ function GMEAuth(session, gmeConfig) { var i; for (i = 0; i < userDataArray.length; i += 1) { delete userDataArray[i].passwordHash; - // TODO: Consider removing settings and data here. + userDataArray[i].data = userDataArray[i].data || {}; + userDataArray[i].settings = userDataArray[i].settings || {}; } return userDataArray; })
WIP gmeAuth.listUsers should add settings and data. (#<I>) should be cherry picked to <I> Former-commit-id: <I>aef<I>fcd<I>fb<I>bc<I>ab<I>d<I>a<I>a<I>
diff --git a/holoviews/element/chart.py b/holoviews/element/chart.py index <HASH>..<HASH> 100644 --- a/holoviews/element/chart.py +++ b/holoviews/element/chart.py @@ -36,6 +36,8 @@ class Chart(Columns, Element2D): lower_bounds, upper_bounds = [None]*ndims, [None]*ndims for i, slc in enumerate(index[:ndims]): if isinstance(slc, slice): + lbound = self.extents[i] + ubound = self.extents[ndims:][i] lower_bounds[i] = lbound if slc.start is None else slc.start upper_bounds[i] = ubound if slc.stop is None else slc.stop sliced.extents = tuple(lower_bounds+upper_bounds)
Minor fix for Chart slicing extent setting
diff --git a/src/main/java/org/efaps/ui/wicket/models/objects/UITaskObject.java b/src/main/java/org/efaps/ui/wicket/models/objects/UITaskObject.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/efaps/ui/wicket/models/objects/UITaskObject.java +++ b/src/main/java/org/efaps/ui/wicket/models/objects/UITaskObject.java @@ -203,7 +203,6 @@ public class UITaskObject } uiField = new UISnippletField(getInstance().getKey(), this, new FieldConfiguration(field.getId())); - uiGroup.add(uiField); ((UISnippletField) uiField).setHtml(html.toString()); } if (uiField == null) {
- webapp: field was added twice git-svn-id: <URL>
diff --git a/tests/server/blueprints/cases/test_cases_views.py b/tests/server/blueprints/cases/test_cases_views.py index <HASH>..<HASH> 100644 --- a/tests/server/blueprints/cases/test_cases_views.py +++ b/tests/server/blueprints/cases/test_cases_views.py @@ -786,7 +786,7 @@ def test_omimterms(app, test_omim_term): assert resp.status_code == 200 # containing the OMIM term - assert test_omim_term["_id"] in str(resp.data) + assert resp.mimetype == "application/pdf" def _test_beacon_submit(client, case_obj, vcf_files):
Update tests/server/blueprints/cases/test_cases_views.py
diff --git a/lib/bot.js b/lib/bot.js index <HASH>..<HASH> 100644 --- a/lib/bot.js +++ b/lib/bot.js @@ -283,10 +283,6 @@ function OpkitBot(name, cmds, persister, params) { winston.log('info', response); return self.persister.save(self.brain[command.script], command.script); }) - .then(function(response){ - winston.log('info', response); - return Promise.resolve(); - }) .catch(function(err){ winston.log('warn', err); return Promise.resolve();
No longer logging persister's response
diff --git a/Classes/Command/ConfigurationCommandController.php b/Classes/Command/ConfigurationCommandController.php index <HASH>..<HASH> 100644 --- a/Classes/Command/ConfigurationCommandController.php +++ b/Classes/Command/ConfigurationCommandController.php @@ -48,8 +48,8 @@ class ConfigurationCommandController extends CommandController implements Single $this->outputLine('<warning>The configuration path "%s" is overwritten by custom configuration options. Removing from local configuration will have no effect.</warning>', array($path)); } if (!$force && $this->configurationService->hasLocal($path)) { - $answer = strtolower($this->output->ask('Remove ' . $path . ' from system configuration (TYPO3_CONF_VARS)? (y/N): ', 'n')); - if (strtolower($answer) === 'n') { + $reallyDelete = $this->output->askConfirmation('Remove ' . $path . ' from system configuration (TYPO3_CONF_VARS)? (yes/<b>no</b>): ', false); + if (!$reallyDelete) { continue; } }
[CLEANUP] Use askConfirmation for confirmation question (#<I>)
diff --git a/c7n/version.py b/c7n/version.py index <HASH>..<HASH> 100644 --- a/c7n/version.py +++ b/c7n/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -version = u"0.8.30.0" +version = u"0.8.31.0" diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ def read(fname): setup( name="c7n", - version='0.8.30.0', + version='0.8.31.0', description="Cloud Custodian - Policy Rules Engine", long_description=read('README.rst'), classifiers=[
<I> - minor version release (#<I>)
diff --git a/spec/models/thredded/category_spec.rb b/spec/models/thredded/category_spec.rb index <HASH>..<HASH> 100644 --- a/spec/models/thredded/category_spec.rb +++ b/spec/models/thredded/category_spec.rb @@ -3,20 +3,5 @@ require 'spec_helper' module Thredded describe Category do - it 'should allow no categories' do - topic = create(:topic) - topic.category_ids = nil - topic.save - - expect(topic).to be_valid - end - - it 'should allow a category' do - topic = create(:topic) - topic.categories << create(:category, messageboard: topic.messageboard) - topic.save - - expect(topic.categories).not_to be_nil - end end end diff --git a/spec/models/thredded/topic_spec.rb b/spec/models/thredded/topic_spec.rb index <HASH>..<HASH> 100644 --- a/spec/models/thredded/topic_spec.rb +++ b/spec/models/thredded/topic_spec.rb @@ -124,5 +124,16 @@ module Thredded expect(@post.postable.reload.updated_at.to_s).to eq old_time.to_s end + + it 'can have categories' do + topic = build(:topic) + category = build(:category) + + topic.categories << category + topic.save + + expect(topic.categories.size).to eq 1 + expect(topic.categories.first).to eq category + end end end
Update specs (#<I>) * remove specification about a behaviour belonging to another model (topic) * specify only expected behaviour to avoid over specification (previously it was specified that "don't should allow no categories" ).
diff --git a/go/cmd/vtctldclient/internal/command/reparents.go b/go/cmd/vtctldclient/internal/command/reparents.go index <HASH>..<HASH> 100644 --- a/go/cmd/vtctldclient/internal/command/reparents.go +++ b/go/cmd/vtctldclient/internal/command/reparents.go @@ -150,6 +150,9 @@ func commandInitShardPrimary(cmd *cobra.Command, args []string) error { WaitReplicasTimeout: protoutil.DurationToProto(initShardPrimaryOptions.WaitReplicasTimeout), Force: initShardPrimaryOptions.Force, }) + if err != nil { + return err + } for _, event := range resp.Events { log.Infof("%v", event)
Check error response before attempting to access InitShardPrimary response
diff --git a/src/Decorator.php b/src/Decorator.php index <HASH>..<HASH> 100644 --- a/src/Decorator.php +++ b/src/Decorator.php @@ -2,13 +2,15 @@ namespace Ornament\Core; +use StdClass; + abstract class Decorator implements DecoratorInterface { protected $source; - public function __construct($source, ...$args) + public function __construct(StdClass $model, string $property, ...$args) { - $this->source = $source; + $this->source =& $model->$property; } public function getSource()
right, we need to pass references here
diff --git a/Classes/Parser/AbstractParser.php b/Classes/Parser/AbstractParser.php index <HASH>..<HASH> 100644 --- a/Classes/Parser/AbstractParser.php +++ b/Classes/Parser/AbstractParser.php @@ -307,6 +307,7 @@ abstract class AbstractParser implements ParserInterface if ($fileContent !== false) { file_put_contents($outputFilename, $fileContent); + \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($outputFilename); // important for some cache clearing scenarios if (file_exists($preparedFilename)) { unlink($preparedFilename);
Use TYPO3-Configured Permissions (#<I>) file_put_contents uses the default php permissions. with this change the file has the configured typo3-permissions
diff --git a/js/core/List.js b/js/core/List.js index <HASH>..<HASH> 100644 --- a/js/core/List.js +++ b/js/core/List.js @@ -3,7 +3,7 @@ define(["js/core/Bindable", "underscore"], function (Bindable, _) { ctor: function (items, attributes) { this.$items = []; - this.callBase(this, attributes); + this.callBase(attributes); if (items) { this.add(items);
fixed calling of callBase in List
diff --git a/src/Application.php b/src/Application.php index <HASH>..<HASH> 100644 --- a/src/Application.php +++ b/src/Application.php @@ -79,4 +79,11 @@ class Application extends \Symfony\Component\Console\Application { $this->getDefinition()->addOption($options); } + + public function extractNamespace(string $name, int $limit = null) + { + $parts = explode('/', $name, -1); + + return implode('/', null === $limit ? $parts : \array_slice($parts, 0, $limit)); + } }
Group by namespace when displaying list of commands
diff --git a/src/BaseBranchRepositoryEloquent.php b/src/BaseBranchRepositoryEloquent.php index <HASH>..<HASH> 100644 --- a/src/BaseBranchRepositoryEloquent.php +++ b/src/BaseBranchRepositoryEloquent.php @@ -2,7 +2,7 @@ namespace SedpMis\BaseRepository; -abstract class BaseBranchRepositoryEloquent extends BaseRepositoryEloquent implements RepositoryInterface +class BaseBranchRepositoryEloquent extends BaseRepositoryEloquent implements RepositoryInterface { /** * Branch id to be prefix when creating new item to storage. diff --git a/src/BaseRepositoryEloquent.php b/src/BaseRepositoryEloquent.php index <HASH>..<HASH> 100644 --- a/src/BaseRepositoryEloquent.php +++ b/src/BaseRepositoryEloquent.php @@ -6,7 +6,7 @@ use Illuminate\Support\Collection; use Illuminate\Database\Eloquent\Model as EloquentModel; use Illuminate\Support\Facades\Schema; -abstract class BaseRepositoryEloquent implements RepositoryInterface +class BaseRepositoryEloquent implements RepositoryInterface { /** * Eloquent model.
Change base classes as non-abstract
diff --git a/hazelcast/src/main/java/com/hazelcast/map/impl/operation/MapReplicationStateHolder.java b/hazelcast/src/main/java/com/hazelcast/map/impl/operation/MapReplicationStateHolder.java index <HASH>..<HASH> 100644 --- a/hazelcast/src/main/java/com/hazelcast/map/impl/operation/MapReplicationStateHolder.java +++ b/hazelcast/src/main/java/com/hazelcast/map/impl/operation/MapReplicationStateHolder.java @@ -45,6 +45,7 @@ import com.hazelcast.map.impl.recordstore.expiry.ExpiryReason; import com.hazelcast.nio.ObjectDataInput; import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.nio.serialization.IdentifiedDataSerializable; +import com.hazelcast.nio.serialization.impl.Versioned; import com.hazelcast.query.impl.Index; import com.hazelcast.query.impl.Indexes; import com.hazelcast.query.impl.InternalIndex; @@ -68,7 +69,7 @@ import static com.hazelcast.internal.util.MapUtil.isNullOrEmpty; /** * Holder for raw IMap key-value pairs and their metadata. */ -public class MapReplicationStateHolder implements IdentifiedDataSerializable { +public class MapReplicationStateHolder implements IdentifiedDataSerializable, Versioned { // holds recordStore-references of these partitions' maps protected transient Map<String, RecordStore<Record>> storesByMapName;
Restore Versioned interface on MapReplicationStateHolder (#<I>) Required for maintaing RU compatibility with <I>
diff --git a/lib/websocket.js b/lib/websocket.js index <HASH>..<HASH> 100644 --- a/lib/websocket.js +++ b/lib/websocket.js @@ -523,7 +523,7 @@ function initAsClient (address, protocols, options) { if (options.handshakeTimeout) { req.setTimeout( options.handshakeTimeout, - abortHandshake.bind(null, this, req, 'Opening handshake has timed out') + () => abortHandshake(this, req, 'Opening handshake has timed out') ); }
[minor] Replace bound function with arrow function Do not mask potential issues, like #<I>, with bound arguments.
diff --git a/src/Base62/GmpEncoder.php b/src/Base62/GmpEncoder.php index <HASH>..<HASH> 100644 --- a/src/Base62/GmpEncoder.php +++ b/src/Base62/GmpEncoder.php @@ -31,11 +31,11 @@ class GmpEncoder public function encode($data) { if (is_integer($data)) { - $hex = dechex($data); + $base62 = gmp_strval(gmp_init($data, 10), 62); } else { $hex = bin2hex($data); + $base62 = gmp_strval(gmp_init($hex, 16), 62); } - $base62 = gmp_strval(gmp_init($hex, 16), 62); if (Base62::GMP === $this->options["characters"]) { return $base62;
Remove unneeded dechex() call
diff --git a/lib/SimpleSAML/Logger.php b/lib/SimpleSAML/Logger.php index <HASH>..<HASH> 100644 --- a/lib/SimpleSAML/Logger.php +++ b/lib/SimpleSAML/Logger.php @@ -16,6 +16,9 @@ interface SimpleSAML_Logger_LoggingHandler { class SimpleSAML_Logger { private static $loggingHandler = null; private static $logLevel = null; + + private static $captureLog = FALSE; + private static $capturedLog = array(); /** * This constant defines the string we set the trackid to while we are fetching the @@ -137,10 +140,20 @@ class SimpleSAML_Logger { self::$loggingHandler = $sh; } + public static function setCaptureLog($val = TRUE) { + self::$captureLog = $val; + } + + public static function getCapturedLog() { + return self::$capturedLog; + } + static function log_internal($level,$string,$statsLog = false) { if (self::$loggingHandler == null) self::createLoggingHandler(); + if (self::$captureLog) self::$capturedLog[] = $string; + if (self::$logLevel >= $level || $statsLog) { if (is_array($string)) $string = implode(",",$string); $string = '['.self::getTrackId().'] '.$string;
Add support for log capturing. used in ldapstatus module.
diff --git a/addon/lint/lint.js b/addon/lint/lint.js index <HASH>..<HASH> 100644 --- a/addon/lint/lint.js +++ b/addon/lint/lint.js @@ -46,6 +46,7 @@ } var poll = setInterval(function() { if (tooltip) for (var n = node;; n = n.parentNode) { + if (n && n.nodeType == 11) n = n.root; if (n == document.body) return; if (!n) { hide(); break; } }
[lint addon] When checking whether node is still in document, account for shadow dom Issue #<I>
diff --git a/ratecounter_test.go b/ratecounter_test.go index <HASH>..<HASH> 100644 --- a/ratecounter_test.go +++ b/ratecounter_test.go @@ -27,6 +27,19 @@ func TestRateCounter(t *testing.T) { check(0) } +func TestRateCounter_ScheduleDecrement_ReturnsImmediately(t *testing.T) { + interval := 1 * time.Second + r := NewRateCounter(interval) + + start := time.Now() + r.scheduleDecrement(-1) + duration := time.Since(start) + + if duration >= 1*time.Second { + t.Error("scheduleDecrement took", duration, "to return") + } +} + func BenchmarkRateCounter(b *testing.B) { interval := 0 * time.Millisecond r := NewRateCounter(interval)
added test for ratecounter scheduleDecrement returning immediately
diff --git a/externs/fileapi.js b/externs/fileapi.js index <HASH>..<HASH> 100644 --- a/externs/fileapi.js +++ b/externs/fileapi.js @@ -242,13 +242,6 @@ Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {}; /** - * @see http://www.w3.org/TR/file-system-api/#widl-Entry-toURI - * @param {string=} mimeType - * @return {string} - */ -Entry.prototype.toURI = function(mimeType) {}; - -/** * @see http://www.w3.org/TR/file-system-api/#widl-Entry-toURL * @param {string=} mimeType * @return {string}
Get rid of the obsolete Entry#toURI extern. R=nicksantos DELTA=7 (0 added, 7 deleted, 0 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=<I> git-svn-id: <URL>
diff --git a/src/components/slider.js b/src/components/slider.js index <HASH>..<HASH> 100644 --- a/src/components/slider.js +++ b/src/components/slider.js @@ -89,7 +89,7 @@ AFRAME.registerComponent('gui-slider', { var clickActionFunction = window[clickActionFunctionName]; //console.log("clickActionFunction: "+clickActionFunction); // is object a function? - if (typeof clickActionFunction === "function") clickActionFunction(); + if (typeof clickActionFunction === "function") clickActionFunction(data.percent); }); @@ -134,4 +134,4 @@ AFRAME.registerPrimitive( 'a-gui-slider', { 'active-color': 'gui-slider.activeColor', 'handle-color': 'gui-slider.handleColor' } -}); \ No newline at end of file +});
Modified the slider component It now notifies the user of the current position of the slider by emitting an event using clickActionFunction(data.percent)
diff --git a/locale/de.js b/locale/de.js index <HASH>..<HASH> 100644 --- a/locale/de.js +++ b/locale/de.js @@ -1,4 +1,5 @@ const messages = { + _default: (field) => `${field} ist ungültig.`, after: (field, [target]) => `${field} muss nach ${target} liegen.`, alpha_dash: (field) => `${field} darf alphanumerische Zeichen sowie Striche und Unterstriche enthalten.`, alpha_num: (field) => `${field} darf nur alphanumerische Zeichen enthalten.`,
added missing _default in de.js
diff --git a/lib/pay/stripe/billable.rb b/lib/pay/stripe/billable.rb index <HASH>..<HASH> 100644 --- a/lib/pay/stripe/billable.rb +++ b/lib/pay/stripe/billable.rb @@ -172,6 +172,16 @@ module Pay billable.card_token = nil end + # Syncs a customer's subscriptions from Stripe to the database + def sync_subscriptions + subscriptions = ::Stripe::Subscription.list({customer: customer}, {stripe_account: stripe_account}) + subscriptions.map do |subscription| + Pay::Stripe::Subscription.sync(subscription.id) + end + rescue ::Stripe::StripeError => e + raise Pay::Stripe::Error, e + end + # https://stripe.com/docs/api/checkout/sessions/create # # checkout(mode: "payment")
RFC: add a path for syncing all of a customer's subscriptions (#<I>) * add a path for syncing all of a customer's subscriptions * scope scubscription sync to stripe_account * Update billable.rb * Update billable.rb
diff --git a/jobs/config_test.py b/jobs/config_test.py index <HASH>..<HASH> 100755 --- a/jobs/config_test.py +++ b/jobs/config_test.py @@ -441,6 +441,14 @@ class JobTest(unittest.TestCase): def test_valid_job_config_json(self): """Validate jobs/config.json.""" + # bootstrap integration test scripts + ignore = [ + 'fake-failure', + 'fake-branch', + 'fake-pr', + 'random_job', + ] + self.load_prow_yaml(self.prow_config) config = config_sort.test_infra('jobs/config.json') owners = config_sort.test_infra('jobs/validOwners.json') @@ -448,6 +456,10 @@ class JobTest(unittest.TestCase): config = json.loads(fp.read()) valid_owners = json.loads(ownfp.read()) for job in config: + if job not in ignore: + self.assertTrue(job in self.prowjobs or job in self.realjobs, + '%s must have a matching jenkins/prow entry' % job) + # onwership assertions self.assertIn('sigOwners', config[job], job) self.assertIsInstance(config[job]['sigOwners'], list, job)
Make sure each job has a config.json entry
diff --git a/client/src/main/java/com/paypal/selion/platform/dataprovider/AbstractExcelDataProvider.java b/client/src/main/java/com/paypal/selion/platform/dataprovider/AbstractExcelDataProvider.java index <HASH>..<HASH> 100644 --- a/client/src/main/java/com/paypal/selion/platform/dataprovider/AbstractExcelDataProvider.java +++ b/client/src/main/java/com/paypal/selion/platform/dataprovider/AbstractExcelDataProvider.java @@ -265,7 +265,12 @@ public abstract class AbstractExcelDataProvider { Object objectToReturn = createObjectToUse(userObj); int index = 0; for (Field eachField : fields) { - + //If the data is not present in excel sheet then skip it + String data = excelRowData.get(index++); + if (StringUtils.isEmpty(data)) { + continue; + } + Class<?> eachFieldType = eachField.getType(); if (eachFieldType.isInterface()) { @@ -278,11 +283,6 @@ public abstract class AbstractExcelDataProvider { + " is an interface. Interfaces are not supported."); } - String data = excelRowData.get(index++); - if (StringUtils.isEmpty(data)) { - continue; - } - eachField.setAccessible(true); boolean isArray = eachFieldType.isArray(); DataMemberInformation memberInfo = new DataMemberInformation(eachField, userObj, objectToReturn, data);
Excel DataProvider Bug fix Refactored AbstractExcelDataProvider.prepareObject method to prepone the check for data from excel before checking if the field type is an interface.
diff --git a/ext/mysql2/extconf.rb b/ext/mysql2/extconf.rb index <HASH>..<HASH> 100644 --- a/ext/mysql2/extconf.rb +++ b/ext/mysql2/extconf.rb @@ -57,7 +57,7 @@ end asplode h unless have_header h end -unless RUBY_PLATFORM =~ /mswin/ +unless RUBY_PLATFORM =~ /mswin/ or RUBY_PLATFORM =~ /sparc/ $CFLAGS << ' -Wall -funroll-loops' end # $CFLAGS << ' -O0 -ggdb3 -Wextra'
fix to CFLAGS to allow compilation on SPARC with sunstudio compiler
diff --git a/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java b/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java index <HASH>..<HASH> 100644 --- a/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java +++ b/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java @@ -571,13 +571,15 @@ public class AirMapView extends MapView implements GoogleMap.InfoWindowAdapter, switch (action) { case (MotionEvent.ACTION_DOWN): - this.getParent().requestDisallowInterceptTouchEvent(true); + this.getParent().requestDisallowInterceptTouchEvent( + map != null && map.getUiSettings().isScrollGesturesEnabled()); isTouchDown = true; break; case (MotionEvent.ACTION_MOVE): startMonitoringRegion(); break; case (MotionEvent.ACTION_UP): + // Clear this regardless, since isScrollGesturesEnabled() may have been updated this.getParent().requestDisallowInterceptTouchEvent(false); isTouchDown = false; break;
If we've disabled scrolling within the map, then don't capture the touch events (#<I>) * If we've disabled scrolling within the map, then don't capture the touch events. This allows the containing scrollview to perform a scrollview scroll by dragging on the map. (Previously, the map would absorb the touches, and then not scroll the map *or* the scrollview, which was bad.) * Minor simplification
diff --git a/shared/reducers/config.js b/shared/reducers/config.js index <HASH>..<HASH> 100644 --- a/shared/reducers/config.js +++ b/shared/reducers/config.js @@ -157,15 +157,23 @@ export default function (state: ConfigState = initialState, action: Action): Con } } case Constants.globalError: { + const error = action.payload + if (error) { + console.warn('Error (global):', error) + } return { ...state, - globalError: action.payload, + globalError: error, } } case Constants.daemonError: { + const error = action.payload.daemonError + if (error) { + console.warn('Error (daemon):', error) + } return { ...state, - daemonError: action.payload.daemonError, + daemonError: error, } }
Log global and daemon error (#<I>)
diff --git a/test/default.test.js b/test/default.test.js index <HASH>..<HASH> 100644 --- a/test/default.test.js +++ b/test/default.test.js @@ -16,6 +16,11 @@ test('should generate the expected default result', async t => { plugins: [new FaviconsWebpackPlugin({logo})] }); + stats.compilation.children + .filter(child => child.name === 'webapp-webpack-plugin') + .forEach(child => { + t.deepEqual(child.assets, {}); + }); const diff = await compare(dist, path.resolve(expected, 'default')); t.deepEqual(diff, []); diff --git a/test/html.test.js b/test/html.test.js index <HASH>..<HASH> 100644 --- a/test/html.test.js +++ b/test/html.test.js @@ -20,6 +20,12 @@ test('should work together with the html-webpack-plugin', async t => { ], }); + stats.compilation.children + .filter(child => child.name === 'webapp-webpack-plugin') + .forEach(child => { + t.deepEqual(child.assets, {}); + }); + const diff = await compare(dist, path.resolve(expected, 'html')); t.deepEqual(diff, []); });
test: check output stats for the child compiler lists no asset