diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java b/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java index <HASH>..<HASH> 100644 --- a/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java +++ b/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java @@ -431,8 +431,13 @@ public abstract class WebDriverManager { return this; } - public WebDriverManager dockerVolumes(String volumes) { - config().setDockerVolumes(volumes); + public WebDriverManager dockerVolumes(String[] volumes) { + config().setDockerVolumes(String.join(",", volumes)); + return this; + } + + public WebDriverManager dockerVolume(String volume) { + config().setDockerVolumes(volume); return this; }
Include API method to specify volumes as string array
diff --git a/src/Dandomain/Api/Api.php b/src/Dandomain/Api/Api.php index <HASH>..<HASH> 100644 --- a/src/Dandomain/Api/Api.php +++ b/src/Dandomain/Api/Api.php @@ -75,6 +75,10 @@ class Api { $this->query = "/admin/WEBAPI/Endpoints/v1_0/ProductService/{$this->apiKey}/" . rawurlencode($productNumber) . "/$siteId"; return $this->run(); } + public function getProductsInModifiedInterval(\DateTime $dateStart, \DateTime $dateEnd, $siteId) { + $this->query = "/admin/WEBAPI/Endpoints/v1_0/ProductService/{$this->apiKey}/GetByModifiedInterval/$siteId?start=" . $dateStart->format('Y-m-d\TH:i:s') . "&end=" . $dateEnd->format('Y-m-d\TH:i:s'); + return $this->run(); + } public function getSites() { $this->query = "/admin/WEBAPI/Endpoints/v1_0/SettingService/{$this->apiKey}/Sites"; return $this->run();
Created method getProductsInModifiedInterval
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -53,16 +53,18 @@ FeathersError.prototype = new Error(); // NOTE (EK): A little hack to get around `message` not // being included in the default toJSON call. -FeathersError.prototype.toJSON = function () { - return { - name: this.name, - message: this.message, - code: this.code, - className: this.className, - data: this.data, - errors: this.errors - }; -}; +Object.defineProperty(FeathersError.prototype, 'toJSON', { + value: function () { + return { + name: this.name, + message: this.message, + code: this.code, + className: this.className, + data: this.data, + errors: this.errors + }; + } +}); // 400 - Bad Request function BadRequest (message, data) {
Define property toJSON because just assigning it throws an error in Node 4 (#<I>)
diff --git a/Model/StructValue.php b/Model/StructValue.php index <HASH>..<HASH> 100755 --- a/Model/StructValue.php +++ b/Model/StructValue.php @@ -45,13 +45,13 @@ class StructValue extends AbstractModel * @uses StructValue::constantSuffix() * @uses StructValue::getIndex() * @uses StructValue::getOwner() - * @uses Generator::instance()->getOptionGenericConstantsNames() + * @uses Generator::getOptionGenericConstantsNames() * @param bool $keepMultipleUnderscores optional, allows to keep the multiple consecutive underscores * @return string */ public function getCleanName($keepMultipleUnderscores = false) { - if (Generator::instance()->getOptionGenericConstantsNames() && is_numeric($this->getIndex()) && $this->getIndex() >= 0) { + if ($this->getGenerator()->getOptionGenericConstantsNames() && is_numeric($this->getIndex()) && $this->getIndex() >= 0) { return 'ENUM_VALUE_' . $this->getIndex(); } else { $key = self::constantSuffix($this->getOwner()->getName(), parent::getCleanName($keepMultipleUnderscores), $this->getIndex());
use property instead of no more used Generator::instance
diff --git a/src/material/semantic.js b/src/material/semantic.js index <HASH>..<HASH> 100644 --- a/src/material/semantic.js +++ b/src/material/semantic.js @@ -176,10 +176,8 @@ const semantic = { if (Number(normalMap.uv) === 1) { return mesh.geometry.tangents1; } - return mesh.geometry.tangents; } - - return undefined; + return mesh.geometry.tangents; } },
fix: Semantic Tangent data should also be returned when there is no normal map
diff --git a/packages/heroku-apps/commands/info.js b/packages/heroku-apps/commands/info.js index <HASH>..<HASH> 100644 --- a/packages/heroku-apps/commands/info.js +++ b/packages/heroku-apps/commands/info.js @@ -15,8 +15,8 @@ function* run (context, heroku) { return { addons: heroku.apps(app).addons().listByApp(), app: heroku.request({path: appUrl}), - dynos: heroku.apps(app).dynos().list(), - collaborators: heroku.apps(app).collaborators().list() + dynos: heroku.apps(app).dynos().list().catch(() => []), + collaborators: heroku.apps(app).collaborators().list().catch(() => []), }; }
Merge pull request #6 from heroku/revert-5-revert-3-rescue-requests Revert "Revert "fix output when only partial data is returned""
diff --git a/lib/permit/permit_rules.rb b/lib/permit/permit_rules.rb index <HASH>..<HASH> 100644 --- a/lib/permit/permit_rules.rb +++ b/lib/permit/permit_rules.rb @@ -125,7 +125,7 @@ module Permit applicable_rules = (rules[action] || []) + (rules[:all] || []) applicable_rules.each do |rule| if rule.matches?(person, context_binding) - @logger.info "#{person.to_s} matched #{type.to_s} rule: #{rule.to_s}" + @logger.info "#{person.inspect} matched #{type.to_s} rule: #{rule.inspect}" return true end end
Used #inspect to make rule match logging statement more useful.
diff --git a/examples/icalendar/xcalendar.php b/examples/icalendar/xcalendar.php index <HASH>..<HASH> 100644 --- a/examples/icalendar/xcalendar.php +++ b/examples/icalendar/xcalendar.php @@ -4,4 +4,7 @@ require_once(__DIR__.'/../../vendor/autoload.php'); $dom = FluentDOM::load(__DIR__.'/example.ical', 'text/calendar'); $dom->formatOutput = TRUE; + +echo $dom('string(//xCal:VEVENT/xCal:SUMMARY)'); +echo "\n\n"; echo $dom->saveXml(); \ No newline at end of file
Added new loader for text/calendar (converts icalendar to xcalendar)
diff --git a/spyder/plugins/explorer/widgets/explorer.py b/spyder/plugins/explorer/widgets/explorer.py index <HASH>..<HASH> 100644 --- a/spyder/plugins/explorer/widgets/explorer.py +++ b/spyder/plugins/explorer/widgets/explorer.py @@ -131,7 +131,12 @@ class IconProvider(QFileIconProvider): else: qfileinfo = icontype_or_qfileinfo fname = osp.normpath(to_text_string(qfileinfo.absoluteFilePath())) - return ima.get_icon_by_extension_or_type(fname, scale_factor=1.0) + if osp.isfile(fname) or osp.isdir(fname): + icon = ima.get_icon_by_extension_or_type(fname, + scale_factor=1.0) + else: + icon = ima.get_icon('binary', adjust_for_interface=True) + return icon class DirView(QTreeView):
Files: Only try to assing icon to files and dirs - Other objects (such as pipes and sockets) will be assigned the binary icon by default. - This avoid a total freeze when moving to a directory with a pipe in it.
diff --git a/test/tc_sequence.rb b/test/tc_sequence.rb index <HASH>..<HASH> 100644 --- a/test/tc_sequence.rb +++ b/test/tc_sequence.rb @@ -188,12 +188,14 @@ class TC_Sequence < Test::Unit::TestCase [ S( O, 3 ), S( I, 3 ) ].each do |t| assert_equal 2, t[ 4, 2, 3 ].min end + assert_equal C( 1, 2, 1 ), S[ C( 1, 2, 3 ), C( 3, 2, 1 ) ].min end def test_max [ S( O, 3 ), S( I, 3 ) ].each do |t| assert_equal 4, t[ 4, 2, 3 ].max end + assert_equal C( 3, 2, 3 ), S[ C( 1, 2, 3 ), C( 3, 2, 1 ) ].max end def test_convolve
Added tests for #min and #max for RGB values
diff --git a/src/test/java/redis/clients/jedis/tests/commands/PublishSubscribeCommandsTest.java b/src/test/java/redis/clients/jedis/tests/commands/PublishSubscribeCommandsTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/redis/clients/jedis/tests/commands/PublishSubscribeCommandsTest.java +++ b/src/test/java/redis/clients/jedis/tests/commands/PublishSubscribeCommandsTest.java @@ -472,7 +472,7 @@ public class PublishSubscribeCommandsTest extends JedisCommandTestBase { t.join(); } - @Test + @Test @Ignore public void subscribeWithoutConnecting() { try { Jedis jedis = new Jedis(hnp.host, hnp.port); @@ -504,7 +504,7 @@ public class PublishSubscribeCommandsTest extends JedisCommandTestBase { } } - @Test(expected = JedisConnectionException.class) @Ignore + @Test(expected = JedisConnectionException.class) public void unsubscribeWhenNotSusbscribed() throws InterruptedException { JedisPubSub pubsub = new JedisPubSub() { public void onMessage(String channel, String message) {
fix ignore that was placed on wrong test
diff --git a/src/Kunstmaan/GeneratorBundle/Generator/PagePartGenerator.php b/src/Kunstmaan/GeneratorBundle/Generator/PagePartGenerator.php index <HASH>..<HASH> 100644 --- a/src/Kunstmaan/GeneratorBundle/Generator/PagePartGenerator.php +++ b/src/Kunstmaan/GeneratorBundle/Generator/PagePartGenerator.php @@ -140,7 +140,7 @@ class PagePartGenerator extends Generator } } if (!is_null($this->prefix)) { - $class->setPrimaryTable(array('name' => strtolower($this->prefix.'_'.strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $this->entity))))); + $class->setPrimaryTable(array('name' => strtolower($this->prefix.strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $this->entity))))); } else { list($project, $bundle) = explode("\\", $this->bundle->getNameSpace()); $class->setPrimaryTable(array('name' => strtolower($project.'_'.strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $this->entity)))));
Don't append extra underscore after prefix in PagePartGenerator
diff --git a/mpd/base.py b/mpd/base.py index <HASH>..<HASH> 100644 --- a/mpd/base.py +++ b/mpd/base.py @@ -117,9 +117,12 @@ class mpd_commands(object): callback. """ - def __init__(self, *commands, is_direct=False): + def __init__(self, *commands, **kwargs): self.commands = commands - self.is_direct = is_direct + self.is_direct = kwargs.pop('is_direct', False) + if kwargs: + raise AttributeError("mpd_commands() got unexpected keyword" + " arguments %s" % ",".join(kwargs)) def __call__(self, ob): ob.mpd_commands = self.commands
asyncio base modifications: Restore Python 2 compatibility The (*args, key=word) syntax was introduced with PEP <I>; this works around the missing syntax by using **kwargs; the additional check is required to avoid silently ignoring arguments.
diff --git a/cmd/caa-log-checker/main.go b/cmd/caa-log-checker/main.go index <HASH>..<HASH> 100644 --- a/cmd/caa-log-checker/main.go +++ b/cmd/caa-log-checker/main.go @@ -172,6 +172,8 @@ func loadMap(paths []string) (map[string][]time.Time, error) { } func main() { + logStdoutLevel := flag.Int("stdout-level", 6, "Minimum severity of messages to send to stdout") + logSyslogLevel := flag.Int("syslog-level", 6, "Minimum severity of messages to send to syslog") raLog := flag.String("ra-log", "", "Path to a single boulder-ra log file") vaLogs := flag.String("va-logs", "", "List of paths to boulder-va logs, separated by commas") timeTolerance := flag.Duration("time-tolerance", 0, "How much slop to allow when comparing timestamps for ordering") @@ -181,6 +183,11 @@ func main() { cmd.Fail("value of -time-tolerance must be non-negative") } + _ = cmd.NewLogger(cmd.SyslogConfig{ + StdoutLevel: *logStdoutLevel, + SyslogLevel: *logSyslogLevel, + }) + // Build a map from hostnames to a list of times those hostnames were checked // for CAA. checkedMap, err := loadMap(strings.Split(*vaLogs, ","))
cmd/caa-log-checker: Properly initialize logging (#<I>) Explicitly initializes the logger. Previously it ended up using the auto-initialized logging config which logged everything to "test". Added two flags stdout-level and syslog-level to control the logging filters in lieu of a config file.
diff --git a/src/main/org/openscience/cdk/fingerprint/Fingerprinter.java b/src/main/org/openscience/cdk/fingerprint/Fingerprinter.java index <HASH>..<HASH> 100644 --- a/src/main/org/openscience/cdk/fingerprint/Fingerprinter.java +++ b/src/main/org/openscience/cdk/fingerprint/Fingerprinter.java @@ -204,7 +204,7 @@ public class Fingerprinter implements IFingerprinter { } } // now lets clean stuff up - List<String> cleanPath = new ArrayList<String>(); + Set<String> cleanPath = new HashSet<String>(); for (StringBuffer s : allPaths) { if (cleanPath.contains(s.toString()) || cleanPath.contains(s.reverse().toString())) continue; else cleanPath.add(s.toString());
[jonalv-fingerprint-<I>.x] first optimization brings down fingerprinting time to about <I>% of what it was before git-svn-id: <URL>
diff --git a/admin/report/customlang/locallib.php b/admin/report/customlang/locallib.php index <HASH>..<HASH> 100644 --- a/admin/report/customlang/locallib.php +++ b/admin/report/customlang/locallib.php @@ -111,7 +111,7 @@ class report_customlang_utils { $stringman = get_string_manager(); $components = $DB->get_records('report_customlang_components'); foreach ($components as $component) { - $sql = "SELECT stringid, s.* + $sql = "SELECT stringid, id, lang, componentid, original, master, local, timemodified, timecustomized, outdated, modified FROM {report_customlang} s WHERE lang = ? AND componentid = ? ORDER BY stringid";
MDL-<I> Fixed SQL causing error in MSSQL
diff --git a/tap.go b/tap.go index <HASH>..<HASH> 100644 --- a/tap.go +++ b/tap.go @@ -31,17 +31,25 @@ var TapConnectFlagNames = map[TapConnectFlag]string{ FIX_FLAG_BYTEORDER: "FIX_FLAG_BYTEORDER", } -func (f TapConnectFlag) String() string { - parts := []string{} + +// Split the ORed flags into the individual bit flags. +func (f TapConnectFlag) SplitFlags() []TapConnectFlag { + rv := []TapConnectFlag{} for i := uint32(1); f != 0; i = i << 1 { if uint32(f)&i == i { - p := TapConnectFlagNames[TapConnectFlag(i)] - if p == "" { - p = fmt.Sprintf("0x%x", i) - } - parts = append(parts, p) + rv = append(rv, TapConnectFlag(i)) } f = TapConnectFlag(uint32(f) & (^i)) } - return strings.Join(parts, "|") + return rv } + +func (f TapConnectFlag) String() string { + parts := []string{} + for _, x := range f.SplitFlags() { + p := TapConnectFlagNames[x] + if p == "" { + p = fmt.Sprintf("0x%x", int(x)) + } + parts = append(parts, p) + }
Separate tap flag splitting and stringing.
diff --git a/hypercorn/config.py b/hypercorn/config.py index <HASH>..<HASH> 100644 --- a/hypercorn/config.py +++ b/hypercorn/config.py @@ -12,7 +12,7 @@ from dataclasses import dataclass from ssl import SSLContext, VerifyFlags, VerifyMode # type: ignore from typing import Any, AnyStr, Dict, List, Mapping, Optional, Type, Union -import pytoml +import toml from .logging import AccessLogger @@ -267,7 +267,7 @@ class Config: """ file_path = os.fspath(filename) with open(file_path) as file_: - data = pytoml.load(file_) + data = toml.load(file_) return cls.from_mapping(data) @classmethod diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_: INSTALL_REQUIRES = [ 'h11', 'h2 >= 3.1.0', - 'pytoml', + 'toml', 'typing_extensions', 'wsproto >= 0.14.0', ]
Switch from pytoml to toml pytoml is no longer maintained and recommends toml is used instead.
diff --git a/hammertime/core.py b/hammertime/core.py index <HASH>..<HASH> 100644 --- a/hammertime/core.py +++ b/hammertime/core.py @@ -59,7 +59,11 @@ class HammerTime: def request(self, *args, **kwargs): if self.is_closed: - raise asyncio.CancelledError() + # Return an exception as if it were a task when attempting to request on a closed engine + future = asyncio.Future(loop=self.loop) + future.set_exception(asyncio.CancelledError()) + return future + self.stats.requested += 1 task = self.loop.create_task(self._request(*args, **kwargs)) self.tasks.append(task) diff --git a/tests/init_test.py b/tests/init_test.py index <HASH>..<HASH> 100644 --- a/tests/init_test.py +++ b/tests/init_test.py @@ -207,7 +207,7 @@ class InitTest(TestCase): self.assertTrue(hammertime.is_closed) with self.assertRaises(asyncio.CancelledError): - hammertime.request("http://example.com") + await hammertime.request("http://example.com") @async_test() async def test_interrupt_close_hammertime(self, loop):
Improve interface consistency (#<I>)
diff --git a/src/Billable.php b/src/Billable.php index <HASH>..<HASH> 100644 --- a/src/Billable.php +++ b/src/Billable.php @@ -266,7 +266,7 @@ trait Billable $id, $this->getStripeKey() ); - $stripeInvoice->lines = StripeInvoice::retrieve($id) + $stripeInvoice->lines = StripeInvoice::retrieve($id, $this->getStripeKey()) ->lines ->all(['limit' => 1000]);
Bug solved: accessing the Stripe invoice lines with the Stripe Key
diff --git a/src/Manager.php b/src/Manager.php index <HASH>..<HASH> 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -352,7 +352,7 @@ class Manager implements ConfigurationApplier $context = $this->getContext(); $last = function ($schema, $query, $context, $params) { - return GraphQL::executeAndReturnResult($schema, $query, null, $context, $params); + return GraphQL::executeQuery($schema, $query, null, $context, $params); }; return $this->callMiddleware($schema, $query, $context, $params, $last);
Rename GraphQL::executeAndReturnResult to GraphQL::executeQuery
diff --git a/paegan/transport/shoreline.py b/paegan/transport/shoreline.py index <HASH>..<HASH> 100644 --- a/paegan/transport/shoreline.py +++ b/paegan/transport/shoreline.py @@ -91,7 +91,7 @@ class Shoreline(object): # If the current point lies outside of our current shapefile index, # re-query the shapefile in a buffer around this point - if self._spatial_query_object and not ls.within(self._spatial_query_object): + if self._spatial_query_object is None or (self._spatial_query_object and not ls.within(self._spatial_query_object)): self.index(point=spoint) for element in self._geoms:
Intersect should re-index if it's never been indexed
diff --git a/test/adapters/test_middleware_test.rb b/test/adapters/test_middleware_test.rb index <HASH>..<HASH> 100644 --- a/test/adapters/test_middleware_test.rb +++ b/test/adapters/test_middleware_test.rb @@ -2,8 +2,9 @@ require File.expand_path('../../helper', __FILE__) module Adapters class TestMiddleware < Faraday::TestCase + Stubs = Faraday::Adapter.lookup_middleware(:test)::Stubs def setup - @stubs = Faraday::Adapter::Test::Stubs.new + @stubs = Stubs.new @conn = Faraday.new do |builder| builder.adapter :test, @stubs end @@ -62,7 +63,7 @@ module Adapters end def test_raises_an_error_if_no_stub_is_found_for_request - assert_raises Faraday::Adapter::Test::Stubs::NotFound do + assert_raises Stubs::NotFound do @conn.get('/invalid'){ [200, {}, []] } end end
removed autoload, caused problems with the Test adapter tests SOMETIMES
diff --git a/biggus/_init.py b/biggus/_init.py index <HASH>..<HASH> 100644 --- a/biggus/_init.py +++ b/biggus/_init.py @@ -2394,8 +2394,8 @@ class _StdStreamsHandler(_AggregationStreamsHandler): def bootstrap(self, processed_chunk_shape): self.k = 1 - dtype = (np.zeros(1, dtype=self.array.dtype) / 1.).dtype - self.q = np.zeros(processed_chunk_shape, dtype=dtype) + self._dtype = (np.zeros(1, dtype=self.array.dtype) / 1.).dtype + self.q = np.zeros(processed_chunk_shape, dtype=self._dtype) def finalise(self): self.q /= (self.k - self.ddof) @@ -2407,10 +2407,10 @@ class _StdStreamsHandler(_AggregationStreamsHandler): return chunk def process_data(self, data): - data = np.rollaxis(data, self.axis) + data = np.rollaxis(data, self.axis).astype(self._dtype) if self.k == 1: - self.a = data[0].copy() + self.a = data[0] data = data[1:] for data_slice in data:
Fix dtype of temporary arrays in std.
diff --git a/openxc/src/com/openxc/sources/BytestreamDataSource.java b/openxc/src/com/openxc/sources/BytestreamDataSource.java index <HASH>..<HASH> 100644 --- a/openxc/src/com/openxc/sources/BytestreamDataSource.java +++ b/openxc/src/com/openxc/sources/BytestreamDataSource.java @@ -22,7 +22,7 @@ public abstract class BytestreamDataSource extends ContextualVehicleDataSource private final static int READ_BATCH_SIZE = 512; private static final int MAX_FAST_RECONNECTION_ATTEMPTS = 6; protected static final int RECONNECTION_ATTEMPT_WAIT_TIME_S = 10; - protected static final int SLOW_RECONNECTION_ATTEMPT_WAIT_TIME_S = 60; + protected static final int SLOW_RECONNECTION_ATTEMPT_WAIT_TIME_S = 30; private AtomicBoolean mRunning = new AtomicBoolean(false); private int mReconnectionAttempts;
Decrease slow reconnection attempt delay from <I> to <I> seconds.
diff --git a/actionpack/lib/action_controller/metal/instrumentation.rb b/actionpack/lib/action_controller/metal/instrumentation.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_controller/metal/instrumentation.rb +++ b/actionpack/lib/action_controller/metal/instrumentation.rb @@ -35,6 +35,9 @@ module ActionController payload[:response] = response payload[:status] = response.status result + rescue => error + payload[:status] = ActionDispatch::ExceptionWrapper.status_code_for_exception(error.class.name) + raise ensure append_info_to_payload(payload) end
Fix instrumenting internal server errors In case of an exception we never reach setting the status in the payload so it is unset afterward. Let's catch the exception and set status based on the exception class name. Then re-raise it. This is basically the equivalent of what happens in ActionController::LogSubscriber.process_action
diff --git a/lib/kaminari/helpers/sinatra_helpers.rb b/lib/kaminari/helpers/sinatra_helpers.rb index <HASH>..<HASH> 100644 --- a/lib/kaminari/helpers/sinatra_helpers.rb +++ b/lib/kaminari/helpers/sinatra_helpers.rb @@ -119,7 +119,7 @@ module Kaminari::Helpers query = params.merge(param_name => scope.prev_page) link_to name, env['PATH_INFO'] + (query.empty? ? '' : "?#{query.to_query}"), options.reverse_merge(:rel => 'previous') else - placeholder + placeholder.to_s.html_safe end end @@ -149,7 +149,7 @@ module Kaminari::Helpers query = params.merge(param_name => scope.next_page) link_to name, env['PATH_INFO'] + (query.empty? ? '' : "?#{query.to_query}"), options.reverse_merge(:rel => 'next') else - placeholder + placeholder.to_s.html_safe end end end
Fix faling specs for sinatra <I>
diff --git a/holoviews/core/data/cudf.py b/holoviews/core/data/cudf.py index <HASH>..<HASH> 100644 --- a/holoviews/core/data/cudf.py +++ b/holoviews/core/data/cudf.py @@ -282,8 +282,8 @@ class cuDFInterface(PandasInterface): if not hasattr(reindexed, agg): raise ValueError('%s aggregation is not supported on cudf DataFrame.' % agg) agg = getattr(reindexed, agg)() - data = dict(((col, [v]) for col, v in zip(agg.index, agg.to_array()))) - df = util.pd.DataFrame(data, columns=list(agg.index)) + data = dict(((col, [v]) for col, v in zip(agg.index.values_host, agg.to_array()))) + df = util.pd.DataFrame(data, columns=list(agg.index.values_host)) dropped = [] for vd in vdims:
copy index values to host for interation (#<I>)
diff --git a/spacy/about.py b/spacy/about.py index <HASH>..<HASH> 100644 --- a/spacy/about.py +++ b/spacy/about.py @@ -1,6 +1,6 @@ # fmt: off __title__ = "spacy" -__version__ = "3.1.3" +__version__ = "3.2.0.dev0" __download_url__ = "https://github.com/explosion/spacy-models/releases/download" __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json" __projects__ = "https://github.com/explosion/projects"
Set version to <I>.dev0
diff --git a/cgo15.go b/cgo15.go index <HASH>..<HASH> 100644 --- a/cgo15.go +++ b/cgo15.go @@ -4,7 +4,6 @@ package gb import ( "path/filepath" - "strconv" "strings" )
fix missing imports (go <I>)
diff --git a/packages/jsio.js b/packages/jsio.js index <HASH>..<HASH> 100644 --- a/packages/jsio.js +++ b/packages/jsio.js @@ -118,8 +118,10 @@ relative: function (relativeTo, path) { var len = relativeTo.length; if (path.substring(0, len) == relativeTo) { + // if the relative path now starts with a path separator + // either (/ or \), remove it /* Note: we're casting a boolean to an int by adding len to it */ - return path.slice((path.charAt(len) == ENV.pathSep) + len); + return path.slice(len + /[\/\\]/.test(path.charAt(len))); } var sA = util.removeEndSlash(path).split(ENV.pathSep),
fix (makeRelativePath): strip \ and / when resolving paths After removing a subpath when resolving a relative path, look for a path separator (/ or \, regardless of platform), and remove it if necessary. This prevents mixed paths (eg: c:\initial\folder/added/path) from being resolved with a leftover / on the front on systems with \ as the path separator (windows).
diff --git a/lib/arjdbc/jdbc/type_cast.rb b/lib/arjdbc/jdbc/type_cast.rb index <HASH>..<HASH> 100644 --- a/lib/arjdbc/jdbc/type_cast.rb +++ b/lib/arjdbc/jdbc/type_cast.rb @@ -104,9 +104,10 @@ module ActiveRecord::ConnectionAdapters return nil unless time time -= offset - Base.default_timezone == :utc ? time : time.getlocal + ActiveRecord::Base.default_timezone == :utc ? time : time.getlocal else - Time.public_send(Base.default_timezone, year, mon, mday, hour, min, sec, microsec) rescue nil + timezone = ActiveRecord::Base.default_timezone + Time.public_send(timezone, year, mon, mday, hour, min, sec, microsec) rescue nil end end
DateTime columns are returned always as nil values. The "rescue nil" in the module ActiveRecord::ConnectionAdapters::Jdbc::TypeCast is hiding the error.
diff --git a/mothermayi/git.py b/mothermayi/git.py index <HASH>..<HASH> 100644 --- a/mothermayi/git.py +++ b/mothermayi/git.py @@ -16,6 +16,8 @@ def execute(command): @contextlib.contextmanager def stash(): execute(['git', 'stash', '-u', '--keep-index']) - yield - execute(['git', 'reset', '--hard']) - execute(['git', 'stash', 'pop', '--quiet', '--index']) + try: + yield + finally: + execute(['git', 'reset', '--hard']) + execute(['git', 'stash', 'pop', '--quiet', '--index'])
Put un-stash in finally block Without it a failure will lead to us not putting the user back in the state they expect to be in
diff --git a/gsh/completion.py b/gsh/completion.py index <HASH>..<HASH> 100644 --- a/gsh/completion.py +++ b/gsh/completion.py @@ -66,8 +66,19 @@ completion_results = None # Commands in $PATH, used for the completion of the first word user_commands_in_path = read_commands_in_path() +try: + import ctypes.util + lib_readline = ctypes.cdll.LoadLibrary(ctypes.util.find_library("readline")) + rl_completion_append_character = ctypes.c_char.in_dll(lib_readline, + "rl_completion_append_character") +except Exception: + class rl_completion_append_character: + pass + + def complete(text, state): """On tab press, return the next possible completion""" + rl_completion_append_character.value = '\0' global completion_results if state == 0: line = readline.get_line_buffer()
Newer readline versions by default add a ' ' after a single choice completion. Revert to the previous behaviour of not doing that.
diff --git a/xblock/fields.py b/xblock/fields.py index <HASH>..<HASH> 100644 --- a/xblock/fields.py +++ b/xblock/fields.py @@ -8,9 +8,6 @@ storage mechanism is. import copy from collections import namedtuple -UNSET = object() - - class BlockScope(object): """Enumeration defining BlockScopes""" USAGE, DEFINITION, TYPE, ALL = xrange(4) @@ -46,6 +43,9 @@ class Sentinel(object): return self.name +UNSET = Sentinel("fields.UNSET") + + ScopeBase = namedtuple('ScopeBase', 'user block') # pylint: disable=C0103 @@ -96,11 +96,11 @@ ScopeIds = namedtuple('ScopeIds', 'user_id block_type def_id usage_id') # pylin # define a placeholder ('nil') value to indicate when nothing has been stored # in the cache ("None" may be a valid value in the cache, so we cannot use it). -NO_CACHE_VALUE = object() +NO_CACHE_VALUE = Sentinel("fields.NO_CACHE_VALUE") # define a placeholder value that indicates that a value is explicitly dirty, # because it was explicitly set -EXPLICITLY_SET = object() +EXPLICITLY_SET = Sentinel("fields.EXPLICITLY_SET") class Field(object):
Use Sentinels for sentinels, it helps debugging.
diff --git a/blueflood-core/src/test/java/com/rackspacecloud/blueflood/io/serializers/IMetricSerializerTest.java b/blueflood-core/src/test/java/com/rackspacecloud/blueflood/io/serializers/IMetricSerializerTest.java index <HASH>..<HASH> 100644 --- a/blueflood-core/src/test/java/com/rackspacecloud/blueflood/io/serializers/IMetricSerializerTest.java +++ b/blueflood-core/src/test/java/com/rackspacecloud/blueflood/io/serializers/IMetricSerializerTest.java @@ -56,7 +56,6 @@ public class IMetricSerializerTest { BluefloodEnumRollup enumDeserialized = mapper.readValue(enumRollupString, BluefloodEnumRollup.class); String enumSerialized = mapper.writeValueAsString(enumDeserialized); - System.out.println(enumSerialized); Assert.assertEquals(enumRollupString, enumSerialized); BluefloodEnumRollup enumReDeserialized = mapper.readValue(enumSerialized, BluefloodEnumRollup.class);
Unnecassary SOP
diff --git a/src/client/decorators/MetaDecorator/DiagramDesigner/MetaDecorator.DiagramDesignerWidget.Aspects.js b/src/client/decorators/MetaDecorator/DiagramDesigner/MetaDecorator.DiagramDesignerWidget.Aspects.js index <HASH>..<HASH> 100644 --- a/src/client/decorators/MetaDecorator/DiagramDesigner/MetaDecorator.DiagramDesignerWidget.Aspects.js +++ b/src/client/decorators/MetaDecorator/DiagramDesigner/MetaDecorator.DiagramDesignerWidget.Aspects.js @@ -240,7 +240,7 @@ define([ } //set meta aspect first - client.setMetaAspect(objID, cDesc.name, cDesc); + client.setMetaAspect(objID, cDesc.name, cDesc.items || []); client.createSet(objID, cDesc.name); client.completeTransaction();
Pass correct params when saving spects in MetaDecorator (#<I>) needs to be cherry picked to <I> Former-commit-id: ee6c<I>a<I>fe3e<I>ba7a<I>b<I>dda<I>cdf7
diff --git a/spec/tournament/single_elimination_spec.rb b/spec/tournament/single_elimination_spec.rb index <HASH>..<HASH> 100644 --- a/spec/tournament/single_elimination_spec.rb +++ b/spec/tournament/single_elimination_spec.rb @@ -16,7 +16,7 @@ describe Tournament::SingleElimination do end describe '#generate' do - context 'initial round' do + context 'first round' do it 'works for 4 teams' do driver = TestDriver.new(teams: [1, 2, 3, 4]) described_class.generate driver, round: 0
CLeaned up single elimination tests
diff --git a/bot/action/core/filter.py b/bot/action/core/filter.py index <HASH>..<HASH> 100644 --- a/bot/action/core/filter.py +++ b/bot/action/core/filter.py @@ -43,6 +43,14 @@ class MessageAction(IntermediateAction): self._continue(event) +class ChosenInlineResultAction(IntermediateAction): + def process(self, event): + chosen_inline_result = event.update.chosen_inline_result + if chosen_inline_result is not None: + event.chosen_result = chosen_inline_result + self._continue(event) + + class InlineQueryAction(IntermediateAction): def process(self, event): inline_query = event.update.inline_query
Add support for ChosenInlineResult with a filter action
diff --git a/lib/ditty/controllers/component_controller.rb b/lib/ditty/controllers/component_controller.rb index <HASH>..<HASH> 100644 --- a/lib/ditty/controllers/component_controller.rb +++ b/lib/ditty/controllers/component_controller.rb @@ -96,7 +96,7 @@ module Ditty entity = read!(id) authorize entity, :update - flash[:redirect_to] = "#{base_path}/#{entity.display_id}" + flash[:redirect_to] = "#{base_path}/#{entity.display_id}" unless flash.keep(:redirect_to) haml :"#{view_location}/edit", locals: { entity: entity, title: heading(:edit) }, layout: layout
fix: Allow customization of redirect after updating
diff --git a/bcbio/install.py b/bcbio/install.py index <HASH>..<HASH> 100644 --- a/bcbio/install.py +++ b/bcbio/install.py @@ -76,7 +76,7 @@ def upgrade_bcbio(args): _symlink_bcbio(args, script="bcbio_prepare_samples.py") upgrade_thirdparty_tools(args, REMOTES) print("Third party tools upgrade complete.") - if args.toolplus and (args.tooldir or args.upgrade != "skip"): + if args.toolplus: print("Installing additional tools") _install_toolplus(args) if args.install_data: @@ -442,6 +442,7 @@ def _install_toolplus(args): toolplus_dir = os.path.join(_get_data_dir(), "toolplus") for tool in args.toolplus: if tool.name in set(["gatk", "mutect"]): + print("Installing %s" % tool.name) _install_gatk_jar(tool.name, tool.fname, toolplus_manifest, system_config, toolplus_dir) else: raise ValueError("Unexpected toolplus argument: %s %s" % (tool.name, tool.fname)) @@ -494,6 +495,7 @@ def _update_system_file(system_file, name, new_kvs): if rname == name: for k, v in new_kvs.iteritems(): r_kvs[k] = v + added = True new_rs[rname] = r_kvs if not added: new_rs[name] = new_kvs
toolplus: don't overwrite existing config keyvals When adding jar locations for GATK and MuTect, leave existing key value specifications in place. Fixes #<I>
diff --git a/src/components/player.js b/src/components/player.js index <HASH>..<HASH> 100644 --- a/src/components/player.js +++ b/src/components/player.js @@ -392,7 +392,9 @@ export default class Player extends BaseObject { * @param {Number} volume should be a number between 0 and 100, 0 being mute and 100 the max volume. */ setVolume(volume) { - this.core.mediaControl.container.setVolume(volume); + if (this.core && this.core.mediaControl) { + this.core.mediaControl.setVolume(volume); + } } /** @@ -401,7 +403,7 @@ export default class Player extends BaseObject { * @return {Number} volume should be a number between 0 and 100, 0 being mute and 100 the max volume. */ getVolume() { - return this.core.mediaControl.container.volume; + return this.core && this.core.mediaControl ? this.core.mediaControl.volume : 0; } /**
Refactor player.setVolume to fix #<I>
diff --git a/test/scenarios/issue_649.py b/test/scenarios/issue_649.py index <HASH>..<HASH> 100755 --- a/test/scenarios/issue_649.py +++ b/test/scenarios/issue_649.py @@ -17,7 +17,7 @@ opts = op.parse(sys.argv) with driver.Metacluster(driver.find_rethinkdb_executable(opts["mode"])) as metacluster: cluster = driver.Cluster(metacluster) print "Starting cluster..." - num_nodes = 1 + num_nodes = 2 files = [driver.Files(metacluster, db_path = "db-%d" % i, log_path = "create-output-%d" % i) for i in xrange(num_nodes)] processes = [driver.Process(cluster, files[i], log_path = "serve-output-%d" % i)
Test with 2 nodes, not just 1.
diff --git a/go/cmd/vt_binlog_server/vt_binlog_server.go b/go/cmd/vt_binlog_server/vt_binlog_server.go index <HASH>..<HASH> 100644 --- a/go/cmd/vt_binlog_server/vt_binlog_server.go +++ b/go/cmd/vt_binlog_server/vt_binlog_server.go @@ -431,7 +431,9 @@ func (blp *Blp) parseXid(line []byte) { func (blp *Blp) parseGroupId(line []byte) { rem := bytes.SplitN(line, mysqlctl.BINLOG_GROUP_ID, 2) - groupId, err := strconv.ParseUint(string(rem[1]), 10, 64) + rem2 := bytes.SplitN(rem[1], mysqlctl.SPACE, 2) + groupIdStr := strings.TrimSpace(string(rem2[0])) + groupId, err := strconv.ParseUint(groupIdStr, 10, 64) if err != nil { panic(NewBinlogParseError(fmt.Sprintf("Error in extracting group_id %v, sql %v", err, string(line)))) }
Fixed group_id parsing.
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() { - serverChannelFactory.shutdown(); + // ignore, no external resources to shutdown as it always runs on top of another transport (tcp) } @Override public void releaseExternalResources() { - serverChannelFactory.releaseExternalResources(); + // ignore, no external resources to shutdown as it always runs on top of another transport (tcp) } }
ignored calls to shutdown and releaseExternalResources as it has no physical assets to release or shutdown at its transport layer
diff --git a/pupa/tests/importers/test_event_importer.py b/pupa/tests/importers/test_event_importer.py index <HASH>..<HASH> 100644 --- a/pupa/tests/importers/test_event_importer.py +++ b/pupa/tests/importers/test_event_importer.py @@ -138,11 +138,15 @@ def test_bad_event_time(): @pytest.mark.django_db def test_top_level_media_event(): j = Jurisdiction.objects.create(id='jid', division_id='did') - event = ge() - event.add_media_link( - "fireworks", - "http://example.com/fireworks.mov", - media_type='application/octet-stream' - ) - obj, what = EventImporter('jid').import_item(event.as_dict()) + event1, event2 = ge(), ge() + + event1.add_media_link("fireworks", "http://example.com/fireworks.mov", + media_type='application/octet-stream') + event2.add_media_link("fireworks", "http://example.com/fireworks.mov", + media_type='application/octet-stream') + + obj, what = EventImporter('jid').import_item(event1.as_dict()) assert what == 'insert' + + obj, what = EventImporter('jid').import_item(event2.as_dict()) + assert what == 'noop'
Fix media test to check for dupes
diff --git a/lib/em-http-server/response.rb b/lib/em-http-server/response.rb index <HASH>..<HASH> 100644 --- a/lib/em-http-server/response.rb +++ b/lib/em-http-server/response.rb @@ -53,6 +53,7 @@ module EventMachine def initialize @headers = {} + @keep_connection_open = false end def keep_connection_open arg=true
remove warning for uninitialized var (issue #5)
diff --git a/risklib/api.py b/risklib/api.py index <HASH>..<HASH> 100644 --- a/risklib/api.py +++ b/risklib/api.py @@ -264,7 +264,7 @@ class ProbabilisticEventBased(object): def aggregate_losses(set_of_outputs, result=None): for asset_output in set_of_outputs: if result is None: # first time - result = asset_output.losses[:] # take a copy + result = numpy.copy(asset_output.losses) else: result += asset_output.losses # mutate the copy return result
Really fixed the mutation issue in aggregate_losses
diff --git a/src/OverlayTrigger.js b/src/OverlayTrigger.js index <HASH>..<HASH> 100644 --- a/src/OverlayTrigger.js +++ b/src/OverlayTrigger.js @@ -31,7 +31,7 @@ class OverlayTrigger extends Overlay { showOverlay (e) { e.preventDefault(); - $(`#${this.overlayID}`).modal(this.props.modalOptions).modal('open'); + $(`#${this.overlayID}`).modal('open', this.props.modalOptions); } }
Update OverlayTrigger.js (#<I>) Modal options only work if the command is sent in with the options.
diff --git a/src/Responder/View.php b/src/Responder/View.php index <HASH>..<HASH> 100644 --- a/src/Responder/View.php +++ b/src/Responder/View.php @@ -136,14 +136,15 @@ class View extends AbstractWithViewData public function asFileContents($file_loc, $mime) { if (is_string($file_loc)) { - $stream = fopen($file_loc, 'rb'); + $contents = file_get_contents($file_loc); } elseif (is_resource($file_loc)) { - $stream = $file_loc; + rewind($file_loc); + $contents = stream_get_contents($file_loc); } else { throw new \InvalidArgumentException; } - return $this->asResponse($stream, self::OK, ['Content-Type' => $mime]); + return $this->asResponse($contents, self::OK, ['Content-Type' => $mime]); } /**
convert $file_loc into string as response's body.
diff --git a/inginious/common/custom_yaml.py b/inginious/common/custom_yaml.py index <HASH>..<HASH> 100644 --- a/inginious/common/custom_yaml.py +++ b/inginious/common/custom_yaml.py @@ -21,7 +21,11 @@ from collections import OrderedDict import yaml as original_yaml - +try: + from yaml import CSafeLoader as SafeLoader + from yaml import CSafeDumper as SafeDumper +except ImportError: + from yaml import SafeLoader, SafeDumper def load(stream): """ @@ -32,7 +36,7 @@ def load(stream): Safe version. """ - class OrderedLoader(original_yaml.SafeLoader): + class OrderedLoader(SafeLoader): pass def construct_mapping(loader, node): @@ -59,7 +63,7 @@ def dump(data, stream=None, **kwds): """ # Display OrderedDicts correctly - class OrderedDumper(original_yaml.SafeDumper): + class OrderedDumper(SafeDumper): pass def _dict_representer(dumper, data):
Improve the speed of the YAML dumper/loader ...when LibYAML is installed on the system. This hopefully fixes the problems with very long generation times of submissions archives. (from 1h+ to less than a minute...) TODO: update the doc to incite to install libyaml.
diff --git a/CrashReport/src/org/acra/HttpUtils.java b/CrashReport/src/org/acra/HttpUtils.java index <HASH>..<HASH> 100644 --- a/CrashReport/src/org/acra/HttpUtils.java +++ b/CrashReport/src/org/acra/HttpUtils.java @@ -95,8 +95,12 @@ class HttpUtils { .getInputStream())); String line; + int linecount = 0; while ((line = rd.readLine()) != null) { - Log.d(LOG_TAG, line); + linecount++; + if(linecount <= 2) { + Log.d(LOG_TAG, line); + } } rd.close(); }
Log only the 2 first lines of the response.
diff --git a/generator/classes/propel/engine/builder/sql/pgsql/PgsqlDataSQLBuilder.php b/generator/classes/propel/engine/builder/sql/pgsql/PgsqlDataSQLBuilder.php index <HASH>..<HASH> 100644 --- a/generator/classes/propel/engine/builder/sql/pgsql/PgsqlDataSQLBuilder.php +++ b/generator/classes/propel/engine/builder/sql/pgsql/PgsqlDataSQLBuilder.php @@ -37,6 +37,9 @@ class PgsqlDataSQLBuilder extends DataSQLBuilder { */ protected function getBooleanSql($value) { + if ($value === 'f' || $value === 'false' || $value === "0") { + $value = false; + } return ($value ? "'t'" : "'f'"); }
ticket:<I> - Fix to Postgres generated SQL for BOOLEAN columns.
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpMessageConvertersAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpMessageConvertersAutoConfiguration.java index <HASH>..<HASH> 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpMessageConvertersAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpMessageConvertersAutoConfiguration.java @@ -144,7 +144,9 @@ public class HttpMessageConvertersAutoConfiguration { @Bean @ConditionalOnMissingBean public StringHttpMessageConverter stringHttpMessageConverter() { - return new StringHttpMessageConverter(this.encodingProperties.getCharset()); + StringHttpMessageConverter converter = new StringHttpMessageConverter(this.encodingProperties.getCharset()); + converter.setWriteAcceptCharset(false); + return converter; } }
Disable Accept-Charset Header in String converter This commit prevents the `Accept-Charset` from being written by the StringHttpMessageConverter. This feature is enabled by default in the framework and writes a *quite long* response header with all charsets supported by the server. Closes gh-<I>, see gh-<I>
diff --git a/src/app/n2n/web/http/controller/ControllingPlan.php b/src/app/n2n/web/http/controller/ControllingPlan.php index <HASH>..<HASH> 100644 --- a/src/app/n2n/web/http/controller/ControllingPlan.php +++ b/src/app/n2n/web/http/controller/ControllingPlan.php @@ -179,14 +179,18 @@ class ControllingPlan { throw new ControllingPlanException('No filter controller to execute.'); } - return $this->executeFilter($nextFilter, $try); + if ($nextFilter->execute()) return true; + + if ($try) return false; + + throw new PageNotFoundException(); } public function executeToMain() { $this->ensureFilterable(); while (null !== ($nextFilter = $this->nextFilter())) { - $this->executeFilter($nextFilter, false); + $nextFilter->execute(); } $this->status = self::STATUS_MAIN;
executeToMain not found exceptions
diff --git a/ethtool.go b/ethtool.go index <HASH>..<HASH> 100644 --- a/ethtool.go +++ b/ethtool.go @@ -54,7 +54,7 @@ const ( // MAX_GSTRINGS maximum number of stats entries that ethtool can // retrieve currently. const ( - MAX_GSTRINGS = 100 + MAX_GSTRINGS = 200 ) type ifreq struct {
raised the limit for MAX_GSTRINGS size by <I> percent Was working with solarflare cards and they returned a lot more stats than the old value could handle.
diff --git a/src/main/java/com/threerings/crowd/chat/client/MuteDirector.java b/src/main/java/com/threerings/crowd/chat/client/MuteDirector.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/threerings/crowd/chat/client/MuteDirector.java +++ b/src/main/java/com/threerings/crowd/chat/client/MuteDirector.java @@ -82,6 +82,7 @@ public class MuteDirector extends BasicDirector _chatdir.removeChatFilter(this); _chatdir = null; } + _ctx.getClient().removeClientObserver(this); } /**
We register as a client observer when we start up; we need to remove ourselves when we shut down. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@<I> <I>f4-<I>e9-<I>-aa3c-eee0fc<I>fb1
diff --git a/admin/cron.php b/admin/cron.php index <HASH>..<HASH> 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -430,7 +430,7 @@ if (!empty($CFG->enablestats) and empty($CFG->disablestatsprocessing)) { // check we're not before our runtime - $timetocheck = strtotime("$CFG->statsruntimestarthour:$CFG->statsruntimestartminute today"); + $timetocheck = strtotime("today $CFG->statsruntimestarthour:$CFG->statsruntimestartminute"); if (time() > $timetocheck) { $time = 60*60*20; // set it to 20 here for first run... (overridden by $CFG)
MDL-<I> - stats wasn't paying attention to run time settings as the strtotime arguments were the wrong way round. Thanks to Mark Nielsen
diff --git a/src/leaflet-panel-layers.js b/src/leaflet-panel-layers.js index <HASH>..<HASH> 100644 --- a/src/leaflet-panel-layers.js +++ b/src/leaflet-panel-layers.js @@ -19,6 +19,7 @@ L.Control.PanelLayers = L.Control.Layers.extend({ options: { compact: false, + compactOffset: 0, collapsed: false, autoZIndex: true, collapsibleGroups: false, @@ -402,7 +403,7 @@ L.Control.PanelLayers = L.Control.Layers.extend({ h = h || this._map.getSize().y; if (this.options.compact) - this._form.style.maxHeight = h + 'px'; + this._form.style.maxHeight = (h - this.options.compactOffset) + 'px'; else this._form.style.height = h + 'px'; },
Added offset from top of the box
diff --git a/target.go b/target.go index <HASH>..<HASH> 100644 --- a/target.go +++ b/target.go @@ -249,6 +249,8 @@ func (t *Target) pageEvent(ev interface{}) { return case *page.EventDownloadWillBegin: return + case *page.EventDownloadProgress: + return default: t.errf("unhandled page event %T", ev)
don't error on downloadProgress events These seem fairly recent, so explicitly ignore them, just like we do with downloadWillBegin.
diff --git a/src/WebSocket.php b/src/WebSocket.php index <HASH>..<HASH> 100644 --- a/src/WebSocket.php +++ b/src/WebSocket.php @@ -39,7 +39,15 @@ class WebSocket extends \Swlib\Http\Request if ($mock) { $this->withMock($ssl); } - $ret = $this->client->upgrade($uri->getPath() ?: '/'); + + parse_str($this->uri->getQuery(), $query); + $query = $this->getQueryParams() + $query; //attribute value first + $query = http_build_query($query); + + $path = $this->uri->getPath() ?: '/'; + $path = empty($query) ? $path : $path . '?' . $query; + + $ret = $this->client->upgrade($path); if (!$ret) { throw new ConnectException( $this, $this->client->errCode,
Support query in Websocket client.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ var concatStream = require('concat-stream'); function maybeNewExecError(name, args, stderr, code, existingError) { // Returns a new error if all the necessary information is available - if (typeof stderr === 'string' && typeof code === 'number') { + if (typeof stderr === 'string' && typeof code === 'number' && code !== 0) { return new Error('Process `' + name + ' ' + args.join(' ') + '` exited with non-zero exit code ' + code + '; stderr is:\n' + stderr); } else { return undefined; @@ -85,9 +85,7 @@ module.exports = function smartSpawn(name, args, targetCwd, callback) { exitCode = code; - if (code !== 0) { - callbackErr = callbackErr instanceof Error ? callbackErr : maybeNewExecError(name, args, stderr, exitCode, callbackErr); - } + callbackErr = callbackErr instanceof Error ? callbackErr : maybeNewExecError(name, args, stderr, exitCode, callbackErr); wantCallback = true; maybeFireCallback();
Fix an error sometimes being returned upon success
diff --git a/examples/bench/bench.py b/examples/bench/bench.py index <HASH>..<HASH> 100644 --- a/examples/bench/bench.py +++ b/examples/bench/bench.py @@ -27,9 +27,9 @@ class EchoConnection(SockJSConnection): self.clients.remove(self) @classmethod - def dump_stats(self): + def dump_stats(cls): # Print current client count - print 'Clients: %d' % (len(self.clients)) + print 'Clients: %d' % (len(cls.clients)) if __name__ == '__main__': options = dict()
Pedantic fix, 1st arg to classmethod is cls
diff --git a/lib/grasshopper.js b/lib/grasshopper.js index <HASH>..<HASH> 100644 --- a/lib/grasshopper.js +++ b/lib/grasshopper.js @@ -7,6 +7,11 @@ module.exports = (function(){ q = require('q'); /** + * Expose the events that are taking place in grasshopper core. + */ + grasshopper.event = require('./event'); + + /** * Expose the available roles in the system. */ grasshopper.roles = require('./security/roles');
Exposed the event modules through the grasshopper library.
diff --git a/syntax/printer_test.go b/syntax/printer_test.go index <HASH>..<HASH> 100644 --- a/syntax/printer_test.go +++ b/syntax/printer_test.go @@ -256,6 +256,7 @@ func TestFprintWeirdFormat(t *testing.T) { "{\n\tfoo\n\t#a\n} |\n# misplaced\nbar", "# misplaced\n{\n\tfoo\n\t#a\n} \\\n\t| bar", }, + samePrint("foo | bar\n#after"), { "{\nfoo &&\n#a1\n#a2\n$(bar)\n}", "{\n\t#a1\n\t#a2\n\tfoo \\\n\t\t&& $(bar)\n}",
syntax: full test coverage for printer.go again
diff --git a/examples/demo/src/layout/Login.js b/examples/demo/src/layout/Login.js index <HASH>..<HASH> 100644 --- a/examples/demo/src/layout/Login.js +++ b/examples/demo/src/layout/Login.js @@ -79,9 +79,8 @@ const Login = ({ location }) => { const handleSubmit = auth => { setLoading(true); - login(auth, location.state ? location.state.nextPathname : '/') - .then(() => setLoading(false)) - .catch(error => { + login(auth, location.state ? location.state.nextPathname : '/').catch( + error => { setLoading(false); notify( typeof error === 'string' @@ -91,7 +90,8 @@ const Login = ({ location }) => { : error.message, 'warning' ); - }); + } + ); }; const validate = values => {
Fix warning about unmounted component after Login on Demo
diff --git a/src/utils/services/call.js b/src/utils/services/call.js index <HASH>..<HASH> 100644 --- a/src/utils/services/call.js +++ b/src/utils/services/call.js @@ -17,8 +17,8 @@ export default function callService (methodName, params, options) { // API params = params || {} options = options || {} - var secretApiKey = options.secretApiKey - var publishableApiKey = options.publishableApiKey + var secretApiKey = options.secretApiKey || configs.secretApiKey + var publishableApiKey = options.publishableApiKey || configs.publishableApiKey // try cache // var cacheKey
Get API keys from configs if not provided in options
diff --git a/mpdf.php b/mpdf.php index <HASH>..<HASH> 100644 --- a/mpdf.php +++ b/mpdf.php @@ -88,14 +88,6 @@ if (!defined('_MPDF_TTFONTDATAPATH')) { $errorlevel = error_reporting(); $errorlevel = error_reporting($errorlevel & ~E_NOTICE); -//error_reporting(E_ALL); - -if (function_exists("date_default_timezone_set")) { - if (ini_get("date.timezone") == "") { - date_default_timezone_set("Europe/London"); - } -} - if (!function_exists('mb_strlen')) { throw new MpdfException('mPDF requires mb_string functions. Ensure that mb_string extension is loaded.'); }
Do not alter timezone even if not set
diff --git a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php index <HASH>..<HASH> 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php @@ -86,6 +86,7 @@ class RecordController extends Controller // get field's values $recordCaptions[$field->get_name()] = $field->get_serialized_values(); } + $recordCaptions["technicalInfo"] = $record->getPositionFromTechnicalInfos(); return $this->app->json([ "desc" => $this->render('prod/preview/caption.html.twig', [ diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index <HASH>..<HASH> 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -781,7 +781,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface ]; } - return ['isCoordComplete' => 0, 'latitude' => 0, 'longitude' => 0]; + return ['isCoordComplete' => 0, 'latitude' => 'false', 'longitude' => 'false']; } /**
add technicalInfo in record of detail view
diff --git a/lib/david/transmission.rb b/lib/david/transmission.rb index <HASH>..<HASH> 100644 --- a/lib/david/transmission.rb +++ b/lib/david/transmission.rb @@ -31,12 +31,17 @@ module David end def normalize_host(host) - ip = IPAddr.new(Resolv.getaddress(host)) + ip = IPAddr.new(host) if ipv6? && ip.ipv4? ip = ip.ipv4_mapped end - rescue Resolv::ResolvError + rescue ArgumentError + begin + host = Resolv.getaddress(host) + retry + rescue Resolv::ResolvError + end else ip.to_s end
Resolve on send only if no IP address.
diff --git a/src/App.php b/src/App.php index <HASH>..<HASH> 100644 --- a/src/App.php +++ b/src/App.php @@ -16,7 +16,7 @@ class App // @var array|false Location where to load JS/CSS files public $cdn = [ - 'atk' => 'https://cdn.rawgit.com/atk4/ui/1.2.3/public', + 'atk' => 'https://cdn.rawgit.com/atk4/ui/1.3.0/public', 'jquery' => 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1', 'serialize-object' => 'https://cdnjs.cloudflare.com/ajax/libs/jquery-serialize-object/2.5.0', 'semantic-ui' => 'https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10', @@ -24,7 +24,7 @@ class App ]; // @var string Version of Agile UI - public $version = '1.2.3'; + public $version = '1.3.0'; // @var string Name of application public $title = 'Agile UI - Untitled Application';
Updated CDN and $version in App.php to <I>
diff --git a/grunt_tasks/webpack.config.js b/grunt_tasks/webpack.config.js index <HASH>..<HASH> 100644 --- a/grunt_tasks/webpack.config.js +++ b/grunt_tasks/webpack.config.js @@ -190,7 +190,6 @@ module.exports = { alias: { 'girder': paths.web_src }, - extensions: ['.styl', '.css', '.pug', '.jade', '.js', ''], modules: [ paths.clients_web, paths.plugins,
Remove resolve.extensions option from webpack config
diff --git a/evaluation/evaluate.py b/evaluation/evaluate.py index <HASH>..<HASH> 100644 --- a/evaluation/evaluate.py +++ b/evaluation/evaluate.py @@ -18,25 +18,26 @@ parser.add_argument("-d", "--dataset", help="specify which dataset to use.") parser.add_argument("-b", "--baseline", action="store_true", help="calculates the baselines scores.") args = parser.parse_args() -# Calculate all rouge scores by default. -if args.text_numbers: - text_numbers = [int(x) for x in args.text_numbers] -else: - text_numbers = xrange(1, 25) # Will stop working soon, FIXME - # Use elhadad dataset by default. if args.dataset: dataset = args.dataset else: dataset = 'elhadad' +dataset_path = os.path.join('datasets', dataset) + +# Calculate all rouge scores by default. +if args.text_numbers: + text_numbers = [int(n) for n in args.text_numbers] +else: + text_numbers = sorted(int(n) for n in os.listdir(dataset_path) if os.path.isdir(os.path.join(dataset_path, n))) + # Don't calculate baseline method by default. if args.baseline: method = baseline else: method = textrank - calculator = RougeCalculator(dataset, text_numbers, method) results = calculator.get_rouge_scores() export_results(dataset, results)
Adding support to summarize all files in a dataset directory.
diff --git a/src/Task/DeployTasks.php b/src/Task/DeployTasks.php index <HASH>..<HASH> 100644 --- a/src/Task/DeployTasks.php +++ b/src/Task/DeployTasks.php @@ -4,7 +4,7 @@ namespace Droath\ProjectX\Task; use Droath\ProjectX\Project\NullProjectType; use Droath\ProjectX\ProjectX; -use Droath\RoboGitHub\Task\loadTasks as githubTasks; +use Droath\RoboGitHub\Task\loadTasks; use Robo\Contract\TaskInterface; use Robo\Contract\VerbosityThresholdInterface; use Robo\Task\Filesystem\loadTasks as filesystemTasks; @@ -16,7 +16,7 @@ use Symfony\Component\Console\Question\Question; */ class DeployTasks extends TaskBase { - use githubTasks; + use loadTasks; use filesystemTasks; /**
#<I> Update name space to preserve compatibility with php<I>
diff --git a/src/main/java/org/jamesframework/core/search/SearchListener.java b/src/main/java/org/jamesframework/core/search/SearchListener.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jamesframework/core/search/SearchListener.java +++ b/src/main/java/org/jamesframework/core/search/SearchListener.java @@ -18,7 +18,7 @@ import org.jamesframework.core.problems.solutions.Solution; /** * Interface of a listener which may be attached to any search with the specified solution type (or a more specific solution type). - * It will be informed when the search has started, stopped, found a new best solution, or fired a search messages. + * It will be informed when the search has started, stopped, found a new best solution, completed a step or fired a search message. * * @param <SolutionType> solution type of the search to which the listener may be attached, required to extend {@link Solution} * @author Herman De Beukelaer <herman.debeukelaer@ugent.be> @@ -55,5 +55,13 @@ public interface SearchListener<SolutionType extends Solution> { * @param newBestSolutionEvaluation evaluation of the new best solution */ public void newBestSolution(Search<? extends SolutionType> search, SolutionType newBestSolution, double newBestSolutionEvaluation); + + /** + * Called when the search has completed a step. + * + * @param search search which has completed a step + * @param numSteps number of steps completed so far + */ + public void stepCompleted(Search<? extends SolutionType> search, long numSteps); }
added stepCompleted callback to search listener
diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListener.php index <HASH>..<HASH> 100644 --- a/src/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListener.php +++ b/src/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListener.php @@ -71,6 +71,8 @@ class OrderPaymentListener { if (false === $this->getOrder($event)->getLastPayment()) { $this->paymentProcessor->createPayment($this->getOrder($event)); + } else { + $this->getOrder($event)->getLastPayment()->setDetails(array()); } }
Fixed bug in payment flow I noticed that if you are using CreditCard for payment and if you change your mind on page where you need to enter your credit card, jump back to payment methods and pick something else for example offline that there is bug and you cannot complete payment. This PR fix it
diff --git a/sos/archive.py b/sos/archive.py index <HASH>..<HASH> 100644 --- a/sos/archive.py +++ b/sos/archive.py @@ -421,7 +421,7 @@ class FileCacheArchive(Archive): (source, link_name, dest)) source_dir = os.path.dirname(link_name) - host_path_name = os.path.normpath(os.path.join(source_dir, source)) + host_path_name = os.path.realpath(os.path.join(source_dir, source)) dest_path_name = self.dest_path(host_path_name) if not os.path.exists(dest_path_name):
[archive] canonicalise paths for link follow up Ensure that the canonical path is used when processing link follow up actions: the actual link path may contain one or more levels of symbolic links, leading to broken links if the link target path is assumed to be relative to the containing directory.
diff --git a/lib/Parser.js b/lib/Parser.js index <HASH>..<HASH> 100644 --- a/lib/Parser.js +++ b/lib/Parser.js @@ -533,7 +533,7 @@ Parser.prototype.execute = function(b, start, end) { uint32 data_type_code string data */ - this.emit('CHANNEL_DATA:' + payload.readUInt32BE(1, true), + this.emit('CHANNEL_EXTENDED_DATA:' + payload.readUInt32BE(1, true), payload.readUInt32BE(5, true), readString(payload, 9)); break;
parser: fix CHANNEL_EXTENDED_DATA event
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -390,6 +390,14 @@ module ActionView # # hidden_field(:user, :token) # # => <input type="hidden" id="user_token" name="user[token]" value="#{@user.token}" /> + # + # If you have a form object f that is using an object @client: + # <%= f.hidden_field :user_id, :value => current_user.id %> + # # => <input id="client_user_id" name="client[user_id]" type="hidden" value="12345" /> + # + # This passes a hidden variable user_id with the value of current_user.id, it can be accessed in the controller as: + # params[:client][:user_id] + def hidden_field(object_name, method, options = {}) InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("hidden", options) end
Simple example added for using hidden_field tag used in a form
diff --git a/packages/basic-component-mixins/KeyboardDirection.js b/packages/basic-component-mixins/KeyboardDirection.js index <HASH>..<HASH> 100644 --- a/packages/basic-component-mixins/KeyboardDirection.js +++ b/packages/basic-component-mixins/KeyboardDirection.js @@ -30,6 +30,8 @@ export default (base) => class KeyboardDirection extends base { keydown(event) { let handled; + // Ignore Left/Right keys when metaKey or altKey modifier is also pressed, + // as the user may be trying to navigate back or forward in the browser. switch (event.keyCode) { case 35: // End handled = this.goEnd(); @@ -38,13 +40,17 @@ export default (base) => class KeyboardDirection extends base { handled = this.goStart(); break; case 37: // Left - handled = this.goLeft(); + if (!event.metaKey && !event.altKey) { + handled = this.goLeft(); + } break; case 38: // Up handled = event.altKey ? this.goStart() : this.goUp(); break; case 39: // Right - handled = this.goRight(); + if (!event.metaKey && !event.altKey) { + handled = this.goRight(); + } break; case 40: // Down handled = event.altKey ? this.goEnd() : this.goDown();
Ignore Left/Right key events if meta or alt key is also pressed; user may be trying to navigate Back/Forward in browser.
diff --git a/json-engine.js b/json-engine.js index <HASH>..<HASH> 100644 --- a/json-engine.js +++ b/json-engine.js @@ -33,7 +33,7 @@ module.exports = function (file, engineOptions) { // Handle id increment function getNextId() { var dataIds = Object.keys(idIndexData) - + dataIds.sort(function (a, b) { return b - a }) @@ -137,6 +137,11 @@ module.exports = function (file, engineOptions) { var updateData = overwrite ? updateObject : _.extend(idIndexData[id], updateObject) idIndexData[id] = updateData + // update our data + var find = {} + find[options.idProperty] = id + data.splice(_.findIndex(data, find), 1, updateData); + saveFile('afterUpdate', updateData, callback) } @@ -215,7 +220,7 @@ module.exports = function (file, engineOptions) { function count(query, callback) { self.emit('count', query) - + self.find(query, function (error, objects) { callback(null, objects ? objects.length : 0) })
Update function will modify the file on filesystem
diff --git a/auth/jwt.go b/auth/jwt.go index <HASH>..<HASH> 100644 --- a/auth/jwt.go +++ b/auth/jwt.go @@ -144,7 +144,13 @@ func TokenGenerator(h http.Handler, auth Authenticator, secret []byte, opts ...T o.apply(opts) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if err := r.ParseForm(); err != nil { + var err error + if strings.HasPrefix(r.Header.Get("Content-Type"), "multipart/form-data") { + err = r.ParseMultipartForm(0) + } else { + err = r.ParseForm() + } + if err != nil { o.logger.Print("Invalid request form: ", err) http.Error(w, err.Error(), http.StatusBadRequest) @@ -152,7 +158,8 @@ func TokenGenerator(h http.Handler, auth Authenticator, secret []byte, opts ...T } user := r.FormValue(o.user) - if !auth.Authenticate(user, r.FormValue(o.password)) { + password := r.FormValue(o.password) + if user == "" || password == "" || !auth.Authenticate(user, password) { w.WriteHeader(http.StatusUnauthorized) return }
Handle multipart forms as well as regular ones.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = '1.1a1' +version = '1.1a2' LONG_DESCRIPTION = """ Using django-avatar
Bumped to <I>a2.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ setup( download_url='https://github.com/tomduck/pandoc-tablenos/tarball/' + \ __version__, - install_requires=['pandoc-xnos >= 2.1.2, < 3.0'], + install_requires=['pandoc-xnos >= 2.4.0, < 3.0'], py_modules=['pandoc_tablenos'], entry_points={'console_scripts':['pandoc-tablenos = pandoc_tablenos:main']},
Bumped pandoc-xnos requirement.
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index <HASH>..<HASH> 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -239,7 +239,14 @@ class EditCommand(Command): value = re.sub('[ \t\r\f\v]*\n[ \t\r\f\v]*', ' ', value) headertext += '%s: %s\n' % (key, value) + # determine editable content bodytext = self.envelope.body + if headertext: + content = '%s\n%s' % (headertext, bodytext) + self.edit_only_body = False + else: + content = bodytext + self.edit_only_body = True # call pre-edit translate hook translate = settings.get_hook('pre_edit_translate') @@ -248,11 +255,6 @@ class EditCommand(Command): #write stuff to tempfile tf = tempfile.NamedTemporaryFile(delete=False, prefix='alot.') - content = bodytext - if headertext: - content = '%s\n%s' % (headertext, content) - else: - self.edit_only_body = True tf.write(content.encode('utf-8')) tf.flush() tf.close()
determine editable content before pre-edit-hook this moves the construction of the tempfile content and edit_only_body flag before the call to the pre-translate-hook. Also make the setter more explicit, code readability.
diff --git a/devices/philips.js b/devices/philips.js index <HASH>..<HASH> 100644 --- a/devices/philips.js +++ b/devices/philips.js @@ -1628,6 +1628,15 @@ module.exports = [ ota: ota.zigbeeOTA, }, { + zigbeeModel: ['1742830P7'], + model: '1742830P7', + vendor: 'Philips', + description: 'Hue Lily outdoor spot light', + meta: {turnsOffAtBrightness1: true}, + extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}), + ota: ota.zigbeeOTA, + }, + { zigbeeModel: ['1741530P7', '1741430P7'], model: '1741530P7', vendor: 'Philips',
Add <I>P7 (#<I>) added <I>P7, similar to device <I>P7, so copied <I>P7 over to <I>P7
diff --git a/src/Cache_Command.php b/src/Cache_Command.php index <HASH>..<HASH> 100644 --- a/src/Cache_Command.php +++ b/src/Cache_Command.php @@ -158,6 +158,7 @@ class Cache_Command extends WP_CLI_Command { } /** This filter is documented in wp-includes/class-wp-embed.php */ + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound if ( ! in_array( $post->post_type, apply_filters( 'embed_cache_oembed_types', $post_types ), true ) ) { WP_CLI::warning( sprintf( "Cannot cache oEmbed results for '%s' post type", $post->post_type ) ); diff --git a/src/Fetch_Command.php b/src/Fetch_Command.php index <HASH>..<HASH> 100644 --- a/src/Fetch_Command.php +++ b/src/Fetch_Command.php @@ -135,6 +135,7 @@ class Fetch_Command extends WP_CLI_Command { ); // Allow `wp_filter_pre_oembed_result()` to provide local URLs (WP >= 4.5.3). + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound $data = apply_filters( 'pre_oembed_result', null, $url, $oembed_args ); if ( null === $data ) {
PHPCS: ignore error about prefixing hook names
diff --git a/client/my-sites/controller.js b/client/my-sites/controller.js index <HASH>..<HASH> 100644 --- a/client/my-sites/controller.js +++ b/client/my-sites/controller.js @@ -116,8 +116,6 @@ function renderSelectedSiteIsDomainOnly( reactContext, selectedSite ) { const EmptyContentComponent = require( 'components/empty-content' ); const { store: reduxStore } = reactContext; - removeSidebar( reactContext ); - renderWithReduxStore( React.createElement( EmptyContentComponent, { title: i18n.translate( 'Add a site to start using this feature.' ), @@ -130,6 +128,12 @@ function renderSelectedSiteIsDomainOnly( reactContext, selectedSite ) { document.getElementById( 'primary' ), reduxStore ); + + renderWithReduxStore( + createNavigation( reactContext ), + document.getElementById( 'secondary' ), + reduxStore + ); } function isPathAllowedForDomainOnlySite( pathname, domainName ) {
My Sites: Bring back the sidebar for all My Sites pages for domain-only sites
diff --git a/src/easy-autocomplete.js b/src/easy-autocomplete.js index <HASH>..<HASH> 100644 --- a/src/easy-autocomplete.js +++ b/src/easy-autocomplete.js @@ -30,6 +30,9 @@ function init(Survey, $) { obj.choicesByUrl.setData(value); } }); + Array.prototype.push.apply( + Survey.matrixDropdownColumnTypes.text.properties, + ["choices", "choicesOrder", "choicesByUrl", "otherText"]); }, afterRender: function(question, el) { var $el = $(el).is("input") ? $(el) : $(el).find("input");
Fix #<I> Easyautocomplete not working on MatrixDynamic questions
diff --git a/src/slider.js b/src/slider.js index <HASH>..<HASH> 100644 --- a/src/slider.js +++ b/src/slider.js @@ -624,7 +624,7 @@ function slider(orientation, scale) { } var toArray = Array.isArray(_) ? _ : [_]; - toArray.sort((a, b) => a - b); + toArray.sort(function (a, b) { return a - b; }); var pos = toArray.map(scale).map(identityClamped); var newValue = pos.map(scale.invert).map(alignedValue); @@ -644,7 +644,7 @@ function slider(orientation, scale) { } var toArray = Array.isArray(_) ? _ : [_]; - toArray.sort((a, b) => a - b); + toArray.sort(function (a, b) { return a - b; }); var pos = toArray.map(scale).map(identityClamped); var newValue = pos.map(scale.invert).map(alignedValue); @@ -665,7 +665,7 @@ function slider(orientation, scale) { var toArray = Array.isArray(_) ? _ : [_]; - toArray.sort((a, b) => a - b); + toArray.sort(function (a, b) { return a - b; }); defaultValue = toArray; value = toArray;
Changes to support IE <I> Thanks for creating this package, I find it very useful. This small changes gets my example working in an older version of Internet Explorer.
diff --git a/spec/helper.rb b/spec/helper.rb index <HASH>..<HASH> 100644 --- a/spec/helper.rb +++ b/spec/helper.rb @@ -15,6 +15,12 @@ require 'congress' require 'rspec' require 'webmock/rspec' +RSpec.configure do |config| + config.expect_with :rspec do |c| + c.syntax = :expect + end +end + WebMock.disable_net_connect!(:allow => 'coveralls.io') def a_get(path)
Enforce use of expect syntax (no "should"s)
diff --git a/rules-java/api/src/main/resources/reports/resources/js/windup-overview.js b/rules-java/api/src/main/resources/reports/resources/js/windup-overview.js index <HASH>..<HASH> 100644 --- a/rules-java/api/src/main/resources/reports/resources/js/windup-overview.js +++ b/rules-java/api/src/main/resources/reports/resources/js/windup-overview.js @@ -13,7 +13,6 @@ $(document).on('click', '.panel-heading', function(e){ expandSelected(this); } }) -$('#collapseAll').toggle(); function expandSelected(e) { var $this = $(e); @@ -49,6 +48,7 @@ function expandMemory(){ }); } + // function expandAll(){ $('.panel-body').slideDown(); @@ -68,4 +68,13 @@ function collapseAll(){ $('#collapseAll').toggle(); } -expandMemory(); \ No newline at end of file +expandMemory(); + +// show properly the Collapse/Expand All link +if ( $('.panel-heading').find('.glyphicon-chevron-up').length > 0) { + $('#collapseAll').toggle(); +} +else { + $('#expandAll').toggle(); +} +
WINDUP-<I> addition to the change to fix Expand/Collapse All links
diff --git a/app/lib/actions/katello/repository/destroy.rb b/app/lib/actions/katello/repository/destroy.rb index <HASH>..<HASH> 100644 --- a/app/lib/actions/katello/repository/destroy.rb +++ b/app/lib/actions/katello/repository/destroy.rb @@ -18,17 +18,11 @@ module Actions end plan_action(ContentViewPuppetModule::Destroy, repository) if repository.puppet? - - pulp2_destroy_action = - sequence do - create_action = plan_action( - PulpSelector, + plan_action(PulpSelector, [Pulp::Repository::Destroy, Pulp3::Orchestration::Repository::Delete], repository, SmartProxy.pulp_master, repository_id: repository.id) - end - plan_self(:user_id => ::User.current.id) sequence do if repository.redhat?
Fixes #<I> - cleaned up rubocop warnings
diff --git a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php +++ b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php @@ -31,7 +31,7 @@ use Webmozart\Assert\Assert; class Kernel extends HttpKernel { - public const VERSION = '1.7.0-DEV'; + public const VERSION = '1.7.0'; public const VERSION_ID = '10700'; @@ -41,7 +41,7 @@ class Kernel extends HttpKernel public const RELEASE_VERSION = '0'; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public function __construct(string $environment, bool $debug) {
Change application's version to <I>
diff --git a/protokube/pkg/protokube/volume_mounter.go b/protokube/pkg/protokube/volume_mounter.go index <HASH>..<HASH> 100644 --- a/protokube/pkg/protokube/volume_mounter.go +++ b/protokube/pkg/protokube/volume_mounter.go @@ -119,11 +119,11 @@ func (k *VolumeMountController) safeFormatAndMount(volume *Volume, mountpoint st return fmt.Errorf("error building ns-enter object: %v", err) } - // When used with kubelet, rootDir is supposed to be /var/lib/kubelet - rootDir := "/" + // This is a directory that is mounted identically on the container and the host; we don't have that. + sharedDir := "/no-shared-directories" // Build mount & exec implementations that execute in the host namespaces - safeFormatAndMount.Interface = mount.NewNsenterMounter(rootDir, ne) + safeFormatAndMount.Interface = mount.NewNsenterMounter(sharedDir, ne) safeFormatAndMount.Exec = NewNsEnterExec() // Note that we don't use pathFor for operations going through safeFormatAndMount,
Fix nsenter mounter in protokube We don't have any shared directories, and certainly not root!
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ setup( install_requires=[ 'six>=1.10.0', - 'graphene>=2.0,<3', + 'graphene>=2.0.1,<3', 'Django>=1.8.0', 'iso8601', 'singledispatch>=3.4.0.3',
Date Scalar only added in graphene <I>
diff --git a/dbussy.py b/dbussy.py index <HASH>..<HASH> 100644 --- a/dbussy.py +++ b/dbussy.py @@ -3064,7 +3064,7 @@ class Connection : iface = DBUS.INTERFACE_MONITORING, method = "BecomeMonitor" ) - message.append_objects("asi", (list(format_rule(rule) for rule in rules)), 0) + message.append_objects("asu", (list(format_rule(rule) for rule in rules)), 0) self.send(message) #end become_monitor
correct signature for BecomeMonitor call
diff --git a/curdling/services/dependencer.py b/curdling/services/dependencer.py index <HASH>..<HASH> 100644 --- a/curdling/services/dependencer.py +++ b/curdling/services/dependencer.py @@ -11,8 +11,8 @@ class Dependencer(Service): self.dependency_found = Signal() def handle(self, requester, data): - requirement = data.get('requirement') - wheel = Wheel(data.get('wheel')) + requirement = data['requirement'] + wheel = Wheel(data['wheel']) run_time_dependencies = wheel.metadata.requires_dist for spec in run_time_dependencies: diff --git a/tests/unit/test_services_dependencer.py b/tests/unit/test_services_dependencer.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_services_dependencer.py +++ b/tests/unit/test_services_dependencer.py @@ -16,7 +16,7 @@ def test_dependencer(Wheel): Wheel.return_value = Mock(metadata=Mock(requires_dist=['forbiddenfruit (0.1.1)'])) # When I queue a package and a sentinel and then call the worker - dependencer.queue('tests', requirement='sure') + dependencer.queue('tests', requirement='sure', wheel='forbiddenfruit-0.1-cp27.whl') dependencer.queue(None) dependencer._worker()
Both `requirement` and `wheel` are required parameters for the Dependencer
diff --git a/promise.js b/promise.js index <HASH>..<HASH> 100644 --- a/promise.js +++ b/promise.js @@ -7,6 +7,7 @@ function Promise(resolver) { var _value; var promise = this; + this.then = function(onFulfilled, onRejected) { var deferred = Promise.deferred(); return handler.call(deferred, onFulfilled, onRejected); @@ -56,8 +57,6 @@ }, function(reason) { reject(reason); }); - - return promise; } /**************************** diff --git a/test/promise.js b/test/promise.js index <HASH>..<HASH> 100644 --- a/test/promise.js +++ b/test/promise.js @@ -9,6 +9,13 @@ chai.use(require('sinon-chai')); require('mocha-as-promised')(); describe('PJs', function() { + + describe('constructor', function() { + it('returns an instance of the Promise class', function() { + expect(new Promise(function() {})).to.be.instanceOf(Promise); + }); + }); + describe('#throw', function() { xit('figure out how to test this...'); });
No need to return from a contructor.
diff --git a/readme/markdown.py b/readme/markdown.py index <HASH>..<HASH> 100644 --- a/readme/markdown.py +++ b/readme/markdown.py @@ -21,5 +21,8 @@ from .clean import clean def render(raw): rendered = markdown.markdown( raw, - extensions=['markdown.extensions.fenced_code']) + extensions=[ + 'markdown.extensions.fenced_code', + 'markdown.extensions.smart_strong', + ]) return clean(rendered or raw), bool(rendered) diff --git a/tests/test_markdown.py b/tests/test_markdown.py index <HASH>..<HASH> 100755 --- a/tests/test_markdown.py +++ b/tests/test_markdown.py @@ -81,6 +81,14 @@ def read(fn): assert out == expected_html +def test_smart_strong(): + markdown_markup = 'Text with double__underscore__words.' + out, rendered = render(markdown_markup) + expected_html = '<p>Text with double__underscore__words.</p>' + assert rendered + assert out == expected_html + + def test_headings_and_paragraphs(): _do_test_with_files('headings_and_paragraphs')
Add support for markdown.extensions.smart_strong Allows markup like: Text with double__underscore__words. And it will render the double underscores within the words instead of taking them to mean to format as strong.