diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/examples/simple-activity-worker.js b/examples/simple-activity-worker.js index <HASH>..<HASH> 100644 --- a/examples/simple-activity-worker.js +++ b/examples/simple-activity-worker.js @@ -13,7 +13,7 @@ var activityPoller = new swf.ActivityPoller({ activityPoller.on('activityTask', function(task) { console.log("Received new activity task !"); - var output = task.input; + var output = task.config.input; task.respondCompleted(output, function (err) {
task input is available from task.config.input
diff --git a/flattened_serializers.go b/flattened_serializers.go index <HASH>..<HASH> 100644 --- a/flattened_serializers.go +++ b/flattened_serializers.go @@ -156,6 +156,20 @@ func (sers *flattened_serializers) recurse_table(cur *dota.ProtoFlattenedSeriali // normal case "m_vecLadderNormal": prop.Field.Encoder = "normal" + + // fixed + case "m_bItemWhiteList": + fallthrough + case "m_iPlayerIDsInControl": + fallthrough + case "m_ulTeamBaseLogo": + fallthrough + case "m_ulTeamBannerLogo": + fallthrough + case "m_CustomHealthbarColor": + fallthrough + case "m_bWorldTreeState": + prop.Field.Encoder = "fixed64" } }
Add fixed<I> for a number of types
diff --git a/src/main/java-core/net/sf/xmlunit/util/Convert.java b/src/main/java-core/net/sf/xmlunit/util/Convert.java index <HASH>..<HASH> 100644 --- a/src/main/java-core/net/sf/xmlunit/util/Convert.java +++ b/src/main/java-core/net/sf/xmlunit/util/Convert.java @@ -17,9 +17,9 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.Collection; -import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.Map; import javax.xml.XMLConstants; import javax.xml.namespace.NamespaceContext; @@ -97,7 +97,7 @@ public final class Convert { if (uri == null) { throw new IllegalArgumentException("uri must not be null"); } - Collection<String> c = new HashSet<String>(); + Collection<String> c = new LinkedHashSet<String>(); boolean done = false; if (XMLConstants.XML_NS_URI.equals(uri)) { c.add(XMLConstants.XML_NS_PREFIX);
preserve order of initial Map in getPrefixes if there was one in the first place git-svn-id: <URL>
diff --git a/src/main/java/fr/wseduc/webutils/data/ZLib.java b/src/main/java/fr/wseduc/webutils/data/ZLib.java index <HASH>..<HASH> 100644 --- a/src/main/java/fr/wseduc/webutils/data/ZLib.java +++ b/src/main/java/fr/wseduc/webutils/data/ZLib.java @@ -56,9 +56,14 @@ public class ZLib { byte[] buffer = new byte[1024]; while (!inflater.finished()) { int count = inflater.inflate(buffer); - outputStream.write(buffer, 0, count); + if (count > 0) { + outputStream.write(buffer, 0, count); + } else { + break; + } } outputStream.close(); + inflater.end(); return outputStream.toByteArray(); }
defensive programming in Zlib Inflater
diff --git a/sunspot_rails/lib/sunspot/rails/searchable.rb b/sunspot_rails/lib/sunspot/rails/searchable.rb index <HASH>..<HASH> 100644 --- a/sunspot_rails/lib/sunspot/rails/searchable.rb +++ b/sunspot_rails/lib/sunspot/rails/searchable.rb @@ -246,7 +246,7 @@ module Sunspot #:nodoc: find_in_batch_options = { :include => options[:include], :batch_size => options[:batch_size], - :start => options[:first_id] + :start => options[:start] } progress_bar = options[:progress_bar] if options[:batch_size]
Propagate :first_id option to find_in_batches, before was always nil
diff --git a/src/DivideIQ.php b/src/DivideIQ.php index <HASH>..<HASH> 100644 --- a/src/DivideIQ.php +++ b/src/DivideIQ.php @@ -289,11 +289,14 @@ class DivideIQ implements \JsonSerializable // Check if the error is indeed a "TokenExpired" error, // as expected. - if ($body->answer != 'TokenExpired') { + if ($body->answer == 'TokenExpired') { // Token is expired; refreshing unsuccessful. $success = false; } else { - // Unexpected error. Pass it up the stack. + // Unexpected error. Pass it up the stack. This + // might be a "TokenEmpty" error, but that would + // still be unexpected, because the token value was + // checked beforehand. throw $e; } } else {
Fixes #5: error handling of TokenExpired and TokenEmpty during refreshing
diff --git a/lib/file_list.js b/lib/file_list.js index <HASH>..<HASH> 100644 --- a/lib/file_list.js +++ b/lib/file_list.js @@ -53,6 +53,7 @@ Url.prototype.toString = File.prototype.toString = function () { var GLOB_OPTS = { // globDebug: true, + follow: true, cwd: '/' }
fix(file_list): follow symlinks Changing to the latest version of the glob module means that karma no longer follows symlinks to find files to serve. Setting foillow:true in the glob options enables this behaviour again.
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -28,7 +28,6 @@ class MuiDownshift extends Component { loading, menuHeight, menuItemCount, - onStateChange, // called in `handleStateChange` above ...props } = this.props;
Pass "onStateChange" down to Downshift now that it is only overridden within mui-downshift
diff --git a/src/lib/keys.js b/src/lib/keys.js index <HASH>..<HASH> 100644 --- a/src/lib/keys.js +++ b/src/lib/keys.js @@ -1,5 +1,3 @@ -import 'core-js/es/symbol'; - // TODO: Need better, more complete, and more methodical key definitions const Keys = {
Remove core-js import `Symbol` is now part of ECMAScript and core-js is not included by default in babel 7 builds. By removing the explicit import, developers can use their own transpile process - if `Symbol` does not exist in their version of javascript, they'll get an error about that.
diff --git a/docs/src/modules/components/MarkdownLinks.js b/docs/src/modules/components/MarkdownLinks.js index <HASH>..<HASH> 100644 --- a/docs/src/modules/components/MarkdownLinks.js +++ b/docs/src/modules/components/MarkdownLinks.js @@ -28,11 +28,18 @@ export async function handleEvent(event, as) { document.body.focus(); } +/** + * @param {MouseEvent} event + */ function handleClick(event) { - const activeElement = document.activeElement; + let activeElement = event.target; + while (activeElement?.nodeType === Node.ELEMENT_NODE && activeElement.nodeName !== 'A') { + activeElement = activeElement.parentElement; + } // Ignore non link clicks if ( + activeElement === null || activeElement.nodeName !== 'A' || activeElement.getAttribute('target') === '_blank' || activeElement.getAttribute('data-no-link') === 'true' || @@ -41,7 +48,7 @@ function handleClick(event) { return; } - handleEvent(event, document.activeElement.getAttribute('href')); + handleEvent(event, activeElement.getAttribute('href')); } let bound = false;
[docs] Fix links being opened when dismissing context menus (#<I>)
diff --git a/angular-drag-and-drop-lists.js b/angular-drag-and-drop-lists.js index <HASH>..<HASH> 100644 --- a/angular-drag-and-drop-lists.js +++ b/angular-drag-and-drop-lists.js @@ -221,6 +221,18 @@ angular.module('dndLists', []) var externalSources = attr.dndExternalSources && scope.$eval(attr.dndExternalSources); /** + * The dragenter is triggered prior to the dragover and to allow + * a drop the event handler must preventDefault(). + */ + element.on('dragenter', function (event) { + event = event.originalEvent || event; + + if (!isDropAllowed(event)) return true; + + event.preventDefault(); + }); + + /** * The dragover event is triggered "every few hundred milliseconds" while an element * is being dragged over our list, or over an child element. */
just the changes needed to make mobile dnd polyfill work for easy merging on PR
diff --git a/src/IpTools.php b/src/IpTools.php index <HASH>..<HASH> 100644 --- a/src/IpTools.php +++ b/src/IpTools.php @@ -65,17 +65,15 @@ class IpTools */ public function validIpv4($ip, $strict = true) { + $flags = FILTER_FLAG_IPV4; if ($strict) { $flags = FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE; - } else { - $flags = FILTER_FLAG_IPV4; } if (filter_var($ip, FILTER_VALIDATE_IP, array('flags' => $flags)) !== false) { return true; - } else { - return false; } + return false; } /** @@ -88,17 +86,16 @@ class IpTools */ public function validIpv6($ip, $strict = true) { + $flags = FILTER_FLAG_IPV6; if ($strict) { $flags = FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE; - } else { - $flags = FILTER_FLAG_IPV6; } if (filter_var($ip, FILTER_VALIDATE_IP, array('flags' => $flags)) !== false) { return true; - } else { - return false; } + + return false; } /**
Trying to get rid of some conditions to reach better test results
diff --git a/code/forms/GridFieldSortableRows.php b/code/forms/GridFieldSortableRows.php index <HASH>..<HASH> 100644 --- a/code/forms/GridFieldSortableRows.php +++ b/code/forms/GridFieldSortableRows.php @@ -163,7 +163,7 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP if (!$many_many) { $sng=singleton($gridField->getModelClass()); $fieldType=$sng->db($this->sortColumn); - if(!$fieldType || !($fieldType=='Int' || is_subclass_of('Int', $fieldType))) { + if(!$fieldType || !(strtolower($fieldType) == 'int' || is_subclass_of('Int', $fieldType))) { if(is_array($fieldType)) { user_error('Sort column '.$this->sortColumn.' could not be found in '.$gridField->getModelClass().'\'s ancestry', E_USER_ERROR); }else { @@ -571,4 +571,4 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP } } } -?> +?> \ No newline at end of file
Fixing bug "must be an Int, column is of type int"
diff --git a/javaobj/core.py b/javaobj/core.py index <HASH>..<HASH> 100644 --- a/javaobj/core.py +++ b/javaobj/core.py @@ -906,6 +906,9 @@ class JavaObjectUnmarshaller(JavaObjectConstants): and classdesc.flags & self.SC_WRITE_METHOD or classdesc.flags & self.SC_EXTERNALIZABLE and classdesc.flags & self.SC_BLOCK_DATA + or classdesc.superclass is not None + and classdesc.superclass.flags & self.SC_SERIALIZABLE + and classdesc.superclass.flags & self.SC_WRITE_METHOD ): # objectAnnotation log_debug(
Read annotations if superclass dictates that
diff --git a/tests/test_connection.py b/tests/test_connection.py index <HASH>..<HASH> 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -62,13 +62,15 @@ async def test_getinfo(conn): assert data in (pg, sqlite, mysql) -@pytest.mark.parametrize('db', ['sqlite']) +@pytest.mark.parametrize('db', ['mysql']) @pytest.mark.run_loop async def test_output_conversion(conn, table): def convert(value): - # `value` will be a string. We'll simply add an X at the + # value will be a string. We'll simply add an X at the # beginning at the end. - return 'X' + value + 'X' + if isinstance(value, str): + return 'X' + value + 'X' + return b'X' + value + b'X' await conn.add_output_converter(pyodbc.SQL_VARCHAR, convert) cur = await conn.cursor() @@ -77,7 +79,7 @@ async def test_output_conversion(conn, table): await cur.execute("SELECT v FROM t1 WHERE n=3;") (value,) = await cur.fetchone() - assert value == 'X123.45X' + assert value in (b'X123.45X', 'X123.45X') # Now clear the conversions and try again. There should be # no Xs this time.
update test to work with new pyodbc
diff --git a/tests/Html/HtmlStringTest.php b/tests/Html/HtmlStringTest.php index <HASH>..<HASH> 100644 --- a/tests/Html/HtmlStringTest.php +++ b/tests/Html/HtmlStringTest.php @@ -20,15 +20,18 @@ class HtmlStringTest extends TestCase * @var HtmlString */ private $instance; - - + + /** + * @var string + */ private $message; public function setUp() { parent::setUp(); $this->message = "A message send on chat"; - $driver = $this->createMock(Embera::class); + $driver = $this->getMockBuilder(Embera::class) + ->getMock(); $driver->method('autoEmbed') ->willReturn($this->message); $this->instance = new HtmlString($this->message, $driver); @@ -49,12 +52,12 @@ class HtmlStringTest extends TestCase { $this->assertInstanceOf(Htmlable::class, $this->instance); } - + public function testHasEmberaDriver() { $this->assertInstanceOf(Embera::class, $this->instance->getDriver()); } - + public function testToHtmlIsString() { $this->assertEquals($this->message, $this->instance->toHtml());
Used getMockBuilder for compatibility with older versions of PHPUnit
diff --git a/src/ossos/core/ossos/astrom.py b/src/ossos/core/ossos/astrom.py index <HASH>..<HASH> 100644 --- a/src/ossos/core/ossos/astrom.py +++ b/src/ossos/core/ossos/astrom.py @@ -219,14 +219,14 @@ class AstromParser(object): The file contents extracted into a data structure for programmatic access. """ - filehandle = storage.open_vos_or_local(filename, "r") + filehandle = storage.open_vos_or_local(filename, "rb") assert filehandle is not None, "Failed to open file {} ".format(filename) - filestr = filehandle.read() + filestr = filehandle.read().decode('utf-8') filehandle.close() assert filestr is not None, "File contents are None" - observations = self._parse_observation_list(filestr) + observations = self._parse_observation_list(str(filestr)) self._parse_observation_headers(filestr, observations) @@ -1098,6 +1098,9 @@ class Observation(object): try: self._header = storage.get_mopheader(self.expnum, self.ccdnum, self.ftype, self.fk) except Exception as ex: + etype, value, tb = mih.exception + import traceback + traceback.print_tb(tb, file=sys.stdout) logger.error(str(ex)) self._header = self.astheader return self._header
Open files in binary mode and decode into ascii, for consistancy with VOSpace behaviour
diff --git a/nl/validation.php b/nl/validation.php index <HASH>..<HASH> 100644 --- a/nl/validation.php +++ b/nl/validation.php @@ -60,7 +60,7 @@ return [ 'regex' => ':attribute formaat is ongeldig.', 'required' => ':attribute is verplicht.', 'required_if' => ':attribute is verplicht indien :other gelijk is aan :value.', - 'required_unless' => ':attribute is verplicht tenzij :other voorkomt in :values.', + 'required_unless' => ':attribute is verplicht tenzij :other gelijk is aan :values.', 'required_with' => ':attribute is verplicht i.c.m. :values', 'required_with_all' => ':attribute is verplicht i.c.m. :values', 'required_without' => ':attribute is verplicht als :values niet ingevuld is.',
Changed confusing Dutch phrasing for required_unless The Dutch phrase is confusing, it will say: ``admin password is verplicht tenzij rol voorkomt in admin, moderator`` (``admin password is required unless role occurs in admin, moderator``) Whereas this makes more sense: ``admin password is verplicht tenzij rol gelijk is aan admin, moderator`` (``admin password is required unless role is equal to admin, moderator``)
diff --git a/source/rafcon/mvc/controllers/state_overview.py b/source/rafcon/mvc/controllers/state_overview.py index <HASH>..<HASH> 100644 --- a/source/rafcon/mvc/controllers/state_overview.py +++ b/source/rafcon/mvc/controllers/state_overview.py @@ -176,10 +176,13 @@ class StateOverviewController(ExtendedController, Model): logger.debug("Change type of State '{0}' from {1} to {2}".format(state_name, type(self.model.state), target_class)) - if self.model.state.is_root_state: - self.model.state.parent.change_root_state_type(target_class) - else: - self.model.state.parent.change_state_type(self.model.state, target_class) + try: + if self.model.state.is_root_state: + self.model.state.parent.change_root_state_type(target_class) + else: + self.model.state.parent.change_state_type(self.model.state, target_class) + except Exception as e: + logger.error("An error occurred while changing the state type: {0}".format(e)) else: logger.debug("DON'T Change type of State '{0}' from {1} to {2}".format(self.model.state.name,
Catch exception when changing state type in state overview
diff --git a/backtrader/writer.py b/backtrader/writer.py index <HASH>..<HASH> 100644 --- a/backtrader/writer.py +++ b/backtrader/writer.py @@ -171,7 +171,7 @@ class WriterFile(WriterBase): if recurse: kline += '- ' - kline += key + ':' + kline += str(key) + ':' try: sclass = issubclass(val, LineSeries)
Addresses #<I> - writer fails with analyzers that have keys which are not strings
diff --git a/plenum/common/util.py b/plenum/common/util.py index <HASH>..<HASH> 100644 --- a/plenum/common/util.py +++ b/plenum/common/util.py @@ -21,6 +21,7 @@ from typing import TypeVar, Iterable, Mapping, Set, Sequence, Any, Dict, \ import base58 import libnacl.secret +from libnacl import randombytes_uniform import psutil from jsonpickle import encode, decode from six import iteritems, string_types @@ -54,7 +55,10 @@ def randomString(size: int = 20, chars = list(chars) def randomChar(): - return random.choice(chars) + # DONOT use random.choice its as PRNG not secure enough for our needs + # return random.choice(chars) + rn = randombytes_uniform(len(chars)) + return chars[rn] return ''.join(randomChar() for _ in range(size))
Use secure random number generator for randomString() Current usage of random.choice() is not secure so replaced that with libsodium provided randombytes_uniform() which is secure and also available on all platforms where libsodium is available
diff --git a/src/main/java/com/github/davidcarboni/restolino/api/Api.java b/src/main/java/com/github/davidcarboni/restolino/api/Api.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/github/davidcarboni/restolino/api/Api.java +++ b/src/main/java/com/github/davidcarboni/restolino/api/Api.java @@ -2,6 +2,7 @@ package com.github.davidcarboni.restolino.api; import java.io.IOException; import java.lang.annotation.Annotation; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; @@ -413,7 +414,9 @@ public class Api { // Chances are the exception we've actually caught is the reflection // one from Method.invoke(...) - Throwable caught = t.getCause(); + Throwable caught = t; + if (InvocationTargetException.class.isAssignableFrom(t.getClass())) + caught = t.getCause(); handleError(request, response, requestHandler, caught); }
Experimenting with more subtle error handling.
diff --git a/tests/modules/qemu/test_qemu_vm.py b/tests/modules/qemu/test_qemu_vm.py index <HASH>..<HASH> 100644 --- a/tests/modules/qemu/test_qemu_vm.py +++ b/tests/modules/qemu/test_qemu_vm.py @@ -382,10 +382,3 @@ def test_options(vm): vm.options = "-usb" assert vm.options == "-usb" assert vm.kvm is False - - -def test_options_kvm(vm): - vm.kvm = False - vm.options = "-usb -enable-kvm" - assert vm.options == "-usb" - assert vm.kvm is True
Fix the tests after the removal of the KVM flag from VM
diff --git a/lib/entity-base.js b/lib/entity-base.js index <HASH>..<HASH> 100644 --- a/lib/entity-base.js +++ b/lib/entity-base.js @@ -60,14 +60,14 @@ Entity.prototype._normalizeError = function(err) { var error = new appError.Validation(err); switch(err.code) { case 11000: - var items = err.err.match(/key error index:\s(.+)\.(\w+)\.\$([\w\_]+)\s/); + var items = err.errmsg.match(/key error index:\s(.+)\.(\w+)\.\$([\w\_]+)\s/); // error.db = items[1]; // error.collection = items[2]; error.index = items[3]; error.message = 'Duplicate record found'; // now cleanup the error object - delete error.err; + delete error.errmsg; delete error.code; delete error.n; delete error.connectionId;
update err path for mongoose 4.x
diff --git a/storage_pool.go b/storage_pool.go index <HASH>..<HASH> 100644 --- a/storage_pool.go +++ b/storage_pool.go @@ -55,6 +55,11 @@ type StoragePoolTarget struct { type StoragePoolSourceFormat struct { Type string `xml:"type,attr"` } + +type StoragePoolSourceProtocol struct { + Version string `xml:"ver,attr"` +} + type StoragePoolSourceHost struct { Name string `xml:"name,attr"` Port string `xml:"port,attr,omitempty"` @@ -133,6 +138,7 @@ type StoragePoolSource struct { Vendor *StoragePoolSourceVendor `xml:"vendor"` Product *StoragePoolSourceProduct `xml:"product"` Format *StoragePoolSourceFormat `xml:"format"` + Protocol *StoragePoolSourceProtocol `xml:"protocol"` Adapter *StoragePoolSourceAdapter `xml:"adapter"` Initiator *StoragePoolSourceInitiator `xml:"initiator"` }
Add support for storage pool source protocol version
diff --git a/lib/wed/wed_init.js b/lib/wed/wed_init.js index <HASH>..<HASH> 100644 --- a/lib/wed/wed_init.js +++ b/lib/wed/wed_init.js @@ -977,6 +977,10 @@ wed's generic help. The link by default will open in a new tab.</p>"); // initialized, which may take a bit. var me = this; this._saver.whenCondition("initialized", function () { + // We could be destroyed while waiting... + if (me._destroyed) + return; + me._setCondition("initialized", {editor: me}); }); }
Don't emit an event if the editor is destroyed.
diff --git a/app/src/Bolt/Composer/CommandRunner.php b/app/src/Bolt/Composer/CommandRunner.php index <HASH>..<HASH> 100644 --- a/app/src/Bolt/Composer/CommandRunner.php +++ b/app/src/Bolt/Composer/CommandRunner.php @@ -40,7 +40,9 @@ class CommandRunner public function installed() { $response = $this->execute("show -i"); - $response = implode("<br>", $response); + print_r($response); exit; + $response = implode("<br><br>", $response); + $response = str_replace("\t","<br>", $response); return $response; }
# This is a combination of 2 commits. # The first commit's message is: formatting # The 2nd commit message will be skipped: # formatting
diff --git a/equality_matchers.go b/equality_matchers.go index <HASH>..<HASH> 100644 --- a/equality_matchers.go +++ b/equality_matchers.go @@ -48,6 +48,15 @@ func isUnsignedInteger(v reflect.Value) bool { return false } +func isFloat(v reflect.Value) bool { + switch v.Kind() { + case reflect.Float32, reflect.Float64: + return true + } + + return false +} + func checkAgainstInt(e int64, v reflect.Value) (res MatchResult, err string) { res = MATCH_FALSE @@ -62,6 +71,11 @@ func checkAgainstInt(e int64, v reflect.Value) (res MatchResult, err string) { res = MATCH_TRUE } + case isFloat(v): + if (float64(e) == v.Float()) { + res = MATCH_TRUE + } + default: res = MATCH_UNDEFINED err = "which is not numeric"
Added support for floats.
diff --git a/lib/cinch/base.rb b/lib/cinch/base.rb index <HASH>..<HASH> 100644 --- a/lib/cinch/base.rb +++ b/lib/cinch/base.rb @@ -76,15 +76,6 @@ module Cinch # Default listeners on(:ping) {|m| @irc.pong(m.text) } - on(433) do |m| - @options.nick += @options.nick_suffix - @irc.nick @options.nick - end - - if @options.respond_to?(:channels) - on("004") { @options.channels.each {|c| @irc.join(c) } } - end - on(:ctcp, :version) {|m| m.ctcp_reply "Cinch IRC Bot Building Framework v#{Cinch::VERSION}"} end @@ -236,6 +227,16 @@ module Cinch # Run run run def run + # Configure some runtime listeners + on(433) do |m| + @options.nick += @options.nick_suffix + @irc.nick @options.nick + end + + if @options.respond_to?(:channels) + on("004") { @options.channels.each {|c| @irc.join(c) } } + end + @irc.connect options.server, options.port @irc.pass options.password if options.password @irc.nick options.nick
moved runtime listener configuration from #initialize to #run. Fixes bug pointed out by cardioid
diff --git a/tests/test_api.py b/tests/test_api.py index <HASH>..<HASH> 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -4,6 +4,8 @@ from unittest import TestCase +import gevent.hub + from mock import mock_open, patch from paramiko import ( PasswordRequiredException, @@ -32,6 +34,9 @@ from .paramiko_util import ( FakeSSHClient, ) +# Don't print out exceptions inside greenlets (because here we expect them!) +gevent.hub.Hub.NOT_ERROR = (Exception,) + def make_inventory(hosts=('somehost', 'anotherhost'), **kwargs): return Inventory( @@ -117,10 +122,6 @@ class TestSSHApi(TestCase): self.assertEqual(len(state.active_hosts), 2) def test_connect_all_password(self): - ''' - Ensure we can connect using a password. - ''' - inventory = make_inventory(ssh_password='test') # Get a host
Don't print greenlet exceptions during the API tests.
diff --git a/pyprophet/main.py b/pyprophet/main.py index <HASH>..<HASH> 100644 --- a/pyprophet/main.py +++ b/pyprophet/main.py @@ -11,7 +11,7 @@ except: from pyprophet import PyProphet from config import standard_config, fix_config_types -import sys +import sys, time def print_help(): print @@ -103,9 +103,12 @@ def main(): print return + start_at = time.time() summ_stat, final_stat, scored_table = PyProphet().process_csv(path, delim_in, config) + needed = time.time() - start_at + print print "="*78 print @@ -121,3 +124,17 @@ def main(): scored_table.to_csv(scored_table_path, sep=delim_out) print "WRITTEN: ", scored_table_path print + + seconds = int(needed) + msecs = int(1000*(needed-seconds)) + minutes = int(needed/60.0) + + print "NEEDED", + if minutes: + print minutes, "minutes and", + + print "%d seconds and %d msecs wall time" % (seconds, msecs) + print + + +
[FEATURE] output needed wall time
diff --git a/src/org/selfip/bkimmel/util/ClassUtil.java b/src/org/selfip/bkimmel/util/ClassUtil.java index <HASH>..<HASH> 100644 --- a/src/org/selfip/bkimmel/util/ClassUtil.java +++ b/src/org/selfip/bkimmel/util/ClassUtil.java @@ -26,7 +26,7 @@ public final class ClassUtil { * bytecode definition may be read. */ public static InputStream getClassAsStream(Class<?> cl) { - String resourceName = cl.getName() + ".class"; + String resourceName = cl.getSimpleName() + ".class"; return cl.getResourceAsStream(resourceName); }
Bug fix: full class name needed to get class definition resource.
diff --git a/lib/bigfloat/binfloat.rb b/lib/bigfloat/binfloat.rb index <HASH>..<HASH> 100644 --- a/lib/bigfloat/binfloat.rb +++ b/lib/bigfloat/binfloat.rb @@ -36,9 +36,28 @@ class BinFloat < Num super(BinFloat, *options) end - end + # The special values are normalized for binary floats: this keeps the context precision in the values + # which will be used in conversion to decimal text to yield more natural results. + + # Normalized epsilon; see Num::Context.epsilon() + def epsilon(sign=+1) + super.normalize + end + + # Normalized strict epsilon; see Num::Context.epsilon() + def strict_epsilon(sign=+1) + super.normalize + end + + # Normalized strict epsilon; see Num::Context.epsilon() + def half_epsilon(sign=+1) + super.normalize - class <<self + end + + end # BinFloat::Context + + class <<self # BinFloat class methods def base_coercible_types unless defined? @base_coercible_types @@ -67,6 +86,7 @@ class BinFloat < Num end @base_coercible_types end + end # the DefaultContext is the base for new contexts; it can be changed. @@ -248,6 +268,11 @@ class BinFloat < Num BinFloat(x.to_s, binfloat_context) end + # For BinFloat the generic Num#ulp() is normalized + def ulp(context=nil, mode=:low) + super(context, mode).normalize(context) + end + private # Convert to a text literal in the specified base. If the result is
BinFloat epsilons and ulps are normalized now.
diff --git a/js/forms.js b/js/forms.js index <HASH>..<HASH> 100644 --- a/js/forms.js +++ b/js/forms.js @@ -144,14 +144,31 @@ hiddenDiv.css('width', $(window).width()/2); } - $textarea.css('height', hiddenDiv.height()); + /** + * Resize if the new height is greater than the + * original height of the textarea + */ + if($textarea.data("original-height") <= hiddenDiv.height()){ + $textarea.css('height', hiddenDiv.height()); + }else if($textarea.val().length < $textarea.data("previous-length")){ + /** + * In case the new height is less than original height, it + * means the textarea has less text than before + * So we set the height to the original one + */ + $textarea.css('height', $textarea.data("original-height")); + } + $textarea.data("previous-length", $textarea.val().length); } $(text_area_selector).each(function () { var $textarea = $(this); - if ($textarea.val().length) { - textareaAutoResize($textarea); - } + /** + * Instead of resizing textarea on document load, + * store the original height and the original length + */ + $textarea.data("original-height", $textarea.height()); + $textarea.data("previous-length", $textarea.val().length); }); $('body').on('keyup keydown autoresize', text_area_selector, function () {
Fixed Textarea Resizing Bug Instead of setting the height of textarea default on document load, MZ should store the height and then resize textarea according to the length and the original height of the textarea.
diff --git a/pandas/tests/extension/base/casting.py b/pandas/tests/extension/base/casting.py index <HASH>..<HASH> 100644 --- a/pandas/tests/extension/base/casting.py +++ b/pandas/tests/extension/base/casting.py @@ -1,6 +1,8 @@ import numpy as np import pytest +import pandas.util._test_decorators as td + import pandas as pd from pandas.core.internals import ObjectBlock from pandas.tests.extension.base.base import BaseExtensionTests @@ -43,8 +45,19 @@ class BaseCastingTests(BaseExtensionTests): expected = pd.Series([str(x) for x in data[:5]], dtype=str) self.assert_series_equal(result, expected) + @pytest.mark.parametrize( + "nullable_string_dtype", + [ + "string", + pytest.param( + "arrow_string", marks=td.skip_if_no("pyarrow", min_version="1.0.0") + ), + ], + ) def test_astype_string(self, data, nullable_string_dtype): # GH-33465 + from pandas.core.arrays.string_arrow import ArrowStringDtype # noqa: F401 + result = pd.Series(data[:5]).astype(nullable_string_dtype) expected = pd.Series([str(x) for x in data[:5]], dtype=nullable_string_dtype) self.assert_series_equal(result, expected)
TST: fix casting extension tests for external users (#<I>)
diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index <HASH>..<HASH> 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -196,8 +196,7 @@ EOT } $locker = $composer->getLocker(); $lockedRepo = $locker->getLockedRepository(true); - $installedRepo = new InstalledRepository(array($lockedRepo)); - $repos = new CompositeRepository(array_merge(array($installedRepo), $composer->getRepositoryManager()->getRepositories())); + $repos = $installedRepo = new InstalledRepository(array($lockedRepo)); } else { // --installed / default case if (!$composer) { @@ -349,7 +348,7 @@ EOT foreach ($repos as $repo) { if ($repo === $platformRepo) { $type = 'platform'; - } elseif($lockedRepo !== null && $repo === $lockedRepo) { + } elseif ($lockedRepo !== null && $repo === $lockedRepo) { $type = 'locked'; } elseif ($repo === $installedRepo || in_array($repo, $installedRepo->getRepositories(), true)) { $type = 'installed';
Fix show --locked to avoid listing all the things
diff --git a/docs/storage/driver/rados/rados.go b/docs/storage/driver/rados/rados.go index <HASH>..<HASH> 100644 --- a/docs/storage/driver/rados/rados.go +++ b/docs/storage/driver/rados/rados.go @@ -404,7 +404,7 @@ func (d *driver) List(ctx context.Context, dirPath string) ([]string, error) { files, err := d.listDirectoryOid(dirPath) if err != nil { - return nil, err + return nil, storagedriver.PathNotFoundError{Path: dirPath} } keys := make([]string, 0, len(files))
driver/rados: treat OMAP EIO as a PathNotFoundError RADOS returns a -EIO when trying to read a non-existing OMAP, treat it as a PathNotFoundError when trying to list a non existing virtual directory.
diff --git a/sling/core/console/src/main/resources/root/libs/composum/nodes/console/browser/js/browser.js b/sling/core/console/src/main/resources/root/libs/composum/nodes/console/browser/js/browser.js index <HASH>..<HASH> 100644 --- a/sling/core/console/src/main/resources/root/libs/composum/nodes/console/browser/js/browser.js +++ b/sling/core/console/src/main/resources/root/libs/composum/nodes/console/browser/js/browser.js @@ -97,7 +97,7 @@ copy: false, check_while_dragging: false, drag_selection: false, - touch: 'selection', + touch: false, //'selection', large_drag_target: true, large_drop_target: true, use_html5: false
fix for the scroll issue (tree) on touch devices
diff --git a/osc/osc_test.go b/osc/osc_test.go index <HASH>..<HASH> 100644 --- a/osc/osc_test.go +++ b/osc/osc_test.go @@ -362,7 +362,7 @@ func TestWritePaddedString(t *testing.T) { if got, want := n, tt.n; got != want { t.Errorf("%s: Count of bytes written don't match; got = %d, want = %d", tt.s, got, want) } - if got, want := bytesBuffer, tt.buf; bytes.Equal(got, want) { + if got, want := bytesBuffer, tt.buf; bytes.Equal(got.Bytes(), want) { t.Errorf("%s: Buffers don't match; got = %s, want = %s", tt.s, got.Bytes(), want) } }
Fix the type of an argument to equal
diff --git a/oscrypto/trust_list.py b/oscrypto/trust_list.py index <HASH>..<HASH> 100644 --- a/oscrypto/trust_list.py +++ b/oscrypto/trust_list.py @@ -130,6 +130,8 @@ def get_path(temp_dir=None, cache_length=24, cert_callback=None): if cert_callback: cert_callback(Certificate.load(cert), 'explicitly distrusted for TLS') continue + if cert_callback: + cert_callback(Certificate.load(cert), None) f.write(armor('CERTIFICATE', cert)) if not ca_path:
Fix regression in trust_list.get_path() not calling the cert callback when a certificate is exported
diff --git a/troposphere/ec2.py b/troposphere/ec2.py index <HASH>..<HASH> 100644 --- a/troposphere/ec2.py +++ b/troposphere/ec2.py @@ -464,9 +464,9 @@ class Volume(AWSObject): 'AutoEnableIO': (boolean, False), 'AvailabilityZone': (basestring, True), 'Encrypted': (boolean, False), - 'Iops': (integer, False), + 'Iops': (positive_integer, False), 'KmsKeyId': (basestring, False), - 'Size': (basestring, False), + 'Size': (positive_integer, False), 'SnapshotId': (basestring, False), 'Tags': (list, False), 'VolumeType': (basestring, False),
Size/IOPS should be positive_integers (#<I>) This isn't <I>% correct, only because positive_integers allows for a value of 0, but changing that functionality seems like it'd break things elsewhere.
diff --git a/spec/victor/svg_spec.rb b/spec/victor/svg_spec.rb index <HASH>..<HASH> 100644 --- a/spec/victor/svg_spec.rb +++ b/spec/victor/svg_spec.rb @@ -134,6 +134,17 @@ describe SVG do end expect(subject.content).to eq ["<universe>", "<world>", "<me />", "</world>", "</universe>"] end + + it "ignores the block's return value", :focus do + subject.build do + element :group do + element :one + element :two + element :three if false + end + end + expect(subject.content).to eq ["<group>", "<one />", "<two />", "</group>"] + end end context "with a plain text value" do
add specs to test the case broken by the element refactor
diff --git a/cell/executor_test.go b/cell/executor_test.go index <HASH>..<HASH> 100644 --- a/cell/executor_test.go +++ b/cell/executor_test.go @@ -16,6 +16,7 @@ import ( "github.com/cloudfoundry-incubator/inigo/helpers" "github.com/cloudfoundry-incubator/inigo/inigo_announcement_server" "github.com/cloudfoundry-incubator/receptor" + "github.com/cloudfoundry-incubator/rep" "github.com/cloudfoundry-incubator/runtime-schema/models" "github.com/cloudfoundry-incubator/runtime-schema/models/factories" . "github.com/onsi/ginkgo" @@ -178,11 +179,12 @@ var _ = Describe("Executor", func() { }).Should(HaveLen(1)) instanceGuid = actualLRPs[0].InstanceGuid + containerGuid := rep.LRPContainerGuid(processGuid, instanceGuid) executorClient := componentMaker.ExecutorClient() Eventually(func() executor.State { - container, err := executorClient.GetContainer(instanceGuid) + container, err := executorClient.GetContainer(containerGuid) if err == nil { return container.State }
Instance guid != container guid [#<I>]
diff --git a/lib/smalltalk.js b/lib/smalltalk.js index <HASH>..<HASH> 100644 --- a/lib/smalltalk.js +++ b/lib/smalltalk.js @@ -104,7 +104,7 @@ function showDialog(title, msg, value, buttons, options) { } function keyDown(dialog, ok, cancel) { - return event => { + return (event) => { const KEY = { ENTER : 13, ESC : 27, @@ -122,8 +122,6 @@ function keyDown(dialog, ok, cancel) { const names = find(dialog, namesAll) .map(getDataName); - let is; - switch(keyCode) { case KEY.ENTER: closeDialog(el, dialog, ok, cancel); @@ -144,12 +142,11 @@ function keyDown(dialog, ok, cancel) { break; default: - is = ['left', 'right', 'up', 'down'].some((name) => { + ['left', 'right', 'up', 'down'].filter((name) => { return keyCode === KEY[name.toUpperCase()]; - }); - - if (is) + }).forEach(() => { changeButtonFocus(dialog, names); + }); break; }
refactor(keydown) let, some -> filter
diff --git a/DependencyInjection/Compiler/EasyAdminFormTypePass.php b/DependencyInjection/Compiler/EasyAdminFormTypePass.php index <HASH>..<HASH> 100644 --- a/DependencyInjection/Compiler/EasyAdminFormTypePass.php +++ b/DependencyInjection/Compiler/EasyAdminFormTypePass.php @@ -34,5 +34,16 @@ class EasyAdminFormTypePass implements CompilerPassInterface $guesserChain = new Definition('Symfony\Component\Form\FormTypeGuesserChain', array($guessers)); $formTypeDefinition->replaceArgument(2, $guesserChain); + + if (!$this->isLegacySymfonyForm()) { + $formTypeDefinition->setTags(array('form.type' => array( + array('alias' => 'JavierEguiluz\\Bundle\\EasyAdminBundle\\Form\\Type\\EasyAdminFormType') + ))); + } + } + + private function isLegacySymfonyForm() + { + return false === method_exists('JavierEguiluz\Bundle\EasyAdminBundle\Form\Type\EasyAdminFormType', 'getBlockPrefix'); } }
I don't know what I'm doing
diff --git a/ovp_core/migrations/0004_load_skills_and_causes.py b/ovp_core/migrations/0004_load_skills_and_causes.py index <HASH>..<HASH> 100644 --- a/ovp_core/migrations/0004_load_skills_and_causes.py +++ b/ovp_core/migrations/0004_load_skills_and_causes.py @@ -20,7 +20,7 @@ def load_data(apps, schema_editor): c = Cause(name=cause) c.save() -def unload_data(apps, schema_editor): +def unload_data(apps, schema_editor): #pragma: no cover Skill = apps.get_model("ovp_core", "Skill") Cause = apps.get_model("ovp_core", "Cause")
Add pragma: no cover to migration data unload
diff --git a/go/vt/workflow/manager_test.go b/go/vt/workflow/manager_test.go index <HASH>..<HASH> 100644 --- a/go/vt/workflow/manager_test.go +++ b/go/vt/workflow/manager_test.go @@ -22,7 +22,8 @@ func startManager(t *testing.T, m *Manager) (*sync.WaitGroup, context.CancelFunc }() // Wait for the manager to start, by watching its ctx object. - for timeout := 0; ; timeout++ { + timeout := 0 + for { m.mu.Lock() running := m.ctx != nil m.mu.Unlock() @@ -96,7 +97,8 @@ func TestManagerRestart(t *testing.T) { wg, cancel = startManager(t, m) // Make sure the job is in there shortly. - for timeout := 0; ; timeout++ { + timeout := 0 + for { tree, err := m.NodeManager().GetFullTree() if err != nil { t.Fatalf("cannot get full node tree: %v", err)
Fixing timeouts in workflow tests. Although I don't see how that triggers the 'go test -race' timing out fater <I> minutes.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ setup( version = __version__, packages = ['argh'], provides = ['argh'], - requires = ['python(>=2.5)', 'argparse(>=1.1)'], + requires = ['python(>=2.6)', 'argparse(>=1.1)'], install_requires = ['argparse>=1.1'], # for Python 2.6 (no bundled argparse; setuptools is likely to exist) # copyright
Update setup.py: support for Python ≤ <I> was dropped since Argh <I>
diff --git a/grade/report/grader/lib.php b/grade/report/grader/lib.php index <HASH>..<HASH> 100644 --- a/grade/report/grader/lib.php +++ b/grade/report/grader/lib.php @@ -391,8 +391,7 @@ class grade_report_grader extends grade_report { list($enrolledsql, $enrolledparams) = get_enrolled_sql($this->context); //fields we need from the user table - $userfields = user_picture::fields('u'); - $userfields .= get_extra_user_fields_sql($this->context); + $userfields = user_picture::fields('u', get_extra_user_fields($this->context)); $sortjoin = $sort = $params = null;
MDL-<I> duplicated columns cause Oracle error in grader report
diff --git a/test/test_remote.py b/test/test_remote.py index <HASH>..<HASH> 100644 --- a/test/test_remote.py +++ b/test/test_remote.py @@ -100,9 +100,6 @@ run: time.sleep(20) out = subprocess.check_output('sos status {} -c docker.yml -q docker'.format(tasks), shell=True).decode() self.assertEqual(out.count('completed'), len(res['pending_tasks'])) - # now, local status should still be pending - out = subprocess.check_output('sos status {} -c docker.yml'.format(tasks), shell=True).decode() - self.assertEqual(out.count('pending'), len(res['pending_tasks'])) Host.reset() # until we run the workflow again
Try again to fix travis CI tests
diff --git a/src/sync.js b/src/sync.js index <HASH>..<HASH> 100644 --- a/src/sync.js +++ b/src/sync.js @@ -15,7 +15,8 @@ const configDefaults = { remove: false }, files: [], - include: [] + include: [], + includes: [] }; const optionDefaults = { @@ -48,9 +49,12 @@ async function sync(cfg, opt) { ); } + // Make include alias includes for backward compat, for now. + cfg.includes = cfg.includes.concat(cfg.include); + // If there's no files or includes, it's not really an error but there's // nothing to do. - if (!cfg.files.length && !cfg.include.length) { + if (!cfg.files.length && !cfg.includes.length) { console.warn( 'You have not provided any "files" or "includes". For more information see https://github.com/treshugart/conartist#install for ways you can configure conartist.' ); @@ -66,7 +70,7 @@ async function sync(cfg, opt) { } // Includes are like Babel plugins. - for (let inc of cfg.include) { + for (let inc of cfg.includes) { let arg; // Like in Babel configs, you can specify an array to pass options to
Make "includes" work along-side "include" for backward compat.
diff --git a/src/main/java/fr/wseduc/webutils/http/Renders.java b/src/main/java/fr/wseduc/webutils/http/Renders.java index <HASH>..<HASH> 100644 --- a/src/main/java/fr/wseduc/webutils/http/Renders.java +++ b/src/main/java/fr/wseduc/webutils/http/Renders.java @@ -171,9 +171,8 @@ public class Renders { } path = "view/" + template + ".html"; } - Template t = templates.get(path); - if (t != null) { - handler.handle(t); + if (!"dev".equals(container.config().getString("mode")) && templates.containsKey(path)) { + handler.handle(templates.get(path)); } else { final String p = path; vertx.fileSystem().readFile(p, new Handler<AsyncResult<Buffer>>() { @@ -182,7 +181,11 @@ public class Renders { if (ar.succeeded()) { Mustache.Compiler compiler = Mustache.compiler().defaultValue(""); Template template = compiler.compile(ar.result().toString("UTF-8")); - templates.putIfAbsent(p, template); + if("dev".equals(container.config().getString("mode"))) { + templates.put(p, template); + } else { + templates.putIfAbsent(p, template); + } handler.handle(template); } else { handler.handle(null);
[render] Do not cache server view in dev mode
diff --git a/ui/build/build.api.js b/ui/build/build.api.js index <HASH>..<HASH> 100644 --- a/ui/build/build.api.js +++ b/ui/build/build.api.js @@ -146,6 +146,18 @@ const objectTypes = { isBoolean: [ 'internal' ] }, + Event: { + props: [ 'desc', 'required', 'category', 'examples', 'addedIn', 'internal' ], + required: [ 'desc' ], + isBoolean: [ 'internal' ] + }, + + SubmitEvent: { + props: [ 'desc', 'required', 'category', 'examples', 'addedIn', 'internal' ], + required: [ 'desc' ], + isBoolean: [ 'internal' ] + }, + // component only slots: { props: [ 'desc', 'link', 'scope', 'addedIn', 'internal' ],
chore(ui): fix build broken by previous PR #<I>
diff --git a/src/components/body/body.js b/src/components/body/body.js index <HASH>..<HASH> 100644 --- a/src/components/body/body.js +++ b/src/components/body/body.js @@ -190,8 +190,10 @@ var Body = { * Removes the component and all physics and scene side effects. */ remove: function () { - delete this.body.el; - delete this.body; + if (this.body) { + delete this.body.el; + delete this.body; + } delete this.el.body; delete this.wireframe; }, @@ -245,7 +247,7 @@ var Body = { this.wireframe.add(wireframe); } - + this.syncWireframe(); },
check for existence of body property in remove
diff --git a/driver/src/main/java/org/kaazing/k3po/driver/internal/netty/bootstrap/http/HttpBootstrapFactorySpi.java b/driver/src/main/java/org/kaazing/k3po/driver/internal/netty/bootstrap/http/HttpBootstrapFactorySpi.java index <HASH>..<HASH> 100644 --- a/driver/src/main/java/org/kaazing/k3po/driver/internal/netty/bootstrap/http/HttpBootstrapFactorySpi.java +++ b/driver/src/main/java/org/kaazing/k3po/driver/internal/netty/bootstrap/http/HttpBootstrapFactorySpi.java @@ -70,11 +70,11 @@ public class HttpBootstrapFactorySpi extends BootstrapFactorySpi { @Override public void shutdown() { - // ignore + serverChannelFactory.shutdown(); } @Override public void releaseExternalResources() { - // ignore + serverChannelFactory.releaseExternalResources(); } }
Not sure why shutdown and release external resources was ignored on http, I've added logic to shut them down
diff --git a/sonar-server/src/main/java/org/sonar/server/search/BaseIndex.java b/sonar-server/src/main/java/org/sonar/server/search/BaseIndex.java index <HASH>..<HASH> 100644 --- a/sonar-server/src/main/java/org/sonar/server/search/BaseIndex.java +++ b/sonar-server/src/main/java/org/sonar/server/search/BaseIndex.java @@ -31,8 +31,6 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.xcontent.XContentBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.server.search.IndexAction; -import org.sonar.server.search.IndexAction.Method; import org.sonar.core.cluster.WorkQueue; import org.sonar.core.db.Dao; import org.sonar.core.db.Dto; @@ -88,7 +86,7 @@ public abstract class BaseIndex<K extends Serializable, E extends Dto<K>> implem this.intializeIndex(); /* Launch synchronization */ - synchronizer.start(); +// synchronizer.start(); } @Override
Commented out synchronizer in BaseIndex
diff --git a/lib/setup.php b/lib/setup.php index <HASH>..<HASH> 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -36,6 +36,7 @@ * - $CFG->dataroot - Path to moodle data files directory on server's filesystem. * - $CFG->dirroot - Path to moodle's library folder on server's filesystem. * - $CFG->libdir - Path to moodle's library folder on server's filesystem. + * - $CFG->tempdir - Path to moodle's temp file directory on server's filesystem. * * @global object $CFG * @name $CFG @@ -96,6 +97,11 @@ if (!isset($CFG->admin)) { // Just in case it isn't defined in config.php // Set up some paths. $CFG->libdir = $CFG->dirroot .'/lib'; +// Allow overriding of tempdir but be backwards compatible with dataroot/temp +if (!isset($CFG->tempdir)) { + $CFG->tempdir = "$CFG->dataroot/temp"; +} + // The current directory in PHP version 4.3.0 and above isn't necessarily the // directory of the script when run from the command line. The require_once() // would fail, so we'll have to chdir()
MDL-<I> Added $CFG->tempdir setting
diff --git a/lib/ticketmaster/project.rb b/lib/ticketmaster/project.rb index <HASH>..<HASH> 100644 --- a/lib/ticketmaster/project.rb +++ b/lib/ticketmaster/project.rb @@ -34,7 +34,7 @@ module TicketMasterMod def tickets # Lets ask that cute little API if I have any tickets # associated with me, shall we? - self.const_get("#{@system}::Project").tickets(self) + TicketMasterMod.const_get(@system)::Project.tickets(self) end end end
Eval => const_get (faster, better, safer)
diff --git a/classes/Gems/Tracker.php b/classes/Gems/Tracker.php index <HASH>..<HASH> 100644 --- a/classes/Gems/Tracker.php +++ b/classes/Gems/Tracker.php @@ -235,7 +235,7 @@ class Gems_Tracker extends Gems_Loader_TargetLoaderAbstract implements Gems_Trac * @param array $trackFieldsData * @return Gems_Tracker_RespondentTrack The newly created track */ - public function createRespondentTrack($patientId, $organizationId, $trackId, $userId, $respTrackData = null, array $trackFieldsData = array()) + public function createRespondentTrack($patientId, $organizationId, $trackId, $userId, $respTrackData = array(), array $trackFieldsData = array()) { $trackEngine = $this->getTrackEngine($trackId); diff --git a/classes/Gems/Tracker/Token.php b/classes/Gems/Tracker/Token.php index <HASH>..<HASH> 100644 --- a/classes/Gems/Tracker/Token.php +++ b/classes/Gems/Tracker/Token.php @@ -118,7 +118,7 @@ class Gems_Tracker_Token extends Gems_Registry_TargetAbstract protected $survey; /** - * + * @deprecated MD: 20111108 Found no reference and defined class is missing. Remove? * @var Gems_Tracker_Track */ protected $track;
Added possible deprecated comment in Toke fixed Tracker->createRespondentTrack when no $respTrackData was given
diff --git a/pyvisa-py/highlevel.py b/pyvisa-py/highlevel.py index <HASH>..<HASH> 100644 --- a/pyvisa-py/highlevel.py +++ b/pyvisa-py/highlevel.py @@ -314,6 +314,19 @@ class PyVisaLibrary(highlevel.VisaLibraryBase): return ret + def read_stb(self, session): + """Reads a status byte of the service request. + Corresponds to viReadSTB function of the VISA library. + :param session: Unique logical identifier to a session. + :return: Service request status byte, return value of the library call. + :rtype: int, :class:`pyvisa.constants.StatusCode` + """ + try: + sess = self.sessions[session] + except KeyError: + return None, constants.StatusCode.error_invalid_object + return sess.read_stb() + def get_attribute(self, session, attribute): """Retrieves the state of an attribute.
Add missing read_stb() to high_level.py
diff --git a/lib/eggs.js b/lib/eggs.js index <HASH>..<HASH> 100644 --- a/lib/eggs.js +++ b/lib/eggs.js @@ -250,7 +250,7 @@ var factory = function(htmlString,options,ViewModel,callback){ tree = select(selector)(virtualdom); } if (!tree || !tree.length) { - if(callback) callback(null,null); + if(callback) callback(null,htmlString); return eggs; } else if (tree.length > 1){ var error = new Error('Eggs selectors must only match one node.'); diff --git a/test/view-engine/index.js b/test/view-engine/index.js index <HASH>..<HASH> 100644 --- a/test/view-engine/index.js +++ b/test/view-engine/index.js @@ -17,6 +17,9 @@ describe('eggs view engine',function(){ routes.push({ selector : '#index', viewmodel : require('../fixtures/viewmodels/index') + },{ + selector : '#fake', + viewmodel : function(){} }); app = express();
fix a bug where unmatched routes caused view engine to barf
diff --git a/score_test.go b/score_test.go index <HASH>..<HASH> 100644 --- a/score_test.go +++ b/score_test.go @@ -594,6 +594,31 @@ func TestScoreRejectMessageDeliveries(t *testing.T) { time.Sleep(1 * time.Millisecond) ps.deliveries.gc() + // insert a record in the message deliveries + ps.ValidateMessage(&msg) + + // this should have no effect in the score, and subsequent duplicate messages should have no + // effect either + ps.RejectMessage(&msg, rejectValidationIgnored) + ps.DuplicateMessage(&msg2) + + aScore = ps.Score(peerA) + expected = 0.0 + if aScore != expected { + t.Fatalf("Score: %f. Expected %f", aScore, expected) + } + + bScore = ps.Score(peerB) + expected = 0.0 + if bScore != expected { + t.Fatalf("Score: %f. Expected %f", aScore, expected) + } + + // now clear the delivery record + ps.deliveries.head.expire = time.Now() + time.Sleep(1 * time.Millisecond) + ps.deliveries.gc() + // insert a new record in the message deliveries ps.ValidateMessage(&msg)
add test for rejections with ignore validator decision
diff --git a/robotium-solo/src/main/java/com/jayway/android/robotium/solo/Getter.java b/robotium-solo/src/main/java/com/jayway/android/robotium/solo/Getter.java index <HASH>..<HASH> 100644 --- a/robotium-solo/src/main/java/com/jayway/android/robotium/solo/Getter.java +++ b/robotium-solo/src/main/java/com/jayway/android/robotium/solo/Getter.java @@ -60,7 +60,7 @@ class Getter { public <T extends TextView> T getView(Class<T> classToFilterBy, String text, boolean onlyVisible) { - T viewToReturn = (T) waiter.waitForText(classToFilterBy, text, 0, 10000, false, onlyVisible, false); + T viewToReturn = (T) waiter.waitForText(classToFilterBy, text, 0, Timeout.getSmallTimeout(), false, onlyVisible, false); if(viewToReturn == null) Assert.assertTrue(classToFilterBy.getSimpleName() + " with text: '" + text + "' is not found!", false);
Changed so that getView() uses Timeout.getSmallTimeout()
diff --git a/lib/core/util.js b/lib/core/util.js index <HASH>..<HASH> 100644 --- a/lib/core/util.js +++ b/lib/core/util.js @@ -47,12 +47,13 @@ function destroy (stream, err) { } } +const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)s/ function parseKeepAliveTimeout (headers) { for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0] if (key.length === 10 && key.toLowerCase() === 'keep-alive') { - const timeout = parseInt(headers[n + 1].split('timeout=', 2)[1]) - return timeout ? timeout * 1000 : undefined + const m = headers[n + 1].match(KEEPALIVE_TIMEOUT_EXPR) + return m ? parseInt(m[1]) * 1000 : null } } }
perf: parseKeepAliveTimeout The regex version is fastest.
diff --git a/hazelcast-client/src/main/java/com/hazelcast/client/impl/HazelcastClientInstanceImpl.java b/hazelcast-client/src/main/java/com/hazelcast/client/impl/HazelcastClientInstanceImpl.java index <HASH>..<HASH> 100644 --- a/hazelcast-client/src/main/java/com/hazelcast/client/impl/HazelcastClientInstanceImpl.java +++ b/hazelcast-client/src/main/java/com/hazelcast/client/impl/HazelcastClientInstanceImpl.java @@ -408,6 +408,7 @@ public class HazelcastClientInstanceImpl implements HazelcastInstance, Serializa return getDistributedObject(XAService.SERVICE_NAME, XAService.SERVICE_NAME); } + @Override public Config getConfig() { throw new UnsupportedOperationException("Client cannot access cluster config!"); } @@ -502,6 +503,7 @@ public class HazelcastClientInstanceImpl implements HazelcastInstance, Serializa return getDistributedObject(DistributedDurableExecutorService.SERVICE_NAME, name); } + @Override public <T> T executeTransaction(TransactionalTask<T> task) throws TransactionException { return transactionManager.executeTransaction(task); } @@ -623,6 +625,7 @@ public class HazelcastClientInstanceImpl implements HazelcastInstance, Serializa return config; } + @Override public SerializationService getSerializationService() { return serializationService; }
Added missing @Override annotations in HazelcastClientInstanceImpl.
diff --git a/lib/tire/model/search.rb b/lib/tire/model/search.rb index <HASH>..<HASH> 100644 --- a/lib/tire/model/search.rb +++ b/lib/tire/model/search.rb @@ -19,6 +19,9 @@ module Tire # module Search + def self.dependents + @dependents ||= Set.new + end # Alias for Tire::Model::Naming::ClassMethods.index_prefix # def self.index_prefix(*args) @@ -254,6 +257,7 @@ module Tire # A hook triggered by the `include Tire::Model::Search` statement in the model. # def self.included(base) + self.dependents << base base.class_eval do # Returns proxy to the _Tire's_ class methods.
[#<I>] Added `included` tracking to Model::Search
diff --git a/rake-tasks/crazy_fun/mappings/javascript.rb b/rake-tasks/crazy_fun/mappings/javascript.rb index <HASH>..<HASH> 100644 --- a/rake-tasks/crazy_fun/mappings/javascript.rb +++ b/rake-tasks/crazy_fun/mappings/javascript.rb @@ -837,7 +837,7 @@ module Javascript MAX_STR_LENGTH_JAVA = MAX_LINE_LENGTH_JAVA - " .append\(\"\"\)\n".length COPYRIGHT = "/*\n" + - " * Copyright 2011-2012 WebDriver committers\n" + + " * Copyright 2011-2014 Software Freedom Conservancy\n" + " *\n" + " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" + " * you may not use this file except in compliance with the License.\n" + @@ -1050,7 +1050,7 @@ module Javascript def generate_java(dir, name, task_name, output, js_files, package) file output => js_files do - task_name =~ /([a-z]+)-driver/ + task_name =~ /([a-z]+)-(driver|atoms)/ implementation = $1.capitalize output_dir = File.dirname(output) mkdir_p output_dir unless File.exists?(output_dir)
fix javascript to java build for 'android-atoms' update the copyright header that gets generated
diff --git a/lib/vagrant.rb b/lib/vagrant.rb index <HASH>..<HASH> 100644 --- a/lib/vagrant.rb +++ b/lib/vagrant.rb @@ -11,7 +11,7 @@ end require File.expand_path("util/glob_loader", libdir) # Load them up -Vagrant::GlobLoader.glob_require(libdir, %w{util/stacked_proc_runner +Vagrant::GlobLoader.glob_require(libdir, %w{util util/stacked_proc_runner downloaders/base config provisioners/base provisioners/chef systems/base commands/base commands/box action/exception_catcher hosts/base})
Include util.rb early so the included hook is set up properly. Fixes a NoMethodError running any command that invokes Environment.load!
diff --git a/src/manhole.py b/src/manhole.py index <HASH>..<HASH> 100644 --- a/src/manhole.py +++ b/src/manhole.py @@ -87,8 +87,8 @@ class Manhole(threading.Thread): self.sigmask = sigmask @staticmethod - def get_socket(): - sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + def get_socket(factory=None): + sock = (factory or socket.socket)(socket.AF_UNIX, socket.SOCK_STREAM) pid = os.getpid() name = "/tmp/manhole-%s" % pid if os.path.exists(name): @@ -212,9 +212,9 @@ def run_repl(): 'traceback': traceback, }).interact() -def _handle_oneshot(_signum, _frame): +def _handle_oneshot(_signum, _frame, _socket=socket._socketobject): try: - sock, pid = Manhole.get_socket() + sock, pid = Manhole.get_socket(_socket) cry("Waiting for new connection (in pid:%s) ..." % pid) client, _ = sock.accept() ManholeConnection.check_credentials(client)
Make oneshot use the original socket object (no more monkey business).
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -52,7 +52,7 @@ master_doc = 'index' # General information about the project. project = u'Dependency Injector' -copyright = u'2017, ETS Labs' +copyright = u'2020, ETS Labs' author = u'ETS Labs' # The version info for the project you're documenting, acts as replacement for
Update copyright year in the docs
diff --git a/code/libraries/koowa/libraries/http/token/token.php b/code/libraries/koowa/libraries/http/token/token.php index <HASH>..<HASH> 100644 --- a/code/libraries/koowa/libraries/http/token/token.php +++ b/code/libraries/koowa/libraries/http/token/token.php @@ -308,7 +308,7 @@ class KHttpToken extends KObject implements KHttpTokenInterface public function setIssueTime(DateTime $date) { $date->setTimezone(new DateTimeZone('UTC')); - $this->_claims['iat'] = $date->format('U'); + $this->_claims['iat'] = (int)$date->format('U'); return $this; }
re #<I>: Make sure JWT tokens follow the specs
diff --git a/pycannon/connection.py b/pycannon/connection.py index <HASH>..<HASH> 100644 --- a/pycannon/connection.py +++ b/pycannon/connection.py @@ -6,7 +6,7 @@ class Connection: Connection to go-cannon for sending emails. """ - def __init__(self, tls=False, host='localhost', port=8025, username=None, + def __init__(self, host='localhost', port=8025, tls=False, username=None, password=None): """ Provide the security information and credentials necessary to make @@ -26,8 +26,22 @@ class Connection: host, port, ) + def send(self, from_, to, subject, text, html='', cc=[], bcc=[]): + """ + Send an email using go-cannon. + """ + return self._session.post("{}/send".format(self._url), json={ + 'from': from_, + 'to': to, + 'cc': cc, + 'bcc': bcc, + 'subject': subject, + 'text': text, + 'html': html, + }).json() + def version(self): """ Obtain the current version of go-cannon. """ - return self._session.get("{}/version".format(self._url)).json()['version'] + return self._session.get("{}/version".format(self._url)).json()
Added /send method.
diff --git a/umi_tools/extract.py b/umi_tools/extract.py index <HASH>..<HASH> 100644 --- a/umi_tools/extract.py +++ b/umi_tools/extract.py @@ -311,7 +311,7 @@ def main(argv=None): U.error("option --retain-umi only works with --extract-method=regex") if (options.filtered_out and not options.extract_method == "regex" and - whitelist is None): + options.whitelist is None): U.error("Reads will not be filtered unless extract method is" "set to regex (--extract-method=regex) or cell" "barcodes are filtered (--whitelist)")
Insert missing "options" in test for white list conditions (#<I>) fixes #<I>
diff --git a/reflekt/src/main/java/io/advantageous/boon/core/value/LazyValueMap.java b/reflekt/src/main/java/io/advantageous/boon/core/value/LazyValueMap.java index <HASH>..<HASH> 100644 --- a/reflekt/src/main/java/io/advantageous/boon/core/value/LazyValueMap.java +++ b/reflekt/src/main/java/io/advantageous/boon/core/value/LazyValueMap.java @@ -217,7 +217,7 @@ public class LazyValueMap extends AbstractMap<String, Object> implements ValueMa } private final void buildMap() { - map = new HashMap<>( items.length ); + map = new LinkedHashMap<>( items.length ); for ( Entry<String, Value> miv : items ) { if ( miv == null ) {
Don't lose order in LazyValueMap, close #<I>
diff --git a/gems/rake-support/lib/torquebox/deploy_utils.rb b/gems/rake-support/lib/torquebox/deploy_utils.rb index <HASH>..<HASH> 100644 --- a/gems/rake-support/lib/torquebox/deploy_utils.rb +++ b/gems/rake-support/lib/torquebox/deploy_utils.rb @@ -189,6 +189,7 @@ module TorqueBox d = {} d['application'] = {} d['application']['root'] = root + d['environment'] = {} d['environment']['RACK_ENV'] = env.to_s if env if !context_path &&
Can't set RACK_ENV on a nil environment.
diff --git a/src/readers/csv/csv.js b/src/readers/csv/csv.js index <HASH>..<HASH> 100644 --- a/src/readers/csv/csv.js +++ b/src/readers/csv/csv.js @@ -214,6 +214,8 @@ const CSVReader = Reader.extend({ return typeof condition !== 'object' ? (rowValue === condition + // if the column is missing, then don't apply filter + || rowValue === undefined || condition === true && utils.isString(rowValue) && rowValue.toLowerCase().trim() === 'true' || condition === false && utils.isString(rowValue) && rowValue.toLowerCase().trim() === 'false' ) :
Make all values pass the filter when a column for filtering is absent from the CSV file
diff --git a/connection.go b/connection.go index <HASH>..<HASH> 100644 --- a/connection.go +++ b/connection.go @@ -66,11 +66,20 @@ func (cn *connection) WriteStatus(w io.Writer) { fmt.Fprintf(w, "%c", b) } // https://trac.transmissionbt.com/wiki/PeerStatusText + if cn.PeerInterested && !cn.Choked { + c('O') + } if len(cn.Requests) != 0 { c('D') - } else if cn.Interested { + } + if cn.PeerChoked && cn.Interested { c('d') } + if !cn.Choked && cn.PeerInterested { + c('U') + } else { + c('u') + } if !cn.PeerChoked && !cn.Interested { c('K') }
Add some extra char flags to connection status
diff --git a/src/test/java/com/googlecode/lanterna/gui2/TestBase.java b/src/test/java/com/googlecode/lanterna/gui2/TestBase.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/googlecode/lanterna/gui2/TestBase.java +++ b/src/test/java/com/googlecode/lanterna/gui2/TestBase.java @@ -13,7 +13,7 @@ public abstract class TestBase { void run(String[] args) throws IOException, InterruptedException { Screen screen = new TestTerminalFactory(args).createScreen(); screen.startScreen(); - MultiWindowTextGUI textGUI = new MultiWindowTextGUI(new SeparateTextGUIThread.Factory(), screen); + MultiWindowTextGUI textGUI = createTextGUI(screen); textGUI.setBlockingIO(false); textGUI.setEOFWhenNoWindows(true); textGUI.isEOFWhenNoWindows(); //No meaning, just to silence IntelliJ:s "is never used" alert @@ -29,5 +29,9 @@ public abstract class TestBase { } } + protected MultiWindowTextGUI createTextGUI(Screen screen) { + return new MultiWindowTextGUI(new SeparateTextGUIThread.Factory(), screen); + } + public abstract void init(WindowBasedTextGUI textGUI); }
Allow the tests to customize how the TextGUI is created
diff --git a/bcbio/distributed/resources.py b/bcbio/distributed/resources.py index <HASH>..<HASH> 100644 --- a/bcbio/distributed/resources.py +++ b/bcbio/distributed/resources.py @@ -29,7 +29,7 @@ def _get_ensure_functions(fn, algs): def _get_used_programs(fn, algs): used_progs = set(["gatk", "gemini", "bcbio_coverage", "samtools", - "snpEff", "cufflinks", "picard", "rnaseqc"]) + "snpeff", "cufflinks", "picard", "rnaseqc"]) for alg in algs: # get aligners used aligner = alg.get("aligner")
Ensure snpeff resource requirements passed along with new all lowercase approach to input keys
diff --git a/asset_allocation/asset_allocation.py b/asset_allocation/asset_allocation.py index <HASH>..<HASH> 100644 --- a/asset_allocation/asset_allocation.py +++ b/asset_allocation/asset_allocation.py @@ -11,7 +11,7 @@ def cli(): @click.command() @click.option("--format", default="ascii", help="format for the report output. ascii or html.") # prompt="output format") -def print(format): +def list(format): """ Print current allocation to the console. """ print(f"This would print the Asset Allocation report in {format} format. Incomplete.") @@ -22,5 +22,5 @@ def add(name): print("in add") -cli.add_command(print) +cli.add_command(list) cli.add_command(add)
abandoning the default option as displaying all options is preferable and "list" command is easy to type
diff --git a/src/Monolog/Handler/SlackHandler.php b/src/Monolog/Handler/SlackHandler.php index <HASH>..<HASH> 100644 --- a/src/Monolog/Handler/SlackHandler.php +++ b/src/Monolog/Handler/SlackHandler.php @@ -156,9 +156,15 @@ class SlackHandler extends SocketHandler * * @param int $level * @return string + * @deprecated Use underlying SlackRecord instead */ protected function getAttachmentColor($level) { + trigger_error( + 'SlackHandler::getAttachmentColor() is deprecated. Use underlying SlackRecord instead.', + E_USER_DEPRECATED + ); + return $this->slackRecord->getAttachmentColor($level); } @@ -167,9 +173,15 @@ class SlackHandler extends SocketHandler * * @param array $fields * @return string + * @deprecated Use underlying SlackRecord instead */ protected function stringify($fields) { + trigger_error( + 'SlackHandler::stringify() is deprecated. Use underlying SlackRecord instead.', + E_USER_DEPRECATED + ); + return $this->slackRecord->stringify($fields); } }
Mark former public methods of SlackHandler as deprecated The SlackRecord could be used now
diff --git a/src/Data/Log.php b/src/Data/Log.php index <HASH>..<HASH> 100644 --- a/src/Data/Log.php +++ b/src/Data/Log.php @@ -30,24 +30,9 @@ final class Log implements LogDataInterface { /** * @var string */ - private $message; - - /** - * @var string - */ - private $channel; - - /** - * @var string - */ private $level; /** - * @var array - */ - private $context; - - /** * @param \WP_Error $error * @param int $level * @param string $channel
Don't overwrite properties declared in trait #4
diff --git a/src/Calendar/Calendar.php b/src/Calendar/Calendar.php index <HASH>..<HASH> 100644 --- a/src/Calendar/Calendar.php +++ b/src/Calendar/Calendar.php @@ -16,6 +16,11 @@ class Calendar implements CalendarInterface, \IteratorAggregate $this->recurrenceFactory = $recurrenceFactory; } + public static function create(RecurrenceFactoryInterface $recurrenceFactory = null) + { + return new static($recurrenceFactory); + } + public function getIterator() { if($this->events === null) {
Calendar create method to allow instant chaining on an instance.
diff --git a/exa/core/editor.py b/exa/core/editor.py index <HASH>..<HASH> 100644 --- a/exa/core/editor.py +++ b/exa/core/editor.py @@ -324,7 +324,7 @@ class Editor(object): def to_stream(self): """Create an io.StringIO object from the current editor text.""" - return io.StringIO(str(self)) + return io.StringIO(six.u(self)) @property def variables(self):
StringIO as six.unicode
diff --git a/blimpy/calib_utils/calib_plots.py b/blimpy/calib_utils/calib_plots.py index <HASH>..<HASH> 100644 --- a/blimpy/calib_utils/calib_plots.py +++ b/blimpy/calib_utils/calib_plots.py @@ -218,7 +218,7 @@ def plot_diode_fold(dio_cross,bothfeeds=True,feedtype='l',min_samp=-500,max_samp """ Plots the calculated average power and time sampling of ON (red) and OFF (blue) for a noise diode measurement over the observation time series - ''' + """ #Get full stokes data of ND measurement obs = Waterfall(dio_cross,max_load=150) tsamp = obs.header['tsamp']
Issue #<I> During setup.py execution, the function description border of plot_diode_fold() caused a misscan in Python to the end of file.
diff --git a/Generator/ConfigEntityType.php b/Generator/ConfigEntityType.php index <HASH>..<HASH> 100644 --- a/Generator/ConfigEntityType.php +++ b/Generator/ConfigEntityType.php @@ -296,9 +296,19 @@ class ConfigEntityType extends EntityTypeBase { $description .= '.'; } + // The PHP type is not the same as the config schema type! + switch ($schema_item['type']) { + case 'label': + $php_type = 'string'; + break; + + default: + $php_type = $schema_item['type']; + } + $this->properties[] = $this->createPropertyBlock( $schema_item['name'], - $schema_item['type'], // TODO: config schema type not the same as PHP type!!!!! + $php_type, [ 'docblock_first_line' => $schema_item['label'] . '.', ]
Fixed config entity properties getting wrong PHP property types.
diff --git a/src/Composer/Command/SearchCommand.php b/src/Composer/Command/SearchCommand.php index <HASH>..<HASH> 100644 --- a/src/Composer/Command/SearchCommand.php +++ b/src/Composer/Command/SearchCommand.php @@ -27,7 +27,7 @@ use Composer\Factory; class SearchCommand extends Command { protected $matches; - protected $lowMatches; + protected $lowMatches = array(); protected $tokens; protected $output; @@ -67,10 +67,8 @@ EOT $this->output = $output; $repos->filterPackages(array($this, 'processPackage'), 'Composer\Package\CompletePackage'); - if (!empty($this->lowMatches)) { - foreach ($this->lowMatches as $details) { - $output->writeln($details['name'] . '<comment>:</comment> '. $details['description']); - } + foreach ($this->lowMatches as $details) { + $output->writeln($details['name'] . '<comment>:</comment> '. $details['description']); } }
Search: initialize lowMatches as empty array.
diff --git a/code/controllers/CMSSettingsController.php b/code/controllers/CMSSettingsController.php index <HASH>..<HASH> 100644 --- a/code/controllers/CMSSettingsController.php +++ b/code/controllers/CMSSettingsController.php @@ -8,6 +8,12 @@ class CMSSettingsController extends LeftAndMain { static $tree_class = 'SiteConfig'; static $required_permission_codes = array('EDIT_SITECONFIG'); + public function init() { + parent::init(); + + Requirements::javascript(CMS_DIR . '/javascript/CMSMain.EditForm.js'); + } + public function getResponseNegotiator() { $neg = parent::getResponseNegotiator(); $controller = $this;
BUG Hiding group selections in "Settings" JS functionality was only applied to page-specific settings with similar fields, but not to SiteConfig settings.
diff --git a/src/service-broker.js b/src/service-broker.js index <HASH>..<HASH> 100644 --- a/src/service-broker.js +++ b/src/service-broker.js @@ -1044,7 +1044,7 @@ class ServiceBroker { }; } }); - const flattenedStatuses = serviceStatuses.flatMap(s => s); + const flattenedStatuses = _.flatMap(serviceStatuses, s => s); const names = flattenedStatuses.map(s => s.name); const availableServices = flattenedStatuses.filter(s => s.available);
support node <I> (flatMap)
diff --git a/lib/irc.js b/lib/irc.js index <HASH>..<HASH> 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -540,8 +540,9 @@ function Client(server, nick, opt) { } else { if ( self.opt.debug ) - util.log("\u001b[01;31mUnhandled message: " + util.inspect(message) + "\u001b + util.log("\u001b[01;31mUnhandled message: " + util.inspect(message) + "\u001b[0m"); break; + } } }); // }}}
fix unfinished code from merging #<I>
diff --git a/Settings/General/SettingsManager.php b/Settings/General/SettingsManager.php index <HASH>..<HASH> 100644 --- a/Settings/General/SettingsManager.php +++ b/Settings/General/SettingsManager.php @@ -160,7 +160,7 @@ class SettingsManager { $setting = $this->repo->find($profile . '_' . $name); if ($setting === null) { - if ($mustExist == true) { + if ($mustExist === true) { throw new \UnexpectedValueException(); } $setting = $this->createSetting($name, $profile, $type); diff --git a/Twig/HiddenExtension.php b/Twig/HiddenExtension.php index <HASH>..<HASH> 100644 --- a/Twig/HiddenExtension.php +++ b/Twig/HiddenExtension.php @@ -68,10 +68,10 @@ class HiddenExtension extends \Twig_Extension */ public function generate($environment, $data, $checkRequest = false) { - if ($checkRequest && ($this->request != null)) { + if ($checkRequest && ($this->request !== null)) { foreach ($data as $name => $value) { $requestVal = $this->request->get($name); - if (!isset($requestVal) || empty($requestVal) || ($requestVal != null)) { + if (!isset($requestVal) || empty($requestVal) || ($requestVal !== null)) { unset($data[$name]); } }
Strict boolean compare
diff --git a/tests/IcalTest/Component/EventTest.php b/tests/IcalTest/Component/EventTest.php index <HASH>..<HASH> 100644 --- a/tests/IcalTest/Component/EventTest.php +++ b/tests/IcalTest/Component/EventTest.php @@ -41,7 +41,10 @@ class EventTest extends \PHPUnit_Framework_TestCase { * @depends testDefaultConstruct */ public function testAllDay() { - $event = new Event('test-1'); + $event = new Event('test-1'); + + $event->allDay(false); + $this->assertSame(DateTimeStamp::OUTPUT_UTC, $event->dateFormat); $event->allDay(true); $this->assertSame(DateTimeStamp::OUTPUT_UTC | DateTimeStamp::OUTPUT_NOTIME, $event->dateFormat);
Test setting allDay to false when it isn't set works
diff --git a/src/configs/eslint/core/variables.js b/src/configs/eslint/core/variables.js index <HASH>..<HASH> 100644 --- a/src/configs/eslint/core/variables.js +++ b/src/configs/eslint/core/variables.js @@ -67,6 +67,6 @@ module.exports = { // This rule will warn when it encounters a reference to an identifier that // has not yet been declared. - 'no-use-before-define': 'error', + 'no-use-before-define': ['error', {functions: false}], }, }
Relax lint rule for functions
diff --git a/salt/client/__init__.py b/salt/client/__init__.py index <HASH>..<HASH> 100644 --- a/salt/client/__init__.py +++ b/salt/client/__init__.py @@ -201,7 +201,6 @@ class LocalClient(object): timeout = self.opts['gather_job_timeout'] arg = [jid] - arg = condition_kwarg(arg, kwargs) pub_data = self.run_job(tgt, 'saltutil.find_job', arg=arg,
Stop passing **kwargs to find_job
diff --git a/src/EventRepository.php b/src/EventRepository.php index <HASH>..<HASH> 100644 --- a/src/EventRepository.php +++ b/src/EventRepository.php @@ -410,13 +410,8 @@ class EventRepository implements RepositoryInterface, LoggerAwareInterface $contactInfo = new CultureFeed_Cdb_Data_ContactInfo(); $event->setContactInfo($contactInfo); - $cdbXml = new CultureFeed_Cdb_Default(); - $cdbXml->addItem($event); - $this->createImprovedEntryAPIFromMetadata($metadata) - ->createEvent((string)$cdbXml); - - return $eventCreated->getEventId(); + ->createEvent($event); } /**
III-<I>: Update call to EntryAPI which expects a CultureFeed_Cdb_Item_Event instead of a xml string
diff --git a/dusty/systems/known_hosts/__init__.py b/dusty/systems/known_hosts/__init__.py index <HASH>..<HASH> 100644 --- a/dusty/systems/known_hosts/__init__.py +++ b/dusty/systems/known_hosts/__init__.py @@ -11,6 +11,8 @@ def _get_known_hosts_path(): def ensure_known_hosts(hosts): known_hosts_path = _get_known_hosts_path() + if not os.path.exists(known_hosts_path): + open(known_hosts_path, 'a+').close() modified = False with open(known_hosts_path, 'r+') as f: contents = f.read()
Create required known_hosts file if it does not exists
diff --git a/src/Css/Style.php b/src/Css/Style.php index <HASH>..<HASH> 100644 --- a/src/Css/Style.php +++ b/src/Css/Style.php @@ -555,7 +555,7 @@ class Style static $cache = []; if (!isset($ref_size)) { - $ref_size = self::$default_font_size; + $ref_size = $this->__get("font_size"); } if (!is_array($length)) {
Set default ref size to the current font size Calculations based on font size should be calculated based on the current font size, not the default.
diff --git a/blueprints/ember-cli-typescript/index.js b/blueprints/ember-cli-typescript/index.js index <HASH>..<HASH> 100644 --- a/blueprints/ember-cli-typescript/index.js +++ b/blueprints/ember-cli-typescript/index.js @@ -32,7 +32,8 @@ module.exports = { return this.addPackagesToProject([ { name: 'typescript', target: '^2.1' }, { name: '@types/ember', target: '^2.7.41' }, - { name: '@types/rsvp', target: '^3.3.0' } + { name: '@types/rsvp', target: '^3.3.0' }, + { name: '@types/ember-testing-helpers' }, ]); } }
Add @types/ember-testing-helpers to `afterInstall`.
diff --git a/client/controller/shared.js b/client/controller/shared.js index <HASH>..<HASH> 100644 --- a/client/controller/shared.js +++ b/client/controller/shared.js @@ -24,16 +24,12 @@ export function makeLayoutMiddleware( LayoutComponent ) { // On server, only render LoggedOutLayout when logged-out. if ( ! context.isServerSide || ! getCurrentUser( context.store.getState() ) ) { - let redirectUri; - if ( context.isServerSide ) { - redirectUri = `${ context.protocol }://${ context.host }${ context.originalUrl }`; - } context.layout = ( <LayoutComponent store={ store } primary={ primary } secondary={ secondary } - redirectUri={ redirectUri } + redirectUri={ context.originalUrl } /> ); } diff --git a/server/isomorphic-routing/index.js b/server/isomorphic-routing/index.js index <HASH>..<HASH> 100644 --- a/server/isomorphic-routing/index.js +++ b/server/isomorphic-routing/index.js @@ -71,8 +71,6 @@ function getEnhancedContext( req, res ) { pathname: req.path, params: req.params, query: req.query, - protocol: req.protocol, - host: req.headers.host, redirect: res.redirect.bind( res ), res, } );
SSR: Fix reconciliation error on Masterbar login link (#<I>) A recent PR #<I> changed the `redirect_to` arg in masterbar login links to be relative links instead of absolute links generated from window.location.href. For server renders, where there was no access to window, this arg was historically being generated as an absolute link to match. This PR changes the server-generated links to be relative to match the client side, fixing some SSR reconciliation errors.
diff --git a/src/to-markdown.js b/src/to-markdown.js index <HASH>..<HASH> 100644 --- a/src/to-markdown.js +++ b/src/to-markdown.js @@ -22,7 +22,7 @@ var toMarkdown = function(string) { { patterns: 'br', type: 'void', - replacement: '\n' + replacement: ' \n' }, { patterns: 'h([1-6])',
br should be replaced with two spaces and newline Otherwise, it will be rendered without line break once converted back to html