diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/python/src/cm_api/endpoints/services.py b/python/src/cm_api/endpoints/services.py index <HASH>..<HASH> 100644 --- a/python/src/cm_api/endpoints/services.py +++ b/python/src/cm_api/endpoints/services.py @@ -299,6 +299,17 @@ class ApiService(BaseApiObject): ) return self._cmd('hdfsEnableHa', data = json.dumps(args)) + def failover_hdfs(self, active_name, standby_name): + """ + Initiate a failover of an HDFS NameNode HA pair. + + @param active_name: name of active NameNode. + @param standby_name: name of stand-by NameNode. + @return: Reference to the submitted command. + """ + args = { ApiList.LIST_KEY : [ active_name, standby_name ] } + return self._cmd('hdfsFailover', data = json.dumps(args)) + def format_hdfs(self, *namenodes): """ Format NameNode instances of an HDFS service.
[API] Add HDFS failover command. A check for the validity of the HA pair was added to the command itself, and a whitelist for internal commands was added to the CommandPurpose test, so that exposing this command through the API requires less code.
diff --git a/core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java b/core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java +++ b/core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java @@ -326,8 +326,7 @@ public class TarInputStream extends FilterInputStream { } if (this.readBuf != null) { - int sz = (numToRead > this.readBuf.length) ? this.readBuf.length - : numToRead; + int sz = Math.min(numToRead, this.readBuf.length); System.arraycopy(this.readBuf, 0, buf, offset, sz);
Replace manual min/max calculation with Math#min
diff --git a/lib/logsly/colors.rb b/lib/logsly/colors.rb index <HASH>..<HASH> 100644 --- a/lib/logsly/colors.rb +++ b/lib/logsly/colors.rb @@ -53,9 +53,9 @@ module Logsly @line_settings = [] end - def run_build + def run_build(*args) if !@been_built - self.instance_eval &@build + self.instance_exec(*args, &@build) @properties = properties.map{|p| self.send(p)} @method = self.method_name diff --git a/test/unit/colors_tests.rb b/test/unit/colors_tests.rb index <HASH>..<HASH> 100644 --- a/test/unit/colors_tests.rb +++ b/test/unit/colors_tests.rb @@ -7,7 +7,9 @@ class Logsly::Colors class BaseTests < Assert::Context desc "the Colors handler" setup do - @colors = Logsly::Colors.new('test_colors') {} + @colors = Logsly::Colors.new('test_colors') do |*args| + debug args.first + end end subject { @colors } @@ -29,6 +31,12 @@ class Logsly::Colors assert_same build_proc, out.build end + should "instance exec its build with args" do + assert_nil subject.debug + subject.run_build :white + assert_equal :white, subject.debug + end + should "know if its been built" do assert_not subject.been_built subject.run_build
run builds with args for Colors class
diff --git a/lib/sear.js b/lib/sear.js index <HASH>..<HASH> 100644 --- a/lib/sear.js +++ b/lib/sear.js @@ -203,7 +203,7 @@ SearModule.prototype._optimizeAMDHeaders = function (toplevel, options) { if (node.args[1] && node.args[1].elements) { - var cbArgs = []; + var cbArgs; if (node.args[2] instanceof UglifyJS.AST_Function) { cbArgs = _.pluck(node.args[2].argnames, 'name'); } @@ -212,7 +212,12 @@ SearModule.prototype._optimizeAMDHeaders = function (toplevel, options) { var value = item.value; if (commonjsModules.indexOf(value) === -1) { defineMap[value] = item.value = defineMap[value] || "m" + (++self.sear._amdHeaderId); - return cbArgs[indx]; + if (!cbArgs) { + // Keep all deps if callback args could not be defined. Callback is a variable or other. + return true; + } else { + return cbArgs[indx]; + } } else { return true; }
Fix vendor amd defines if define callback is defined as a variable
diff --git a/maildump_runner/main.py b/maildump_runner/main.py index <HASH>..<HASH> 100644 --- a/maildump_runner/main.py +++ b/maildump_runner/main.py @@ -146,9 +146,13 @@ def main(): assets.auto_build = args.autobuild_assets app.config['MAILDUMP_HTPASSWD'] = None if args.htpasswd: - # passlib is broken on py39, so we keep the import local for now. + # passlib is broken on py39, hence the local import # https://foss.heptapod.net/python-libs/passlib/-/issues/115 - from passlib.apache import HtpasswdFile + try: + from passlib.apache import HtpasswdFile + except OSError: + print('Are you using Python 3.9? If yes, authentication is currently not available due to a bug.\n\n') + raise app.config['MAILDUMP_HTPASSWD'] = HtpasswdFile(args.htpasswd) app.config['MAILDUMP_NO_QUIT'] = args.no_quit
Be more verbose about broken passlib on py<I>
diff --git a/src/routes.php b/src/routes.php index <HASH>..<HASH> 100644 --- a/src/routes.php +++ b/src/routes.php @@ -91,7 +91,7 @@ Route::group(compact('middleware', 'prefix', 'as', 'namespace'), function () { 'as' => 'getDelete', ]); - Route::get('/demo', 'DemoController@index'); + // Route::get('/demo', 'DemoController@index'); }); Route::group(compact('prefix', 'as', 'namespace'), function () {
DemoController shouldn't enabled by default
diff --git a/lib/pointer.js b/lib/pointer.js index <HASH>..<HASH> 100644 --- a/lib/pointer.js +++ b/lib/pointer.js @@ -53,7 +53,7 @@ Pointer.methodCallSuffixForType = function(typeDef) { // no hard mapping, so try to use size var sz = FFI.sizeOf(typeDef), szMap = FFI.SIZE_TO_POINTER_METHOD_MAP[sz], - signed = (typeDef != "byte" || typeDef.substr(0, 1) == "u"); + signed = (typeDef != "byte" && typeDef != "size_t" && typeDef.substr(0, 1) != "u"); if (sz) { // XXX: This is kind of a shitty way to detect unsigned/signed
Fix the determination for whether a non-specific type is signed
diff --git a/spec/views/dbd_data_engine/data/new.html.haml_spec.rb b/spec/views/dbd_data_engine/data/new.html.haml_spec.rb index <HASH>..<HASH> 100644 --- a/spec/views/dbd_data_engine/data/new.html.haml_spec.rb +++ b/spec/views/dbd_data_engine/data/new.html.haml_spec.rb @@ -12,12 +12,12 @@ describe 'dbd_data_engine/data/new.html.haml' do #should_not raise_error end - it 'talks about predicate' do - rendered.should match(/predicate/i) + it 'has table header "predicate"' do + rendered.should have_xpath('.//table/tr/th', :text => 'predicate') end - it 'talks about object' do - rendered.should match(/object/i) + it 'has table header "object"' do + rendered.should have_xpath('.//table/tr/th', :text => 'object') end it 'has a drop down select box with predicates' do @@ -27,5 +27,9 @@ describe 'dbd_data_engine/data/new.html.haml' do it 'has a submit button' do rendered.should have_button('Submit') end + + it 'has a form that posts to /data/' do + rendered.should have_xpath('.//form[@action="/data"][@method="post"]', :text => 'predicate') + end end end
data/new has a form that posts to /data * from Berlin airport
diff --git a/astrocats/catalog/catdict.py b/astrocats/catalog/catdict.py index <HASH>..<HASH> 100644 --- a/astrocats/catalog/catdict.py +++ b/astrocats/catalog/catdict.py @@ -95,8 +95,9 @@ class CatDict(OrderedDict): if not key.check(kwargs[key]): # Have the parent log a warning if this is a required key warn = (key in self._req_keys) - raise CatDictError("Value for '{}' is invalid '{}'".format( - key.pretty(), kwargs[key]), warn=warn) + raise CatDictError( + "Value for '{}' is invalid '{}'".format( + key.pretty(), kwargs[key])) # Handle Special Cases # -------------------- @@ -118,8 +119,7 @@ class CatDict(OrderedDict): # elements should have been removed from `kwargs`. if not self._ALLOW_UNKNOWN_KEYS and len(kwargs): raise CatDictError( - "All permitted keys stored, remaining: '{}'".format(kwargs), - warn=True) + "All permitted keys stored, remaining: '{}'".format(kwargs)) # Make sure that currently stored values are valid self._check()
BUG: hot-fix... remove 'warn' feature for the moment.
diff --git a/geomet/geopackage.py b/geomet/geopackage.py index <HASH>..<HASH> 100644 --- a/geomet/geopackage.py +++ b/geomet/geopackage.py @@ -108,7 +108,7 @@ def loads(string): Construct a GeoJSON `dict` from geopackage (string). This function strips the geopackage header from the - string and passes the WKB after it directly to the + string and passes the remaining WKB geometry to the `geomet.wkb.loads` function. The envelope, if present, is added to the GeoJSON as
clarify wording in geopackage docstrings
diff --git a/src/edu/jhu/hltcoe/gridsearch/cpt/PseudocostVariableSelector.java b/src/edu/jhu/hltcoe/gridsearch/cpt/PseudocostVariableSelector.java index <HASH>..<HASH> 100644 --- a/src/edu/jhu/hltcoe/gridsearch/cpt/PseudocostVariableSelector.java +++ b/src/edu/jhu/hltcoe/gridsearch/cpt/PseudocostVariableSelector.java @@ -60,7 +60,7 @@ public class PseudocostVariableSelector extends AbstractScoringVariableSelector deltaSum[c][m][lu] += cDelta; numObserved[c][m][lu]++; - String name = node.getIdm().getName(c, m); + String name = idm.getName(c, m); log.trace(String.format("Probing: c=%d m=%d lu=%d name=%s diff=%f", c, m, lu, name, cDelta)); } }
Bug fix: NullPointerException because node wasn't active. git-svn-id: svn+ssh://external.hltcoe.jhu.edu/home/hltcoe/mgormley/public/repos/dep_parse_filtered/trunk@<I> <I>f-cb4b-<I>-8b<I>-c<I>bcb<I>
diff --git a/arguments/__init__.py b/arguments/__init__.py index <HASH>..<HASH> 100644 --- a/arguments/__init__.py +++ b/arguments/__init__.py @@ -510,6 +510,7 @@ class Arguments(object): raise options, positional_arguments = self.sort_arguments(arguments) + self._set_fields(positional_arguments, options) checking_commands = False
devenv Friday <I> April <I> (week:<I> day:<I>), <I>:<I>:<I>
diff --git a/google-apis-generator/lib/google/apis/generator/updater.rb b/google-apis-generator/lib/google/apis/generator/updater.rb index <HASH>..<HASH> 100644 --- a/google-apis-generator/lib/google/apis/generator/updater.rb +++ b/google-apis-generator/lib/google/apis/generator/updater.rb @@ -30,7 +30,7 @@ module Google version_content = changelog_content = nil generator_result.files.each do |path, content| full_path = File.join(base_dir, path) - old_content = File.binread(full_path) if File.readable?(full_path) + old_content = File.read(full_path) if File.readable?(full_path) if path == generator_result.version_path version_content = old_content || content elsif path == generator_result.changelog_path
fix(generator): Fix charset used in file comparison
diff --git a/eventsourcing/tests/contrib_tests/paxos_tests/test_paxos_system.py b/eventsourcing/tests/contrib_tests/paxos_tests/test_paxos_system.py index <HASH>..<HASH> 100644 --- a/eventsourcing/tests/contrib_tests/paxos_tests/test_paxos_system.py +++ b/eventsourcing/tests/contrib_tests/paxos_tests/test_paxos_system.py @@ -60,7 +60,6 @@ class TestPaxosSystem(unittest.TestCase): self.assert_final_value(paxosprocess1, key3, value3) self.assert_final_value(paxosprocess2, key3, value3) print("Resolved paxos 3 with single thread in %ss" % ended3) - sleep(0.1) def test_multiprocessing(self): set_db_uri()
Removed sleep() from end of test.
diff --git a/config/config.php b/config/config.php index <HASH>..<HASH> 100644 --- a/config/config.php +++ b/config/config.php @@ -201,7 +201,7 @@ return [ 'activators' => [ 'file' => [ 'class' => FileActivator::class, - 'statuses-file' => storage_path('modules_statuses.json'), + 'statuses-file' => storage_path('app/modules_statuses.json'), 'cache-key' => 'activator.installed', 'cache-lifetime' => 604800, ],
Change the fileactivator status file path
diff --git a/tests/test-timber-function-wrapper.php b/tests/test-timber-function-wrapper.php index <HASH>..<HASH> 100644 --- a/tests/test-timber-function-wrapper.php +++ b/tests/test-timber-function-wrapper.php @@ -53,7 +53,7 @@ class TestTimberFunctionWrapper extends Timber_UnitTestCase { function testSoloFunction() { new TimberFunctionWrapper('my_boo'); $str = Timber::compile_string("{{ my_boo }}"); - $this->assertEquals('', trim($str)); + $this->assertEquals('bar!', trim($str)); } /* Sample function to test exception handling */ @@ -69,6 +69,5 @@ class TestTimberFunctionWrapper extends Timber_UnitTestCase { } function my_boo() { - echo 'bar!'; return 'bar!'; }
ref #<I> -- or is it?
diff --git a/index.php b/index.php index <HASH>..<HASH> 100644 --- a/index.php +++ b/index.php @@ -2,6 +2,7 @@ // index.php - the front page. require("config.php"); + include("mod/reading/lib.php"); if (! $site = get_record("course", "category", 0)) { redirect("$CFG->wwwroot/admin/"); @@ -23,8 +24,16 @@ <LI><A TITLE="Available courses on this server" HREF="course/"><B>Courses</B></A><BR></LI> <LI><A TITLE="Site-level Forums" HREF="mod/discuss/index.php?id=<?=$site->id?>">Forums</A></LI> - <? include("mod/reading/lib.php"); - list_all_readings(); + <? + if ($readings = list_all_readings()) { + foreach ($readings as $reading) { + echo "<LI>$reading"; + } + } + + if ($USER->editing) { + echo "<P align=right><A HREF=\"$CFG->wwwroot/course/mod.php?id=$course->id&week=0&add=reading\">Add Reading</A>...</P>"; + } ?> <BR><BR>
Some changes to accomodate changes in the reading lib
diff --git a/pkg/cmd/client/kubecfg.go b/pkg/cmd/client/kubecfg.go index <HASH>..<HASH> 100644 --- a/pkg/cmd/client/kubecfg.go +++ b/pkg/cmd/client/kubecfg.go @@ -229,7 +229,7 @@ func (c *KubeConfig) Run() { "imageRepositoryMappings": {"ImageRepositoryMapping", client.RESTClient}, } - matchFound := c.executeConfigRequest(method, clients) || c.executeAPIRequest(method, clients) || c.executeControllerRequest(method, kubeClient) + matchFound := c.executeConfigRequest(method, clients) || c.executeControllerRequest(method, kubeClient) || c.executeAPIRequest(method, clients) if matchFound == false { glog.Fatalf("Unknown command %s", method) } @@ -381,7 +381,7 @@ func (c *KubeConfig) executeAPIRequest(method string, clients ClientMappings) bo func (c *KubeConfig) executeControllerRequest(method string, client *kubeclient.Client) bool { parseController := func() string { if len(c.Args) != 2 { - glog.Fatal("usage: kubecfg [OPTIONS] stop|rm|rollingupdate <controller>") + glog.Fatal("usage: kubecfg [OPTIONS] stop|rm|rollingupdate|run|resize <controller>") } return c.Arg(1) }
Fix problem with replicationController ops in kube command
diff --git a/src/electronRendererEnhancer.js b/src/electronRendererEnhancer.js index <HASH>..<HASH> 100644 --- a/src/electronRendererEnhancer.js +++ b/src/electronRendererEnhancer.js @@ -69,8 +69,9 @@ export default function electronRendererEnhancer({ // Dispatches from other processes are forwarded using this ipc message ipcRenderer.on(`${globalName}-browser-dispatch`, (event, action) => { + action = JSON.parse(action); if (!synchronous || action.source !== currentSource) { - doDispatch(JSON.parse(action)); + doDispatch(action); } });
Fixes #<I>. Parse the action before it's referenced.
diff --git a/services/chocolatey/chocolatey.service.js b/services/chocolatey/chocolatey.service.js index <HASH>..<HASH> 100644 --- a/services/chocolatey/chocolatey.service.js +++ b/services/chocolatey/chocolatey.service.js @@ -3,7 +3,7 @@ import { createServiceFamily } from '../nuget/nuget-v2-service-family.js' export default createServiceFamily({ defaultLabel: 'chocolatey', serviceBaseUrl: 'chocolatey', - apiBaseUrl: 'https://www.chocolatey.org/api/v2', + apiBaseUrl: 'https://community.chocolatey.org/api/v2', odataFormat: 'json', title: 'Chocolatey', examplePackageName: 'git',
Update Chocolatey API endpoint URL (#<I>) Old API endpoint 1. returns bogus redirects for some reason 2. is no longer the Chocolatey Community Repository Resolves #<I> See chocolatey/home#<I>
diff --git a/xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultHTTPChecker.java b/xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultHTTPChecker.java index <HASH>..<HASH> 100644 --- a/xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultHTTPChecker.java +++ b/xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultHTTPChecker.java @@ -50,6 +50,9 @@ public class DefaultHTTPChecker implements HTTPChecker, Initializable /** * The client to connect to the remote site using HTTP. + * <p/> + * Note: If one day we wish to configure timeouts, here's some good documentation about it: + * http://brian.olore.net/wp/2009/08/apache-httpclient-timeout/ */ private HttpClient httpClient;
[Misc] Added link to site with good documentation for commons httpclient timeout configuration
diff --git a/exa/cms/editors/tests/test_editor.py b/exa/cms/editors/tests/test_editor.py index <HASH>..<HASH> 100644 --- a/exa/cms/editors/tests/test_editor.py +++ b/exa/cms/editors/tests/test_editor.py @@ -9,7 +9,7 @@ related functions. """ import shutil import os, gzip, bz2 -from io import StringIO +from io import StringIO, open from uuid import uuid4 from exa._config import config from exa.tester import UnitTester
Overwrite py2 open with io.open
diff --git a/retext.py b/retext.py index <HASH>..<HASH> 100755 --- a/retext.py +++ b/retext.py @@ -40,9 +40,10 @@ def main(): sheetfile.open(QIODevice.ReadOnly) app.setStyleSheet(QTextStream(sheetfile).readAll()) sheetfile.close() - # A work-around for https://bugs.webkit.org/show_bug.cgi?id=114618 - webSettings = QWebSettings.globalSettings() - webSettings.setFontFamily(QWebSettings.FixedFont, 'monospace') + if webkit_available: + # A work-around for https://bugs.webkit.org/show_bug.cgi?id=114618 + webSettings = QWebSettings.globalSettings() + webSettings.setFontFamily(QWebSettings.FixedFont, 'monospace') window = ReTextWindow() window.show() fileNames = [QFileInfo(arg).canonicalFilePath() for arg in sys.argv[1:]]
Apply previous workaround only if webkit_available is True
diff --git a/lib/htmlgrid/grid.rb b/lib/htmlgrid/grid.rb index <HASH>..<HASH> 100644 --- a/lib/htmlgrid/grid.rb +++ b/lib/htmlgrid/grid.rb @@ -22,7 +22,7 @@ # ywesee - intellectual capital connected, Winterthurerstrasse 52, CH-8006 Zuerich, Switzerland # htmlgrid@ywesee.com, www.ywesee.com/htmlgrid # -# HtmlGrid::Grid -- htmlgrid -- 21.02.2012 -- mhatakeyama@ywesee.com +# HtmlGrid::Grid -- htmlgrid -- 22.02.2012 -- mhatakeyama@ywesee.com # HtmlGrid::Grid -- htmlgrid -- 12.01.2010 -- hwyss@ywesee.com begin VERSION = '1.0.4' @@ -155,7 +155,7 @@ rescue LoadError html << field.to_html(cgi) span = field.colspan else - span.step(-1) + span -= 1 end } html
Fixed set_colspan method in grid.rb
diff --git a/src/dataviews/dataview-model-base.js b/src/dataviews/dataview-model-base.js index <HASH>..<HASH> 100644 --- a/src/dataviews/dataview-model-base.js +++ b/src/dataviews/dataview-model-base.js @@ -60,11 +60,18 @@ module.exports = Model.extend({ // Retrigger an event when the filter changes if (this.filter) { - this.listenTo(this.filter, 'change', this._reloadMap); + this.listenTo(this.filter, 'change', this._onFilterChanged); } }, /** + * @private + */ + _onFilterChanged: function () { + this._reloadMap(); + }, + + /** * @protected */ _reloadMap: function () {
Leave _onFilterChange since used in another branch cc @alonsogarciapablo
diff --git a/metrics/bigquery.py b/metrics/bigquery.py index <HASH>..<HASH> 100755 --- a/metrics/bigquery.py +++ b/metrics/bigquery.py @@ -151,6 +151,11 @@ def main(configs, project, bucket_path): """Loads metric config files and runs each metric.""" queryer = BigQuerier(project, bucket_path) + # authenticate as the given service account if our environment is providing one + if 'GOOGLE_APPLICATION_CREDENTIALS' in os.environ: + keyfile = os.environ['GOOGLE_APPLICATION_CREDENTIALS'] + check(['gcloud', 'auth', 'activate-service-account', f'--key-file={keyfile}']) + # the 'bq show' command is called as a hack to dodge the config prompts that bq presents # the first time it is run. A newline is passed to stdin to skip the prompt for default project # when the service account in use has access to multiple projects.
metrics: support workload identity moving the job that runs this from a bootstrap-based prowjob (which performs this gcloud auth check before invoking its arguments) to a decorated job (which leaves this responsibility to the command being invoked)
diff --git a/core/src/main/java/org/bitcoinj/core/Message.java b/core/src/main/java/org/bitcoinj/core/Message.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/bitcoinj/core/Message.java +++ b/core/src/main/java/org/bitcoinj/core/Message.java @@ -68,7 +68,8 @@ public abstract class Message { protected Message(NetworkParameters params) { this.params = params; - serializer = params.getDefaultSerializer(); + this.protocolVersion = params.getProtocolVersionNum(NetworkParameters.ProtocolVersion.CURRENT); + this.serializer = params.getDefaultSerializer(); } protected Message(NetworkParameters params, byte[] payload, int offset, int protocolVersion) throws ProtocolException {
Message: Fix one constructor doesn't set the protocol version.
diff --git a/centinel/primitives/tls.py b/centinel/primitives/tls.py index <HASH>..<HASH> 100644 --- a/centinel/primitives/tls.py +++ b/centinel/primitives/tls.py @@ -18,14 +18,14 @@ def get_fingerprint(host, port=443, external=None, log_prefix=''): try: cert = ssl.get_server_certificate((host, port), - ssl_version=ssl.PROTOCOL_SSLv23) + ssl_version=ssl.PROTOCOL_TLSv1) # if this fails, there's a possibility that SSLv3 handshake was # attempted and rejected by the server. Use TLSv1 instead. except ssl.SSLError: # exception could also happen here try: cert = ssl.get_server_certificate((host, port), - ssl_version=ssl.PROTOCOL_TLSv1) + ssl_version=ssl.PROTOCOL_SSLv23) except Exception as exp: tls_error = str(exp) except Exception as exp:
try tlsv1 first
diff --git a/tests/test_server.py b/tests/test_server.py index <HASH>..<HASH> 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -35,15 +35,15 @@ class TestServer(object): assert_raises(StopIteration, next, server_data) def test_pickling(self): - # This tests fails at Travis, and does not fail locally. - # We skip it now in order to not block the development. - raise SkipTest - self.stream = cPickle.loads(cPickle.dumps(self.stream)) - server_data = self.stream.get_epoch_iterator() - expected_data = get_stream().get_epoch_iterator() - for _, s, e in zip(range(3), server_data, expected_data): - for data in zip(s, e): - assert_allclose(*data, rtol=1e-2) + try: + self.stream = cPickle.loads(cPickle.dumps(self.stream)) + server_data = self.stream.get_epoch_iterator() + expected_data = get_stream().get_epoch_iterator() + for _, s, e in zip(range(3), server_data, expected_data): + for data in zip(s, e): + assert_allclose(*data, rtol=1e-3) + except AssertionError as e: + raise SkipTest("Skip test_that failed with:".format(e)) assert_raises(StopIteration, next, server_data) def test_value_error_on_request(self):
Only skip if AssertionError is raised
diff --git a/src/Carbon/Traits/Units.php b/src/Carbon/Traits/Units.php index <HASH>..<HASH> 100644 --- a/src/Carbon/Traits/Units.php +++ b/src/Carbon/Traits/Units.php @@ -210,6 +210,14 @@ trait Units } if ($unit instanceof DateInterval) { + // Can be removed if https://bugs.php.net/bug.php?id=81106 + // is fixed + if (version_compare(PHP_VERSION, '8.1.0-dev', '>=') && ($unit->f < 0 || $unit->f >= 1)) { + $seconds = floor($unit->f); + $unit->f -= $seconds; + $unit->s += $seconds; + } + return parent::add($unit); }
Work around PHP bug <I>
diff --git a/tests/SchemaTest.php b/tests/SchemaTest.php index <HASH>..<HASH> 100644 --- a/tests/SchemaTest.php +++ b/tests/SchemaTest.php @@ -122,7 +122,8 @@ JSON; return [ [ SchemaLoadException::class, - 'error loading descriptor from source "--invalid--": file_get_contents(--invalid--): Failed to open stream: No such file or directory', + // Complete error message is trimmed because different PHP versions produce slightly different messages. + 'error loading descriptor from source "--invalid--": file_get_contents(--invalid--): ', '--invalid--', ], [
Correct test for allow differences in error message case between PHP versions.
diff --git a/src/Mpdf.php b/src/Mpdf.php index <HASH>..<HASH> 100644 --- a/src/Mpdf.php +++ b/src/Mpdf.php @@ -54,7 +54,7 @@ use Psr\Log\NullLogger; class Mpdf implements \Psr\Log\LoggerAwareInterface { - const VERSION = '7.0.0'; + const VERSION = '7.0.2'; const SCALE = 72 / 25.4;
Correct version constant <I> for next release
diff --git a/astromodels/core/parameter_transformation.py b/astromodels/core/parameter_transformation.py index <HASH>..<HASH> 100644 --- a/astromodels/core/parameter_transformation.py +++ b/astromodels/core/parameter_transformation.py @@ -1,4 +1,6 @@ +import math from builtins import object + import numpy as np @@ -32,13 +34,15 @@ class LogarithmicTransformation(ParameterTransformation): with np.errstate(invalid='raise'): - res = np.log10(external_value) + # math is 4 times faster than numpy here + res = math.log10(external_value) return res def backward(self, internal_value): - return 10**internal_value + # math is 10x faster than numpy or numba + return math.pow(10., internal_value) _known_transformations = {'log10': LogarithmicTransformation}
switch to the math library for some speed
diff --git a/src/event.js b/src/event.js index <HASH>..<HASH> 100644 --- a/src/event.js +++ b/src/event.js @@ -101,7 +101,7 @@ jQuery.event = { handler: handler, guid: handler.guid, selector: selector, - quick: quickParse( selector ), + quick: selector && quickParse( selector ), namespace: namespaces.join(".") }, handleObjIn );
Fix #<I>. XRegExp's shimmed .exec() can't handle undefined. There's no reason to call quickParse if selector is falsy, so it's a minor performance optimization anyway. No change in behavior at all on our side, so no test case needed.
diff --git a/Kwf/Controller/Action/Cli/Web/ClearCacheWatcherController.php b/Kwf/Controller/Action/Cli/Web/ClearCacheWatcherController.php index <HASH>..<HASH> 100644 --- a/Kwf/Controller/Action/Cli/Web/ClearCacheWatcherController.php +++ b/Kwf/Controller/Action/Cli/Web/ClearCacheWatcherController.php @@ -574,7 +574,7 @@ class Kwf_Controller_Action_Cli_Web_ClearCacheWatcherController extends Kwf_Cont $model = Kwf_Component_Cache::getInstance()->getModel(); $cacheIds = array(); foreach ($model->export(Kwf_Model_Abstract::FORMAT_ARRAY, $s) as $row) { - $cacheIds[] = Kwf_Component_Cache_Mysql::getCacheId($row['component_id'], $row['type'], $row['value']); + $cacheIds[] = Kwf_Component_Cache_Mysql::getCacheId($row['component_id'], $row['renderer'], $row['type'], $row['value']); } Kwf_Util_Apc::callClearCacheByCli(array( 'deleteCacheSimple' => $cacheIds
use renderer (new in master)
diff --git a/lib/phpunit/tests/basic_test.php b/lib/phpunit/tests/basic_test.php index <HASH>..<HASH> 100644 --- a/lib/phpunit/tests/basic_test.php +++ b/lib/phpunit/tests/basic_test.php @@ -123,6 +123,19 @@ class core_phpunit_basic_testcase extends basic_testcase { } /** + * Make sure there are no sloppy Windows line endings + * that would break our tests. + */ + public function test_lineendings() { + $string = <<<STRING +a +b +STRING; + $this->assertSame("a\nb", $string, 'Make sure all project files are checked out with unix line endings.'); + + } + + /** * Make sure asserts in setUp() do not create problems. */ public function test_setup_assert() {
MDL-<I> make sure there are no windows line endings in test files
diff --git a/lib/discordrb/data.rb b/lib/discordrb/data.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/data.rb +++ b/lib/discordrb/data.rb @@ -338,6 +338,8 @@ module Discordrb @server.owner == self end + # Adds one or more roles to this member. + # @param role [Role, Array<Role>] The role(s) to add. def add_role(role) # Get the list of role IDs to add to role_ids = if role.is_a? Array
Add a doc comment to Member#add_role
diff --git a/addon/fold/foldcode.js b/addon/fold/foldcode.js index <HASH>..<HASH> 100644 --- a/addon/fold/foldcode.js +++ b/addon/fold/foldcode.js @@ -111,7 +111,7 @@ CodeMirror.braceRangeFinder = function(cm, start) { for (;;) { var found = lineText.lastIndexOf("{", at); if (found < start.ch) break; - tokenType = cm.getTokenAt({line: line, ch: found}).type; + tokenType = cm.getTokenAt({line: line, ch: found + 1}).type; if (!/^(comment|string)/.test(tokenType)) { startChar = found; break; } at = found - 1; }
[foldcode addon] Fix off-by-one error when determining brace type in braceRangeFinder Closes #<I>
diff --git a/ella/newman/media/js/newman.js b/ella/newman/media/js/newman.js index <HASH>..<HASH> 100644 --- a/ella/newman/media/js/newman.js +++ b/ella/newman/media/js/newman.js @@ -732,10 +732,14 @@ function request_media(url) { } $('a#save-form').live('click', function() { var title = prompt(_('Enter template name')); + if (title == null) return; title = $.trim(title); // retrieve the id of template with this name // TODO: to be rewritten (saving interface needs a lift) - var id = $('#id_drafts option').filter(function(){return $(this).text().indexOf(title+' (') == 0}).val(); + var id = + title + ? $('#id_drafts option').filter(function(){return $(this).text().indexOf(title+' (') == 0}).val() + : draft_id; save_preset($('.change-form'), {title:title, id:id}); return false; });
Saving a template with empty name now saves to draft.
diff --git a/dist/crud.js b/dist/crud.js index <HASH>..<HASH> 100644 --- a/dist/crud.js +++ b/dist/crud.js @@ -53,7 +53,8 @@ define([], function() { crud.prototype.read = crud.prototype.r = function() { var self = this, args = tools.xhr_args.apply(this, arguments), - url = config.protocol + tools.join(config.base, this.path); + url = config.protocol + + tools.join(config.base, this.path, args.data || '' ); if (args.data) url = tools.join(url, args.data);
Fix but with read query and different protocol
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -93,10 +93,11 @@ var Credential = function (userId, registrarVK) { if (!(this instanceof Credential)) return new Credential(userId, registrarVK) if (!userId) throw new Error('missing parameters') - userId = uId(userId) - if (userId.length > 31) throw new Error('invalid userId: ' + userId) if ((typeof userId === 'string') && (typeof registrarVK === 'string')) { + userId = uId(userId) + if (userId.length > 31) throw new Error('invalid userId: ' + userId) + this.parameters = { userId: userId, registrarVK: registrarVK } return }
put the userId evaluation in the correct spot
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -11,10 +11,14 @@ setup( url='https://github.com/uber-common/opentracing-python-instrumentation', keywords=['opentracing'], classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', ], @@ -24,11 +28,10 @@ setup( platforms='any', install_requires=[ 'future', - 'futures;python_version<"3"', 'wrapt', - 'tornado>=4.1', + 'tornado>=4.1,<5', 'contextlib2', - 'opentracing>=1.1,<1.3', + 'opentracing>=1.1,<2', 'six', ], extras_require={
Remove concurrent.futures dependency (#<I>)
diff --git a/client/task_runner_test.go b/client/task_runner_test.go index <HASH>..<HASH> 100644 --- a/client/task_runner_test.go +++ b/client/task_runner_test.go @@ -45,9 +45,17 @@ func testTaskRunner() (*MockTaskStateUpdater, *TaskRunner) { return upd, tr } +func testTaskRunnerPostOffer(*MockTaskStateUpdater, *TaskRunner) { + state, runner := testTaskRunner() + // testTaskRunner gives us a job in pre-offer state. We need it in post- + // offer state some some other things are initialized. We'll init them here. + runner.task.Resources.Networks[0].ReservedPorts[0] = 80 + return state, runner +} + func TestTaskRunner_SimpleRun(t *testing.T) { ctestutil.ExecCompatible(t) - upd, tr := testTaskRunner() + upd, tr := testTaskRunnerPostOffer() go tr.Run() defer tr.Destroy()
Initialize reserved ports in task_runner
diff --git a/tfjs-node/scripts/install.js b/tfjs-node/scripts/install.js index <HASH>..<HASH> 100644 --- a/tfjs-node/scripts/install.js +++ b/tfjs-node/scripts/install.js @@ -42,8 +42,9 @@ const mkdir = util.promisify(fs.mkdir); const rename = util.promisify(fs.rename); const rimrafPromise = util.promisify(rimraf); -const BASE_URI = - 'https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-'; +const CDN_STORAGE = process.env.CDN_STORAGE; +const BASE_HOST = CDN_STORAGE || 'https://storage.googleapis.com/'; +const BASE_URI = `${BASE_HOST}tensorflow/libtensorflow/libtensorflow-`; const platform = os.platform(); // Use windows path @@ -92,7 +93,7 @@ function getPlatformLibtensorflowUri() { } if (platform === 'linux' && os.arch() === 'arm') { - return 'https://storage.googleapis.com/tf-builds/libtensorflow_r1_14_linux_arm.tar.gz'; + return `${BASE_HOST}tf-builds/libtensorflow_r1_14_linux_arm.tar.gz`; } if (ALL_SUPPORTED_COMBINATION.indexOf(system) === -1) {
[tfjs-node]Support cnpm registry (#<I>) * support taobao registry * completion path * set an env variable instead
diff --git a/course/lib.php b/course/lib.php index <HASH>..<HASH> 100644 --- a/course/lib.php +++ b/course/lib.php @@ -3242,7 +3242,7 @@ function make_editing_buttons(stdClass $mod, $absolute = true, $moveselect = tru } // Assign - if (has_capability('moodle/course:managegroups', $modcontext)){ + if (has_capability('moodle/role:assign', $modcontext)){ $actions[] = new action_link( new moodle_url('/'.$CFG->admin.'/roles/assign.php', array('contextid' => $modcontext->id)), new pix_icon('i/roles', $str->assign, 'moodle', array('class' => 'iconsmall')),
MDL-<I> fix incorrect capability for role assign button Credit goes to Alexander Bias.
diff --git a/core/src/main/java/org/gagravarr/speex/SpeexInfo.java b/core/src/main/java/org/gagravarr/speex/SpeexInfo.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/gagravarr/speex/SpeexInfo.java +++ b/core/src/main/java/org/gagravarr/speex/SpeexInfo.java @@ -40,7 +40,7 @@ public class SpeexInfo extends HighLevelOggStreamPacket implements SpeexPacket, public SpeexInfo() { super(); - versionString = "Gagravarr Ogg v0.7"; + versionString = "Gagravarr Ogg v0.8"; versionId = 1; } diff --git a/core/src/main/java/org/gagravarr/vorbis/VorbisStyleComments.java b/core/src/main/java/org/gagravarr/vorbis/VorbisStyleComments.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/gagravarr/vorbis/VorbisStyleComments.java +++ b/core/src/main/java/org/gagravarr/vorbis/VorbisStyleComments.java @@ -80,7 +80,7 @@ public abstract class VorbisStyleComments extends HighLevelOggStreamPacket imple public VorbisStyleComments() { super(); - vendor = "Gagravarr.org Java Vorbis Tools v0.7 20141221"; + vendor = "Gagravarr.org Java Vorbis Tools v0.8 20160217"; } public String getVendor() {
Update version strings for <I>
diff --git a/rest_framework_fine_permissions/utils.py b/rest_framework_fine_permissions/utils.py index <HASH>..<HASH> 100644 --- a/rest_framework_fine_permissions/utils.py +++ b/rest_framework_fine_permissions/utils.py @@ -23,7 +23,7 @@ def inherits_modelpermissions_serializer(cls): def get_model_fields(model): fields_info = get_field_info(model) - return chain(iterkeys(fields_info.fields_and_pk), + return chain(iterkeys(fields_info.fields), iterkeys(fields_info.relations))
bug correction: replace fields_and_pk by fields
diff --git a/db/seeds.rb b/db/seeds.rb index <HASH>..<HASH> 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -71,7 +71,7 @@ Role.allow 'admin_role', [:read], "packages" Role.allow 'admin_role', [:read], "errata" Role.allow 'admin_role', [:create, :delete, :read], "search" Role.allow 'admin_role', [:read], "operations" -Role.allow 'admin_role', [:create, :delete, :read], "repositories" +Role.allow 'admin_role', [:create, :read, :update, :delete], "repositories" Role.allow 'admin_role', [:read, :apply], "sync_schedules" #These are candlepin proxy actions
adding update for repositories back to seeds.rb
diff --git a/sample/ipn.php b/sample/ipn.php index <HASH>..<HASH> 100644 --- a/sample/ipn.php +++ b/sample/ipn.php @@ -7,11 +7,11 @@ $isValidIPN = $yellow->verifyIPN(); //bool $log_file = "ipn.log"; $payload = file_get_contents("php://"); if($isValidIPN){ - file_put_contents($log_file , $payload . "is valid IPN call " , FILE_APPEND); + file_put_contents($log_file , $payload . "is valid IPN call\n " , FILE_APPEND); /// you can update your order , log to db , send email etc header("HTTP/1.0 200 OK"); }else{ - file_put_contents($log_file , $payload . "is invalid IPN call " , FILE_APPEND); + file_put_contents($log_file , $payload . "is invalid IPN call\n " , FILE_APPEND); /// invalid/ fake IPN , no need to do anything header("HTTP/1.1 403 Unauthorized"); } \ No newline at end of file
update invoice class + create sample show case
diff --git a/dump.js b/dump.js index <HASH>..<HASH> 100644 --- a/dump.js +++ b/dump.js @@ -242,6 +242,13 @@ function store(path, info, state) { if (info.object) { var objFile; if (info.object.originNode) { + if (!info.object.originNode.sourceFile) { + // Sometimes a node doesn't have a sourceFile property but one of its + // child nodes does. In that case, get sourceFile from the child node. + // TODO(sqs): why does this occur? + var childNode = info.object.originNode.property || info.object.originNode.argument || info.object.originNode.left; + info.object.originNode.sourceFile = childNode.sourceFile; + } objFile = info.object.originNode.sourceFile.name; } out.objectDef = {file: objFile};
Get sourceFile from child node if missing on parent node
diff --git a/lib/parser.js b/lib/parser.js index <HASH>..<HASH> 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -49,7 +49,7 @@ var Parser = function (options) { } self.feed = function(b, blen, cb) { - feed(b, blen, feed_progress, cb) + return feed(b, blen, feed_progress, cb) } } diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -207,13 +207,11 @@ describe('dvbtee-parser', function() { describe('#feed()', function() { -/* it('should return an error when called without args', function() { var parser = new dvbtee.Parser() assert.equal(-1, parser.feed()) }) -*/ /* it('should return undefined when called asynchronously (with a callback function as the last argument)', function() {
feed() 'should return an error when called without args' This reverts commit dcdffa<I>d5d<I>fadce<I>ce4d<I>e<I>fbd.
diff --git a/lib/hccrawler.js b/lib/hccrawler.js index <HASH>..<HASH> 100644 --- a/lib/hccrawler.js +++ b/lib/hccrawler.js @@ -301,16 +301,12 @@ class HCCrawler extends EventEmitter { async _skipRequest(options) { const allowedDomain = this._checkAllowedDomains(options); if (!allowedDomain) return true; - const [ - requested, - allowedRobot, - shouldRequest, - ] = await Promise.all([ - this._checkRequested(options), - this._checkAllowedRobots(options), - this._shouldRequest(options), - ]); - if (requested || !allowedRobot || !shouldRequest) return true; + const requested = await this._checkRequested(options); + if (requested) return true; + const shouldRequest = await this._shouldRequest(options); + if (!shouldRequest) return true; + const allowedRobot = await this._checkAllowedRobots(options); + if (!allowedRobot) return true; return false; }
chore(hccrawler): serialize check request process
diff --git a/lib/alchemy/upgrader/tasks/add_page_versions.rb b/lib/alchemy/upgrader/tasks/add_page_versions.rb index <HASH>..<HASH> 100644 --- a/lib/alchemy/upgrader/tasks/add_page_versions.rb +++ b/lib/alchemy/upgrader/tasks/add_page_versions.rb @@ -12,12 +12,22 @@ module Alchemy::Upgrader::Tasks Alchemy::Page.find_each do |page| next if page.versions.any? - version = page.versions.create! - version = page.versions.create!( - public_on: page.public_on, - public_until: page.public_until - ) if page.public? - page.elements.update_all(page_version_id: version.id) + Alchemy::Page.transaction do + page.versions.create!.tap do |version| + Alchemy::Element.where(page_id: page.id).update_all(page_version_id: version.id) + end + + if page.public_on? + page.versions.create!( + public_on: page.public_on, + public_until: page.public_until + ).tap do |version| + Alchemy::Element.where(page_id: page.id).not_nested.available.order(:position).find_each do |element| + Alchemy::Element.copy(element, page_version_id: version.id) + end + end + end + end print "." end
Update page version upgrader Create a public version as well and copy the public elements over.
diff --git a/gpiozero/internal_devices.py b/gpiozero/internal_devices.py index <HASH>..<HASH> 100644 --- a/gpiozero/internal_devices.py +++ b/gpiozero/internal_devices.py @@ -417,7 +417,7 @@ class TimeOfDay(InternalDevice): Returns :data:`1` when the system clock reads between :attr:`start_time` and :attr:`end_time`, and :data:`0` otherwise. If :attr:`start_time` is greater than :attr:`end_time` (indicating a period that crosses - midnight), then this returns :data:`True` when the current time is + midnight), then this returns :data:`1` when the current time is greater than :attr:`start_time` or less than :attr:`end_time`. """ now = datetime.utcnow().time() if self.utc else datetime.now().time()
Correct docs (missed in the fix for #<I>)
diff --git a/src/main/java/org/mariadb/jdbc/internal/failover/impl/AuroraListener.java b/src/main/java/org/mariadb/jdbc/internal/failover/impl/AuroraListener.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/mariadb/jdbc/internal/failover/impl/AuroraListener.java +++ b/src/main/java/org/mariadb/jdbc/internal/failover/impl/AuroraListener.java @@ -191,7 +191,7 @@ public class AuroraListener extends MastersSlavesListener { //eat exception because cannot happen in this getString() } catch (QueryException qe) { if (proxy.hasToHandleFailover(qe) && setSecondaryHostFail()) { - addToBlacklist(currentProtocol.getHostAddress()); + addToBlacklist(secondaryProtocol.getHostAddress()); } } }
[CONJ-<I>] possible NPE on aurora when failover occur during connection initialisation
diff --git a/scripts/postinstall.js b/scripts/postinstall.js index <HASH>..<HASH> 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -14,4 +14,10 @@ var dependencies = [ var root = __dirname + '/..'; -exec('cd ' + root + '; npm install'); +exec('cd ' + root + '; npm install', function(err, stdout, stderr) { + console.log('POSTINSTALL: ' + stdout); + console.log('POSTINSTALL stderr: ' + stderr); + if (error !== null) { + console.error('POSTINSTALL error: ' + error); + } +});
logging output in postinstall.js
diff --git a/kraken-biom.py b/kraken-biom.py index <HASH>..<HASH> 100755 --- a/kraken-biom.py +++ b/kraken-biom.py @@ -292,6 +292,10 @@ def _main(): Defaulting to BIOM 1.0 (JSON).""" print(twdd(msg)) + if ranks.index(args.max) >= ranks.index(args.min): + msg = "ERROR: Max and Min ranks are out of order: {} < {}" + sys.exit(msg.format(args.max, args.min)) + # Parse all kraken-report data files into sample counts dict # and store global taxon id -> taxonomy data taxa = OrderedDict()
Ensures the max and min tax levels are ordered correctly.
diff --git a/src/Components/Prometheus/Collectors/HttpRequestCollector.php b/src/Components/Prometheus/Collectors/HttpRequestCollector.php index <HASH>..<HASH> 100644 --- a/src/Components/Prometheus/Collectors/HttpRequestCollector.php +++ b/src/Components/Prometheus/Collectors/HttpRequestCollector.php @@ -89,18 +89,7 @@ class HttpRequestCollector extends MetricCollector $route = $request->route(); if ($route instanceof \Illuminate\Routing\Route) { // Laravel - $action = $route->getAction(); - if (is_string($action['uses'])) { // Uses - $key = $method . $action['uses']; - if (isset($this->routesByUses[$key])) { - $uri = $this->routesByUses[$key]; - } - } elseif ($action['uses'] instanceof Closure) { // Closure - $key = $method . spl_object_hash($action['uses']); - if (isset($this->routesByClosure[$key])) { - $uri = $this->routesByClosure[$key]; - } - } + $uri = $route->uri(); } elseif (is_array($route)) { // Lumen if (isset($route[1]['uses'])) { $key = $method . $route[1]['uses'];
support routing with parameters for prometheus
diff --git a/examples/blog/server.js b/examples/blog/server.js index <HASH>..<HASH> 100644 --- a/examples/blog/server.js +++ b/examples/blog/server.js @@ -5,7 +5,7 @@ var server = express(); var blog = new Paperpress({ directory : 'static', - themePath : '/examples/blog/static/layouts', + themePath : 'static/layouts', basePath : '/blog', pagesPath : '', articlesPerPage : 5 diff --git a/paperpress.js b/paperpress.js index <HASH>..<HASH> 100644 --- a/paperpress.js +++ b/paperpress.js @@ -26,7 +26,7 @@ var Paperpress = function (config) { swig.setDefaults({ cache: false }); - var themePath = path.join(__dirname, this.themePath); + var themePath = path.join(process.cwd(), this.themePath); this.pageTpl = swig.compileFile(themePath + '/page.html'); this.singleTpl = swig.compileFile(themePath + '/single.html');
Made theme path relative to the process path, not the paperpress.js file
diff --git a/servers/src/main/java/tachyon/worker/block/meta/BlockMeta.java b/servers/src/main/java/tachyon/worker/block/meta/BlockMeta.java index <HASH>..<HASH> 100644 --- a/servers/src/main/java/tachyon/worker/block/meta/BlockMeta.java +++ b/servers/src/main/java/tachyon/worker/block/meta/BlockMeta.java @@ -17,20 +17,17 @@ package tachyon.worker.block.meta; import tachyon.util.CommonUtils; +import java.io.File; + /** * Represents the metadata of a block in Tachyon managed storage. */ public class BlockMeta extends BlockMetaBase { private final long mBlockSize; - public BlockMeta(long blockId, long blockSize, StorageDir dir) { - super(blockId, dir); - mBlockSize = blockSize; - } - public BlockMeta(TempBlockMeta tempBlock) { super(tempBlock.getBlockId(), tempBlock.getParentDir()); - mBlockSize = tempBlock.getBlockSize(); + mBlockSize = new File(tempBlock.getCommitPath()).length(); } @Override
Make BlockMeta#size really measured from actual file length
diff --git a/src/services/SitemapService.php b/src/services/SitemapService.php index <HASH>..<HASH> 100644 --- a/src/services/SitemapService.php +++ b/src/services/SitemapService.php @@ -6,6 +6,7 @@ use craft\base\Component; use craft\models\CategoryGroup; use craft\models\Section; use ether\seo\records\SitemapRecord; +use yii\db\Exception; class SitemapService extends Component { @@ -39,7 +40,6 @@ class SitemapService extends Component $newSitemap = $data; // Delete removed rows - // FIXME: Deleting doesn't work :( // --------------------------------------------------------------------- $newById = []; $oldById = []; @@ -78,10 +78,19 @@ class SitemapService extends Component if (!empty($idsToDelete)) { - \Craft::$app->db->createCommand()->delete( - SitemapRecord::$tableName, - ['in', 'id', $idsToDelete] - ); + try { + \Craft::$app->db->createCommand()->delete( + SitemapRecord::$tableName, + ['in', 'id', $idsToDelete] + )->execute(); + } catch (Exception $e) { + \Craft::$app->log->logger->log( + $e->getMessage(), + LOG_ERR, + 'seo' + ); + return false; + } } // Update current rows
Fixed sitemap rows not being deletable
diff --git a/OpenPNM/Graphics.py b/OpenPNM/Graphics.py index <HASH>..<HASH> 100644 --- a/OpenPNM/Graphics.py +++ b/OpenPNM/Graphics.py @@ -1,5 +1,7 @@ +import numpy as np +import vtk + def preview(pn, values=[]): - import vtk coords = pn.get_pore_data(prop='coords') heads, tails = pn.get_throat_data(prop='connections').T @@ -17,6 +19,10 @@ def preview(pn, values=[]): colors = vtk.vtkUnsignedCharArray() colors.SetNumberOfComponents(3) + if any(values): + values = np.array(values) + values -= values.min() + values = np.true_divide(values, values.max()) for v in values: r = 255*(v) g = 0 @@ -28,7 +34,7 @@ def preview(pn, values=[]): polydata.SetLines(polys) if colors.GetNumberOfTuples() == len(coords): polydata.GetPointData().SetScalars(colors) - else: + elif colors.GetNumberOfTuples() != 0: raise Exception("Mismatch: {} points, {} scalars".format( len(coords), colors.GetNumberOfTuples()))
True divide in array normalization. Integer inputs were getting zeroed out. Former-commit-id: dc3c<I>ef0c6c<I>ba<I>d5ea7be3a<I>b<I>c<I> Former-commit-id: bfb<I>edc<I>c<I>b<I>a<I>a7d<I>f<I>
diff --git a/src/main/lombok/com/restfb/types/Page.java b/src/main/lombok/com/restfb/types/Page.java index <HASH>..<HASH> 100644 --- a/src/main/lombok/com/restfb/types/Page.java +++ b/src/main/lombok/com/restfb/types/Page.java @@ -1274,6 +1274,14 @@ public class Page extends CategorizedFacebookType { private IgUser instagramBusinessAccount; /** + * Linked Instagram accounts for this Page + */ + @Getter + @Setter + @Facebook("instagram_accounts") + private List<InstagramUser> instagramAccounts; + + /** * Indicates the current Instant Articles review status for this page * * @return Indicates the current Instant Articles review status for this page
NoIssue: instagram_accounts added to Page
diff --git a/go/vt/vttablet/tabletserver/tabletserver_test.go b/go/vt/vttablet/tabletserver/tabletserver_test.go index <HASH>..<HASH> 100644 --- a/go/vt/vttablet/tabletserver/tabletserver_test.go +++ b/go/vt/vttablet/tabletserver/tabletserver_test.go @@ -2261,6 +2261,15 @@ func TestDatabaseNameReplaceByKeyspaceName(t *testing.T) { } err = tsv.Release(ctx, &target, 0, rID) require.NoError(t, err) + + // Test for ReserveBeginExecute + res, transactionID, reservedID, _, err := tsv.ReserveBeginExecute(ctx, &target, nil, executeSQL, nil, &querypb.ExecuteOptions{IncludedFields: querypb.ExecuteOptions_ALL}) + require.NoError(t, err) + for _, field := range res.Fields { + require.Equal(t, "keyspaceName", field.Database) + } + err = tsv.Release(ctx, &target, transactionID, reservedID) + require.NoError(t, err) } func setupTabletServerTest(t *testing.T, keyspaceName string) (*fakesqldb.DB, *TabletServer) {
Added Test for ReserveBeginExecute Method
diff --git a/lib/strategy.js b/lib/strategy.js index <HASH>..<HASH> 100644 --- a/lib/strategy.js +++ b/lib/strategy.js @@ -20,6 +20,8 @@ function RelayrStrategy(options, verifyCallback) { OAuth2Strategy.call(this, options, verifyCallback); this.name = 'relayr'; this._profileURL = options.profileURL || 'https://api.relayr.io/oauth2/user-info'; + this._appURL = options.appURL || 'https://api.relayr.io/oauth2/app-info'; + this._infocall = options.fetch || 'user'; this._oauth2.useAuthorizationHeaderforGET(true); } @@ -28,7 +30,7 @@ util.inherits(RelayrStrategy, OAuth2Strategy); /** Fetch Relayr user profile. */ RelayrStrategy.prototype.userProfile = function(accessToken, done) { - var url = uri.parse(this._profileURL); + var url = uri.parse(this._infocall === 'user' ? this._profileURL : this._appURL); url = uri.format(url);
Get app information with the first info call
diff --git a/src/Ciscaja/Uhsa/UserBundle/Model/RoleInterface.php b/src/Ciscaja/Uhsa/UserBundle/Model/RoleInterface.php index <HASH>..<HASH> 100644 --- a/src/Ciscaja/Uhsa/UserBundle/Model/RoleInterface.php +++ b/src/Ciscaja/Uhsa/UserBundle/Model/RoleInterface.php @@ -57,6 +57,18 @@ interface RoleInterface extends BaseRoleInterface /** * @return bool */ + public function canViewUser(); + + /** + * @param bool $allowed + * + * @return UserInterface + */ + public function setViewUserAllowed($allowed); + + /** + * @return bool + */ public function canCreateUser(); /**
Added view permission methods to Model\RoleInterface.
diff --git a/src/fields/Date.php b/src/fields/Date.php index <HASH>..<HASH> 100644 --- a/src/fields/Date.php +++ b/src/fields/Date.php @@ -37,12 +37,13 @@ class Date extends Field */ protected function getRules(): array { + $self = $this; return ArrayHelper::merge(parent::getRules(), [ $this->attribute . 'Date' => [ $this->attribute, - function () { - if (!$this->extractIntervalDates()) { - $this->model->addError($this->attribute, 'Bad date interval "' . $this->getValue() . '"'); + function () use ($self) { + if (!$self->extractIntervalDates()) { + $self->model->addError($self->attribute, 'Bad date interval "' . $self->getValue() . '"'); return false; }
fixed bug with date validation and new yii2
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -24,16 +24,17 @@ install_requires = [ "coverage", "colorlog", "docker-compose", - "flake8", + "flake8<=3.4.1", "future", "netifaces", "pandas", "pep8>=1.7.1", "pipenv", - "pydocstyle", + "pydocstyle<=2.3.1", "pylint", "python-logstash", "python-owasp-zap-v2.4", + "python-dateutil<2.7.0", "scapy-python3", "tox", "unittest2", @@ -59,7 +60,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "network_pipeline")) setup( name="network-pipeline", cmdclass={"build_py": build_py}, - version="1.0.15", + version="1.0.16", description="Distributed Network Packet Analysis Pipeline " + "for Layer 2, 3 and 4 Frames", long_description="" +
allow any version of flake8 and pycodestyle but the latest that have a known issue: <URL>
diff --git a/src/main/java/org/jfree/graphics2d/svg/SVGUtils.java b/src/main/java/org/jfree/graphics2d/svg/SVGUtils.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jfree/graphics2d/svg/SVGUtils.java +++ b/src/main/java/org/jfree/graphics2d/svg/SVGUtils.java @@ -127,7 +127,7 @@ public class SVGUtils { * * @throws IOException if there is an I/O problem. * - * @since 2.2 + * @since 3.0 */ public static void writeToSVG(File file, String svgElement, boolean zip) throws IOException {
Fix version number for method introduced in <I>
diff --git a/etcdserver/api/rafthttp/metrics.go b/etcdserver/api/rafthttp/metrics.go index <HASH>..<HASH> 100644 --- a/etcdserver/api/rafthttp/metrics.go +++ b/etcdserver/api/rafthttp/metrics.go @@ -58,7 +58,10 @@ var ( Subsystem: "network", Name: "peer_round_trip_time_seconds", Help: "Round-Trip-Time histogram between peers.", - Buckets: prometheus.ExponentialBuckets(0.0001, 2, 14), + + // lowest bucket start of upper bound 0.0001 sec (0.1 ms) with factor 2 + // highest bucket start of 0.0001 sec * 2^15 == 3.2768 sec + Buckets: prometheus.ExponentialBuckets(0.0001, 2, 16), }, []string{"To"}, )
etcdserver/api/rafthttp: increase bucket upperbound up-to 3-sec From <I> sec to <I> sec for more detailed latency analysis
diff --git a/src/DateComboBox.js b/src/DateComboBox.js index <HASH>..<HASH> 100644 --- a/src/DateComboBox.js +++ b/src/DateComboBox.js @@ -123,8 +123,8 @@ class DateComboBox extends Base { const state = Object.assign(super[internal.defaultState], { arrowButtonRole: ArrowDirectionButton, calendarRole: CalendarMonthNavigator, - date: calendar.today(), - datePriority: true, // since we're setting a default date + date: null, + datePriority: false, dateSelected: false, dateTimeFormat: null, dateTimeFormatOptions,
Revert Elix ~<I> era change in which a DateComboBox defaults to today. It seems safer to have the combo box's default value be empty and the default date by null. (If user opens combo box, they'll see that the default date in the calendar is today.) As a side effect, this fixes a long-standing bug in which an empty DateComboBox wouldn't let the user select today.
diff --git a/lib/Predis/Async/Connection/ConnectionInterface.php b/lib/Predis/Async/Connection/ConnectionInterface.php index <HASH>..<HASH> 100644 --- a/lib/Predis/Async/Connection/ConnectionInterface.php +++ b/lib/Predis/Async/Connection/ConnectionInterface.php @@ -57,6 +57,15 @@ interface ConnectionInterface public function getParameters(); /** + * Executes a command on Redis and calls the provided callback when the + * response has been read from the server. + * + * @param CommandInterface $command Redis command. + * @param mixed $callback Callable object. + */ + public function executeCommand(CommandInterface $command, $callback); + + /** * Write the buffer to writable network streams. * * @return mixed
Add missing method to the connection interface.
diff --git a/src/Classes/Module.php b/src/Classes/Module.php index <HASH>..<HASH> 100644 --- a/src/Classes/Module.php +++ b/src/Classes/Module.php @@ -266,6 +266,9 @@ class Module extends Ardent */ public static function getModulesFromDisk() { + // check Modules folder is created or not + if(!app('files')->exists(app_path('Modules'))) + app('files')->makeDirectory(app_path('Modules')); $authors = app('files')->directories(app_path('Modules')); $results = []; if ($authors && count($authors))
Error when fresh project created in cobonto and scan modules
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,7 @@ setup( platforms="any", description="Image based watermarks for sorl-thumbnail", long_description=open("README.md").read(), + long_description_content_type="text/markdown", classifiers=[ "Development Status :: 4 - Beta", "Environment :: Web Environment",
pypi: use markdown for formatting.
diff --git a/endtoend_tests/endtoend_test.go b/endtoend_tests/endtoend_test.go index <HASH>..<HASH> 100644 --- a/endtoend_tests/endtoend_test.go +++ b/endtoend_tests/endtoend_test.go @@ -2,11 +2,8 @@ package endtoend_test import ( "flag" - "launchpad.net/goamz/aws" - "launchpad.net/goamz/ec2" . "launchpad.net/gocheck" "testing" - "time" ) func Test(t *testing.T) { TestingT(t) } @@ -23,6 +20,7 @@ func (s *S) SetUpSuite(c *C) { c.Skip("skipping end-to-end suite, use -endtoend to enable") } } -func (s *S) TestTrueIsTrue(c *C) { + +func (s *S) TestCreatesUser(c *C) { c.Assert(true, Equals, true) }
end-to-end: removed unused imports
diff --git a/www/tests/test_file.py b/www/tests/test_file.py index <HASH>..<HASH> 100644 --- a/www/tests/test_file.py +++ b/www/tests/test_file.py @@ -7,7 +7,7 @@ with open('files/text-utf8.txt') as f: f.read() with open('compression/du cote de chez swann.txt', 'rb') as f: - assert len(f.read()) == 1_056_294 + assert len(f.read()) in [1_054_176, 1_056_294] with open('compression/du cote de chez swann.txt', 'r') as f: assert len(f.readlines()) == 2118
Change test on length of result of file.read() to handle different length of line feed (1 or 2 characters). Related to issue #<I>.
diff --git a/fabric-client/lib/packager/BasePackager.js b/fabric-client/lib/packager/BasePackager.js index <HASH>..<HASH> 100644 --- a/fabric-client/lib/packager/BasePackager.js +++ b/fabric-client/lib/packager/BasePackager.js @@ -80,7 +80,7 @@ const BasePackager = class { if (entry.stats.isFile() && this.isMetadata(entry.path)) { const desc = { - name: path.join('META-INF', path.relative(filePath, entry.path).split('\\').join('/')), // for windows style paths + name: path.join('META-INF', path.relative(filePath, entry.path)).split('\\').join('/'), // for windows style paths fqp: entry.path }; logger.debug(' findMetadataDescriptors :: %j', desc);
[FABN-<I>] Correct metadata packaging code for Windows The metadata packaging code uses the Windows path separator on Windows systems; this is because the split/join is being done to the result of path.relative rather than the result of path.join. Change-Id: Id3e5ceae7c3b<I>c<I>d7fc<I>f<I>b7
diff --git a/modules/system/controllers/Settings.php b/modules/system/controllers/Settings.php index <HASH>..<HASH> 100644 --- a/modules/system/controllers/Settings.php +++ b/modules/system/controllers/Settings.php @@ -30,6 +30,10 @@ class Settings extends Controller { parent::__construct(); + if ($this->action == 'mysettings') { + $this->requiredPermissions = null; + } + $this->addCss('/modules/system/assets/css/settings.css', 'core'); BackendMenu::setContext('October.System', 'system', 'settings');
Fixes #<I> - MySettings page should have no permission requirement
diff --git a/media/js/views/window.js b/media/js/views/window.js index <HASH>..<HASH> 100644 --- a/media/js/views/window.js +++ b/media/js/views/window.js @@ -115,8 +115,7 @@ name = (room && room.get('name')) || 'Rooms'; } if (name) { - this.title = $('<pre />').text(name).html() + - ' \u00B7 ' + this.originalTitle; + this.title = name + ' \u00B7 ' + this.originalTitle; } else { this.title = this.originalTitle; }
Fix htmlentities appearing in document title
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -712,6 +712,7 @@ module ActionDispatch # constraints(:post_id => /\d+\.\d+) do # resources :comments # end + # end # # === Restricting based on IP #
Missing an end in routing docs
diff --git a/pkg/minikube/assets/addons.go b/pkg/minikube/assets/addons.go index <HASH>..<HASH> 100755 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -538,7 +538,7 @@ var Addons = map[string]*Addon{ "0640"), }, false, "gcp-auth", "google", map[string]string{ "KubeWebhookCertgen": "k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0@sha256:f3b6b39a6062328c095337b4cadcefd1612348fdd5190b1dcbcb9b9e90bd8068", - "GCPAuthWebhook": "k8s-minikube/gcp-auth-webhook:v0.0.7@sha256:be9661afbd47e4042bee1cb48cae858cc2f4b4e121340ee69fdc0013aeffcca4", + "GCPAuthWebhook": "k8s-minikube/gcp-auth-webhook:v0.0.8@sha256:26c7b2454f1c946d7c80839251d939606620f37c2f275be2796c1ffd96c438f6", }, map[string]string{ "GCPAuthWebhook": "gcr.io", }),
update gcp-auth-webhook image to <I>
diff --git a/spec/mongo/collection_spec.rb b/spec/mongo/collection_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mongo/collection_spec.rb +++ b/spec/mongo/collection_spec.rb @@ -472,6 +472,15 @@ describe Mongo::Collection do context 'when the user is not authorized' do + let(:view) do + unauthorized_collection.find + end + + it 'iterates over the documents' do + expect { + view.each{ |document| document } + }.to raise_error(Mongo::Error::OperationFailure) + end end context 'when documents contain potential error message fields' do
RUBY-<I>: Ensure auth failures are raised
diff --git a/src/instrumentation/angular/http.js b/src/instrumentation/angular/http.js index <HASH>..<HASH> 100644 --- a/src/instrumentation/angular/http.js +++ b/src/instrumentation/angular/http.js @@ -4,8 +4,19 @@ module.exports = function ($provide, traceBuffer) { // HTTP Instrumentation $provide.decorator('$http', ['$delegate', '$injector', function ($delegate, $injector) { return utils.instrumentModule($delegate, $injector, { - type: 'ext.http.request', - prefix: 'angular.$http' + type: 'ext.$http', + prefix: '$http', + signatureFormatter: function (key, args) { + text = [] + if(args.length) { + if(typeof args[0] == 'object') { + text = ['$http', args[0].method.toUpperCase(), args[0].url] + } else { + text = ['$http', args[0]] + } + } + return text.join(' ') + } }) }]) }
Update trace signature for $http traces
diff --git a/drools-core/src/main/java/org/drools/core/metadata/WorkingMemoryTask.java b/drools-core/src/main/java/org/drools/core/metadata/WorkingMemoryTask.java index <HASH>..<HASH> 100644 --- a/drools-core/src/main/java/org/drools/core/metadata/WorkingMemoryTask.java +++ b/drools-core/src/main/java/org/drools/core/metadata/WorkingMemoryTask.java @@ -1,6 +1,8 @@ package org.drools.core.metadata; -public interface WorkingMemoryTask<T> extends MetaCallableTask<T>, Identifiable { +import java.io.Serializable; + +public interface WorkingMemoryTask<T> extends MetaCallableTask<T>, Identifiable, Serializable { public Object getTargetId();
Mark WorkingMemoryTask as Serializable for the persistence and retrieval of sessions.
diff --git a/install_hooks.py b/install_hooks.py index <HASH>..<HASH> 100755 --- a/install_hooks.py +++ b/install_hooks.py @@ -325,8 +325,14 @@ def fix_alignak_cfg(config): "== ==\n" "== You should grant the write permissions on the configuration directory to ==\n" "== the user alignak: ==\n" - "== sudo find %s -type f -exec chmod 664 {} +\n" - "== sudo find %s -type d -exec chmod 775 {} +\n" + "== find %s -type f -exec chmod 664 {} +\n" + "== find %s -type d -exec chmod 775 {} +\n" + "== -------------------------------------------------------------------------- ==\n" + "== ==\n" + "== You should also grant ownership on those directories to the user alignak: ==\n" + "== chown -R alignak:alignak /usr/local/var/run/alignak ==\n" + "== chown -R alignak:alignak /usr/local/var/log/alignak ==\n" + "== chown -R alignak:alignak /usr/local/var/libexec/alignak ==\n" "== ==\n" "== -------------------------------------------------------------------------- ==\n" "== ==\n"
Fix-#<I> - ownership message
diff --git a/spec/elastic_apm_spec.rb b/spec/elastic_apm_spec.rb index <HASH>..<HASH> 100644 --- a/spec/elastic_apm_spec.rb +++ b/spec/elastic_apm_spec.rb @@ -43,8 +43,6 @@ RSpec.describe ElasticAPM do it 'sets duration' do expect(subject.duration).to eq 500_000_000 end - - it 'queues transaction' end end end diff --git a/spec/integration/rails_spec.rb b/spec/integration/rails_spec.rb index <HASH>..<HASH> 100644 --- a/spec/integration/rails_spec.rb +++ b/spec/integration/rails_spec.rb @@ -53,4 +53,6 @@ RSpec.describe 'Rails integration' do expect(response.body).to eq 'Yes!' expect(ElasticAPM.agent.pending_transactions.length).to be 1 end + + it 'sends stuff to the server' end
Add pending spec to rails integration spec
diff --git a/blocks/tag_flickr/block_tag_flickr.php b/blocks/tag_flickr/block_tag_flickr.php index <HASH>..<HASH> 100644 --- a/blocks/tag_flickr/block_tag_flickr.php +++ b/blocks/tag_flickr/block_tag_flickr.php @@ -69,7 +69,7 @@ class block_tag_flickr extends block_base { $search = unserialize($response); - foreach ($search['photoset']['photo'] as &$p){ + foreach ($search['photoset']['photo'] as $p){ $p['owner'] = $search['photoset']['owner']; }
Removing PHP5-ism again
diff --git a/bosh-director/lib/bosh/director/compiled_release_downloader.rb b/bosh-director/lib/bosh/director/compiled_release_downloader.rb index <HASH>..<HASH> 100644 --- a/bosh-director/lib/bosh/director/compiled_release_downloader.rb +++ b/bosh-director/lib/bosh/director/compiled_release_downloader.rb @@ -17,7 +17,7 @@ module Bosh::Director FileUtils.mkpath(path) compiled_packages = @compiled_packages_group.compiled_packages - event_log.begin_stage("copying packages", compiled_packages.size) + event_log.begin_stage("copying packages", compiled_packages.count) compiled_packages.each do |compiled_package| desc = "#{compiled_package.package.name}/#{compiled_package.package.version}" @@ -32,7 +32,7 @@ module Bosh::Director path = File.join(@download_dir, 'jobs') FileUtils.mkpath(path) - event_log.begin_stage("copying jobs", @templates.size) + event_log.begin_stage("copying jobs", @templates.count) @templates.each do |template| desc = "#{template.name}/#{template.version}" event_log.track(desc) do
fix the how the size of the templates and packages are calculated to make it work with ruby <I> <URL>
diff --git a/ELiDE/ELiDE/stores.py b/ELiDE/ELiDE/stores.py index <HASH>..<HASH> 100644 --- a/ELiDE/ELiDE/stores.py +++ b/ELiDE/ELiDE/stores.py @@ -365,7 +365,7 @@ class FunctionNameInput(TextInput): self._trigger_save(self.text) -def sanitize_source(v, spaces=4): +def munge_source(v, spaces=4): lines = v.split('\n') if not lines: return tuple(), '' @@ -422,7 +422,7 @@ class FuncEditor(Editor): Clock.schedule_once(partial(self._set_source, v), 0) return self.codeinput.unbind(text=self.setter('_text')) - self.params, self.codeinput.text = sanitize_source(str(v)) + self.params, self.codeinput.text = munge_source(str(v)) self.codeinput.bind(text=self.setter('_text')) source = AliasProperty(_get_source, _set_source, bind=('_text', 'params'))
Rename sanitize_source to munge_source
diff --git a/src/MaxCDN.php b/src/MaxCDN.php index <HASH>..<HASH> 100644 --- a/src/MaxCDN.php +++ b/src/MaxCDN.php @@ -47,6 +47,9 @@ class MaxCDN { // create curl resource $ch = curl_init(); + // force curl http/1.1 + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + // set url curl_setopt($ch, CURLOPT_URL, $req_req);
Update MaxCDN.php Adds curl <I> compatibility
diff --git a/src/Html.php b/src/Html.php index <HASH>..<HASH> 100644 --- a/src/Html.php +++ b/src/Html.php @@ -116,6 +116,13 @@ class Html extends Markup if (!isset($this->attributeList['class']) || is_null($this->attributeList['class'])) { $this->attributeList['class'] = []; } + if (!is_array($this->attributeList['class'])) { + if (!empty($this->attributeList['class'])) { + $this->attributeList['class'] = [$this->attributeList['class']]; + } else { + $this->attributeList['class'] = []; + } + } foreach ($value as $class_name) { $class_name = trim($class_name); if (!empty($class_name)) {
Added fix for the class attribute that could be a string
diff --git a/createNativeStackNavigator.js b/createNativeStackNavigator.js index <HASH>..<HASH> 100644 --- a/createNativeStackNavigator.js +++ b/createNativeStackNavigator.js @@ -90,7 +90,7 @@ class StackView extends React.Component { translucent: translucent === undefined ? false : translucent, title, titleFontFamily: headerTitleStyle && headerTitleStyle.fontFamily, - titleColor: headerTintColor, + titleColor: (headerTitleStyle && headerTitleStyle.color) || headerTintColor, titleFontSize: headerTitleStyle && headerTitleStyle.fontSize, backTitle: headerBackTitleVisible === false ? '' : headerBackTitle, backTitleFontFamily:
feat: support header title color (#<I>) Currently it was not possible to set a title color different than the tint color. This PR keeps the tintColor as the default header title color but also uses the headerStyle.color if defined.
diff --git a/spec/souvenirs/can_be_persistent_spec.rb b/spec/souvenirs/can_be_persistent_spec.rb index <HASH>..<HASH> 100644 --- a/spec/souvenirs/can_be_persistent_spec.rb +++ b/spec/souvenirs/can_be_persistent_spec.rb @@ -29,6 +29,7 @@ describe Souvenirs::CanBePersistent do tenant = Tenant.get("Francois") tenant.id.should == "Francois" tenant.language.should == "French" + tenant.should be_persisted end it "#get returns nil if the model can't be loaded" do @@ -38,10 +39,12 @@ describe Souvenirs::CanBePersistent do it "#get! behaves just like #get when the model is found" do Tenant.attribute :language Tenant.new(:id => "Francois", :language => "French").save - Tenant.get!("Francois").attributes.should == { + tenant = Tenant.get!("Francois") + tenant.attributes.should == { "id" => "Francois", "language" => "French" } + tenant.should be_persisted end it "#get! raises an error if the model is not found" do
oops, forgot to test persisted? on loaded models
diff --git a/bokeh/plotting_helpers.py b/bokeh/plotting_helpers.py index <HASH>..<HASH> 100644 --- a/bokeh/plotting_helpers.py +++ b/bokeh/plotting_helpers.py @@ -294,10 +294,10 @@ def _new_xy_plot(x_range=None, y_range=None, plot_width=None, plot_height=None, tool_objs.append(tool) elif isinstance(tool, str): #If str object temp_tool_str+=tool + ',' + else: + raise ValueError("tool should be a valid str or Tool Object") tools = temp_tool_str - - for tool in re.split(r"\s*,\s*", tools.strip()): # re.split will return empty strings; ignore them. if tool == "":
Removed vertical space, added exception handling
diff --git a/lib/gemirro/server.rb b/lib/gemirro/server.rb index <HASH>..<HASH> 100644 --- a/lib/gemirro/server.rb +++ b/lib/gemirro/server.rb @@ -79,8 +79,9 @@ module Gemirro def fetch_gem(resource) name = File.basename(resource) regexp = /^(.*)-(\d+(?:\.\d+){,4})\.gem(?:spec\.rz)?$/ - gem_name, gem_version = name.match(regexp).captures + return unless result = name.match(regexp) + gem_name, gem_version = result.captures return unless gem_name && gem_version logger.info("Try to download #{gem_name} with version #{gem_version}")
Fixed #1 <I> can crash the server
diff --git a/lib/auditor.rb b/lib/auditor.rb index <HASH>..<HASH> 100644 --- a/lib/auditor.rb +++ b/lib/auditor.rb @@ -12,8 +12,8 @@ if defined?(ActionController) and defined?(ActionController::Base) require 'auditor/user' ActionController::Base.class_eval do - before_filter do - Auditor::User.current_user = self.current_user if self.respond_to?(:current_user) + before_filter do |c| + Auditor::User.current_user = c.send(:current_user) if c.respond_to?(:current_user) end end
Minor change to enable calling current_user method even when it's private
diff --git a/test/com/google/javascript/refactoring/ErrorToFixMapperTest.java b/test/com/google/javascript/refactoring/ErrorToFixMapperTest.java index <HASH>..<HASH> 100644 --- a/test/com/google/javascript/refactoring/ErrorToFixMapperTest.java +++ b/test/com/google/javascript/refactoring/ErrorToFixMapperTest.java @@ -1259,8 +1259,9 @@ public class ErrorToFixMapperTest { } @Test - @Ignore("This has a bug, but hopefully it's uncommon enough that we never need to fix") + @Ignore public void testMissingRequire_inJSDoc_withWhitespace() { + // TODO(b/159336400): Fix this test so the fix is valid preexistingCode = "goog.provide('some.really.very.long.namespace.SuperInt');"; assertExpectedFixes( lines(
Add bug link for a test case that currently generates bad fixes PiperOrigin-RevId: <I>
diff --git a/spec/server_worker_context.rb b/spec/server_worker_context.rb index <HASH>..<HASH> 100644 --- a/spec/server_worker_context.rb +++ b/spec/server_worker_context.rb @@ -256,10 +256,12 @@ shared_context 'test server and worker' do before { reset_test_state } after { Timecop.return } - if ServerEngine.windows? - WAIT_RATIO = 2 - else - WAIT_RATIO = 1 + unless self.const_defined?(:WAIT_RATIO) + if ServerEngine.windows? + WAIT_RATIO = 2 + else + WAIT_RATIO = 1 + end end def wait_for_fork
Fix a warning while running test ``` C:/Users/aho/Projects/serverengine/spec/server_worker_context.rb:<I>: warning: already initialized constant WAIT_RATIO C:/Users/aho/Projects/serverengine/spec/server_worker_context.rb:<I>: warning: previous definition of WAIT_RATIO was here ```
diff --git a/sources/lib/Generator/StructureGenerator.php b/sources/lib/Generator/StructureGenerator.php index <HASH>..<HASH> 100644 --- a/sources/lib/Generator/StructureGenerator.php +++ b/sources/lib/Generator/StructureGenerator.php @@ -47,7 +47,6 @@ Class and fields comments are inspected from table and fields comments. Just add @see http://www.postgresql.org/docs/9.0/static/sql-comment.html TEXT; } - $this ->outputFileCreation($output) ->saveFile( @@ -56,7 +55,11 @@ TEXT; [ 'namespace' => $this->namespace, 'class_name' => $input->getParameter('class_name', Inflector::studlyCaps($this->relation)), - 'relation' => sprintf("%s.%s", $this->schema, $this->relation), + 'relation' => sprintf( + "%s.%s", + $this->getSession()->getConnection()->escapeIdentifier($this->schema), + $this->getSession()->getConnection()->escapeIdentifier($this->relation) + ), 'primary_key' => join( ', ', array_map(
Escape generated structure’s relation name The relations detected by the inspector are database objects. Their name must be escaped to prevent problems when when a legacy database with uppercase letters are used in their relations.
diff --git a/src/org/opencms/file/types/CmsResourceTypeXmlContent.java b/src/org/opencms/file/types/CmsResourceTypeXmlContent.java index <HASH>..<HASH> 100644 --- a/src/org/opencms/file/types/CmsResourceTypeXmlContent.java +++ b/src/org/opencms/file/types/CmsResourceTypeXmlContent.java @@ -252,9 +252,12 @@ public class CmsResourceTypeXmlContent extends A_CmsResourceTypeLinkParseable { CmsResourceDeleteMode siblingMode) throws CmsException { - super.deleteResource(cms, securityManager, resource, siblingMode); + List<CmsResource> detailOnlyPages = null; if (isPossiblyDetailContent(resource)) { - List<CmsResource> detailOnlyPages = getDetailContainerResources(cms, resource); + detailOnlyPages = getDetailContainerResources(cms, resource); + } + super.deleteResource(cms, securityManager, resource, siblingMode); + if (detailOnlyPages != null) { for (CmsResource page : detailOnlyPages) { if (page.getState().isDeleted()) { continue;
Fixed bug with deleting detail-only pages.