diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/classes/document.php b/src/classes/document.php index <HASH>..<HASH> 100644 --- a/src/classes/document.php +++ b/src/classes/document.php @@ -597,9 +597,37 @@ abstract class phpillowDocument public function attachFile( $fileName, $name = false, $mimeType = false ) { $name = ( $name === false ? basename( $fileName ) : $name ); + + $this->attachMemoryFile( + file_get_contents( $fileName ), + $name, + $mimeType + ); + } + + /** + * Attach file from memory to document + * + * The data passed to the method will be attached to the document and + * stored in the database. + * + * You need to specify a name to be used for storing the attachment data. + * + * You may optionally specify a custom mime type as third parameter. If set + * it will be used, but not verified, that it matches the actual file + * contents. If left empty the mime type defaults to + * 'application/octet-stream'. + * + * @param string $data + * @param string $name + * @param string $mimeType + * @return void + */ + public function attachMemoryFile( $data, $name, $mimeType = false ) + { $this->storage->_attachments[$name] = array( 'type' => 'base64', - 'data' => base64_encode( file_get_contents( $fileName ) ), + 'data' => base64_encode( $data ), 'content_type' => $mimeType === false ? 'application/octet-stream' : $mimeType, ); $this->modified = true;
- Implemented: Storage of attachments from memory instead of file git-svn-id: svn://arbitracker.org/phpillow/trunk@<I> c<I>fd1-f2a0-<I>e-a8e5-<I>dc<I>
diff --git a/js/chrome/esc.js b/js/chrome/esc.js index <HASH>..<HASH> 100644 --- a/js/chrome/esc.js +++ b/js/chrome/esc.js @@ -1,4 +1,7 @@ -$(document).keydown(function (event) { +var loginVisible = false, + dropdownOpen = false, + keyboardHelpVisible = false; +$document.keydown(function (event) { if (event.which == 27 || (keyboardHelpVisible && event.which == 191 && event.shiftKey && event.metaKey)) { if (keyboardHelpVisible) { $body.toggleClass('keyboardHelp'); @@ -12,6 +15,8 @@ $(document).keydown(function (event) { } else if (loginVisible) { $('#login').hide(); loginVisible = false; + } else if ($('#history').length && !$body.hasClass('panelsVisible')) { + $('#history').toggle(100); } } }); \ No newline at end of file
Little fun to show off jsbin logo (once it's all designed)
diff --git a/auto_ml/predictor.py b/auto_ml/predictor.py index <HASH>..<HASH> 100644 --- a/auto_ml/predictor.py +++ b/auto_ml/predictor.py @@ -620,8 +620,8 @@ class Predictor(object): probas = uncertainty_calibration_predictions.uncertainty_prediction num_buckets = self.uncertainty_calibration_settings['num_buckets'] - bucket_labels = range(1, num_buckets + 1) - bucket_results = pd.qcut(probas, q=num_buckets, labels=bucket_labels, duplicates='drop') + # bucket_labels = range(1, num_buckets + 1) + bucket_results = pd.qcut(probas, q=num_buckets, duplicates='drop') uncertainty_calibration_predictions['bucket_num'] = bucket_results
removes bucket_labels from qcut entirely
diff --git a/src/Caffeinated/Shinobi/Models/Role.php b/src/Caffeinated/Shinobi/Models/Role.php index <HASH>..<HASH> 100644 --- a/src/Caffeinated/Shinobi/Models/Role.php +++ b/src/Caffeinated/Shinobi/Models/Role.php @@ -114,23 +114,4 @@ class Role extends Model { return $this->permissions()->detach(); } - - /** - * Magic __call method to handle dynamic methods. - * - * @param string $method - * @param array $arguments - * @return mixed - */ - public function __call($method, $arguments = array()) - { - // Handle canPermissionSlug() methods - if (starts_with($method, 'can') and $method !== 'can') { - $permission = substr($method, 3); - - return $this->can($permission); - } - - return parent::__call($method, $arguments); - } }
Remove magic __call method from Role model
diff --git a/anndata/tests/test_io_warnings.py b/anndata/tests/test_io_warnings.py index <HASH>..<HASH> 100644 --- a/anndata/tests/test_io_warnings.py +++ b/anndata/tests/test_io_warnings.py @@ -1,4 +1,5 @@ from importlib.util import find_spec +from pathlib import Path import warnings import pytest @@ -12,7 +13,8 @@ def test_old_format_warning_thrown(): import scanpy as sc with pytest.warns(ad._warnings.OldFormatWarning): - sc.datasets.pbmc68k_reduced() + pth = Path(sc.datasets.__file__).parent / "10x_pbmc68k_reduced.h5ad" + ad.read_h5ad(pth) def test_old_format_warning_not_thrown(tmp_path):
Fix test now that scanpy does not throw OldFormatWarning when sc.datasets functions are called (#<I>)
diff --git a/helpers/rubygem.rb b/helpers/rubygem.rb index <HASH>..<HASH> 100644 --- a/helpers/rubygem.rb +++ b/helpers/rubygem.rb @@ -26,8 +26,8 @@ module Helpers "#{@pkg_prefix}#{@version}.gem" end - def curl_enabled? - `which curl`.strip != "" + def logged_in? + File.exists?(File.expand_path('~/.gem/credentials')) end def build! @@ -35,11 +35,11 @@ module Helpers end def deploy! - raise "CURL needs to be enabled to push built gems!" if !curl_enabled? - puts "Uploading gem v#{@version} [#{pkg_path}]".red - `curl --data-binary @#{pkg_path} \ - -H 'Authorization:#{@api_key}' \ - https://rubygems.org/api/v1/gems` + if logged_in? + puts "Uploading gem v#{@version} [#{pkg_path}]".green + `gem push #{@pkg_path}` + else + puts "Not logged into RubyGems.org, skipping deploy!" end end end \ No newline at end of file
Relented. Fucking worthless RubyGems API
diff --git a/plugins/commands/plugin/action/repair_plugins.rb b/plugins/commands/plugin/action/repair_plugins.rb index <HASH>..<HASH> 100644 --- a/plugins/commands/plugin/action/repair_plugins.rb +++ b/plugins/commands/plugin/action/repair_plugins.rb @@ -14,14 +14,22 @@ module VagrantPlugins class RepairPlugins def initialize(app, env) @app = app + @logger = Log4r::Logger.new("vagrant::plugins::plugincommand::repair") end def call(env) env[:ui].info(I18n.t("vagrant.commands.plugin.repairing")) plugins = Vagrant::Plugin::Manager.instance.installed_plugins - Vagrant::Bundler.instance.init!(plugins, :repair) - env[:ui].info(I18n.t("vagrant.commands.plugin.repair_complete")) - + begin + Vagrant::Bundler.instance.init!(plugins, :repair) + env[:ui].info(I18n.t("vagrant.commands.plugin.repair_complete")) + rescue Exception => e + @logger.error("Failed to repair user installed plugins: #{e.class} - #{e}") + e.backtrace.each do |backtrace_line| + @logger.debug(backtrace_line) + end + env[:ui].error(I18n.t("vagrant.commands.plugin.repair_failed", message: e.message)) + end # Continue @app.call(env) end
Provide error information on plugin repair error. Also includes original exception information within logger output.
diff --git a/src/Processor/DatabaseProcessor/CriterionProcessor.php b/src/Processor/DatabaseProcessor/CriterionProcessor.php index <HASH>..<HASH> 100644 --- a/src/Processor/DatabaseProcessor/CriterionProcessor.php +++ b/src/Processor/DatabaseProcessor/CriterionProcessor.php @@ -85,7 +85,7 @@ abstract class CriterionProcessor implements DatabaseCriterionProcessor { $prefix = $field ? $field->getName() : 'value'; - return \snake_case($prefix . self::$parameterId++); + return \preg_replace('/\W+/u', '_', $prefix . self::$parameterId++); } /**
Fix queries pattern on deep field selections
diff --git a/addon/components/object-list-view.js b/addon/components/object-list-view.js index <HASH>..<HASH> 100644 --- a/addon/components/object-list-view.js +++ b/addon/components/object-list-view.js @@ -264,7 +264,7 @@ export default FlexberryBaseComponent.extend({ _addRow: function(componentName) { if (componentName === this.get('componentName')) { var modelName = this.get('modelProjection').modelName; - var modelToAdd = this.store.createRecord(modelName, {}); + var modelToAdd = this.get('store').createRecord(modelName, {}); this.get('content').addObject(modelToAdd); this._addModel(modelToAdd); this.get('groupEditEventsService').rowAddedTrigger(componentName, modelToAdd);
Fixed wrong using of store property after injection store as service in 'object-list-view' component
diff --git a/CalendarFXView/src/main/java/impl/com/calendarfx/view/CalendarViewSkin.java b/CalendarFXView/src/main/java/impl/com/calendarfx/view/CalendarViewSkin.java index <HASH>..<HASH> 100644 --- a/CalendarFXView/src/main/java/impl/com/calendarfx/view/CalendarViewSkin.java +++ b/CalendarFXView/src/main/java/impl/com/calendarfx/view/CalendarViewSkin.java @@ -503,6 +503,10 @@ public class CalendarViewSkin extends SkinBase<CalendarView> { PageBase selectedPage = view.getSelectedPage(); + if (!stackPane.getChildren().contains(selectedPage)) { + stackPane.getChildren().add(selectedPage); + } + selectedPage.setManaged(true); selectedPage.setVisible(true);
Also add the page to the StackPane if no animation is enabled
diff --git a/frontend/dockerfile/dockerfile2llb/convert_runmount.go b/frontend/dockerfile/dockerfile2llb/convert_runmount.go index <HASH>..<HASH> 100644 --- a/frontend/dockerfile/dockerfile2llb/convert_runmount.go +++ b/frontend/dockerfile/dockerfile2llb/convert_runmount.go @@ -144,7 +144,9 @@ func dispatchRunMounts(d *dispatchState, c *instructions.RunCommand, sources []* out = append(out, llb.AddMount(target, st, mountOpts...)) - d.ctxPaths[path.Join("/", filepath.ToSlash(mount.Source))] = struct{}{} + if mount.From == "" { + d.ctxPaths[path.Join("/", filepath.ToSlash(mount.Source))] = struct{}{} + } } return out, nil }
dockerfile: do not add linked and cache paths to context sources
diff --git a/src/vistir/path.py b/src/vistir/path.py index <HASH>..<HASH> 100644 --- a/src/vistir/path.py +++ b/src/vistir/path.py @@ -52,6 +52,8 @@ def _encode_path(path): path = getattr(path, "as_posix") except AttributeError: raise RuntimeError("Failed encoding path, unknown object type: %r" % path) + else: + path() else: path = path() path = Path(_decode_path(path))
right, we should actually create the path after we getattr for it
diff --git a/agent/functional_tests/generators/simpletests.go b/agent/functional_tests/generators/simpletests.go index <HASH>..<HASH> 100644 --- a/agent/functional_tests/generators/simpletests.go +++ b/agent/functional_tests/generators/simpletests.go @@ -29,6 +29,7 @@ import ( "golang.org/x/tools/imports" ) +// TODO: add more awsvpc functional tests using simple test template var simpleTestPattern = ` // +build functional,%s
add a note to add awsvpc mode tests to existing functional tests
diff --git a/src/runway/util.py b/src/runway/util.py index <HASH>..<HASH> 100644 --- a/src/runway/util.py +++ b/src/runway/util.py @@ -246,10 +246,7 @@ def use_embedded_pkgs(embedded_lib_path=None): def which(program): - """Mimic 'which' command behavior. - - Adapted from https://stackoverflow.com/a/377028 - """ + """Mimic 'which' command behavior.""" def is_exe(fpath): """Determine if program exists and is executable.""" return os.path.isfile(fpath) and os.access(fpath, os.X_OK) @@ -277,7 +274,7 @@ def which(program): if is_exe(exe_file): return exe_file else: - for path in os.environ['PATH'].split(os.pathsep): + for path in os.environ.get('PATH').split(os.pathsep) if 'PATH' in os.environ else [os.getcwd()]: # noqa pylint: disable=line-too-long exe_file = os.path.join(path, i) if is_exe(exe_file): return exe_file
remove requirement for PATH environment variable This will probably never come up, but will stop an exception if the PATH environment variable isn't defined
diff --git a/lib/engine.py b/lib/engine.py index <HASH>..<HASH> 100644 --- a/lib/engine.py +++ b/lib/engine.py @@ -152,7 +152,11 @@ class Engine(object): for weight in plugin_list.GetWeightList(self.config.os): for plugin in plugin_list.GetWeight(self.config.os, weight): - plugin.Run() + try: + plugin.Run() + except errors.PreProcessFail as e: + logging.warning('Unable to run preprocessor: %s, reason: %s', + plugin.__class__.__name__, e) # Set the timezone. if hasattr(pre_obj, 'time_zone_str'):
Code review: <I>: These files are missing unit tes
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,13 @@ setup( 'Intended Audience :: Developers', 'Programming Language :: Python', 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Topic :: Software Development :: Libraries :: Python Modules'
pypi: added specific python versions supported
diff --git a/test/promised-read.js b/test/promised-read.js index <HASH>..<HASH> 100644 --- a/test/promised-read.js +++ b/test/promised-read.js @@ -389,7 +389,6 @@ function describePromisedReadWith(PassThrough) { var readData = []; function readAll(readable) { return read(input, 2).then(function(data) { - console.log('read', data); if (data) { readData.push(data); return readAll(readable); @@ -401,7 +400,6 @@ function describePromisedReadWith(PassThrough) { assert.deepEqual(result, Buffer.concat(inputData)); }); inputData.forEach(function(data) { - console.log('write', data); input.emit('data', data); }); input.emit('end');
Remove console.log These snuck in during some debugging. Remove them.
diff --git a/src/Kafka/Consumer/Process.php b/src/Kafka/Consumer/Process.php index <HASH>..<HASH> 100644 --- a/src/Kafka/Consumer/Process.php +++ b/src/Kafka/Consumer/Process.php @@ -554,7 +554,7 @@ class Process break 2; } - $offsets[$topic['topicName']][$part['partition']] = $part['offset']; + $offsets[$topic['topicName']][$part['partition']] = $part['offset'] - 1; } } $assign->setFetchOffsets($offsets);
fix lost one message when consumer restart when consumer restart will lost first message in partisions i have send 5 messages ,but get only get 4 message my kafka version is <I>
diff --git a/src/test/java/integration/CustomWebDriverProviderTest.java b/src/test/java/integration/CustomWebDriverProviderTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/integration/CustomWebDriverProviderTest.java +++ b/src/test/java/integration/CustomWebDriverProviderTest.java @@ -8,6 +8,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.DesiredCapabilities; import static org.junit.jupiter.api.Assumptions.assumeTrue; @@ -33,12 +34,17 @@ class CustomWebDriverProviderTest extends BaseIntegrationTest { } private static class CustomChromeDriver extends ChromeDriver { + protected CustomChromeDriver(ChromeOptions options) { + super(options); + } } private static class CustomWebDriverProvider implements WebDriverProvider { @Override public WebDriver createDriver(DesiredCapabilities desiredCapabilities) { - return new CustomChromeDriver(); + ChromeOptions options = new ChromeOptions(); + options.setHeadless(true); + return new CustomChromeDriver(options); } } }
custom browser -> headless to avoid problems with other headless tests...
diff --git a/ipyvolume/datasets.py b/ipyvolume/datasets.py index <HASH>..<HASH> 100644 --- a/ipyvolume/datasets.py +++ b/ipyvolume/datasets.py @@ -44,13 +44,20 @@ class Dataset(object): return self def download_command(self): - if os == "osx": - return "cd %s; curl -O -L %s" % (data_dir, self.url) - else: + use_wget = True # we prefer wget... + if osname in ["linux", "osx"]: # for linux + if os.system("wget --version > /dev/null") != 0: + use_wget = False + + if use_wget: return "wget --progress=bar:force -c -P %s %s" % (data_dir, self.url) + else: + return "cd %s; curl -O -L %s" % (data_dir, self.url) hdz2000 = Dataset("hdz2000") aquariusA2 = Dataset("aquarius-A2") egpbosLCDM = Dataset("egpbos-LCDM") zeldovich = Dataset("zeldovich", density=False) + +# low poly cat from: https://sketchfab.com/models/1e7143dfafd04ff4891efcb06949a0b4# \ No newline at end of file
fix: check if wget exists, if not use curl (rtd seems to miss wget)
diff --git a/openquake/calculators/ebrisk.py b/openquake/calculators/ebrisk.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/ebrisk.py +++ b/openquake/calculators/ebrisk.py @@ -334,7 +334,8 @@ class EventBasedRiskCalculator(event_based.EventBasedCalculator): """ :yields: pairs (gmf_df, param) """ - recs = self.datastore['gmf_data/by_task'][:] - recs.sort(order='task_no') - for task_no, start, stop in recs: - yield slice(start, stop), self.param + nrows = len(self.datastore['gmf_data/sid']) + ct = self.oqparam.concurrent_tasks or 1 + for slc in general.split_in_slices(nrows, ct): + print(slc) + yield slc, self.param
Changed event_based_risk to honor concurrent_tasks
diff --git a/src/Guzzle/Service/Command/AbstractCommand.php b/src/Guzzle/Service/Command/AbstractCommand.php index <HASH>..<HASH> 100644 --- a/src/Guzzle/Service/Command/AbstractCommand.php +++ b/src/Guzzle/Service/Command/AbstractCommand.php @@ -29,7 +29,7 @@ abstract class AbstractCommand extends Collection implements CommandInterface const RESPONSE_BODY = 'command.response_body'; // Option used to add request options to the request created by a command - const REQUEST_OPTIONS = 'command.options'; + const REQUEST_OPTIONS = 'command.request_options'; // command values to not count as additionalParameters const HIDDEN_PARAMS = 'command.hidden_params'; // Option used to disable any pre-sending command validation
Changing command.options to command.request_options
diff --git a/lib/npolar/api/client.rb b/lib/npolar/api/client.rb index <HASH>..<HASH> 100644 --- a/lib/npolar/api/client.rb +++ b/lib/npolar/api/client.rb @@ -1,3 +1,6 @@ +require "rubygems" +require "bundler/setup" + require "yajl/json_gem" require "hashie" require "typhoeus"
require rubygems and bundler/setup
diff --git a/src/components/DocumentApiComponent.php b/src/components/DocumentApiComponent.php index <HASH>..<HASH> 100644 --- a/src/components/DocumentApiComponent.php +++ b/src/components/DocumentApiComponent.php @@ -23,7 +23,7 @@ class DocumentApiComponent extends CachableBaseComponent const GET_PARAMETER_PATH = 'path'; const GET_PARAMETER_Q = 'q'; /** - * @var Response + * @var Response|string */ protected $response; @@ -142,7 +142,7 @@ class DocumentApiComponent extends CachableBaseComponent $path = substr($path, 1); } $folderDocument = $this->storage->getDocuments()->getDocumentFolderBySlug($path); - if ($folderDocument !== false && $folderDocument->type === 'folder') { + if ($folderDocument instanceof Document && $folderDocument->type === 'folder') { return $this->getFolderResponse($folderDocument); }
Fixed var type of response, did type check for folderDocument, because getFolderResponse only expects parameter of type Document
diff --git a/lib/yap/shell/version.rb b/lib/yap/shell/version.rb index <HASH>..<HASH> 100644 --- a/lib/yap/shell/version.rb +++ b/lib/yap/shell/version.rb @@ -1,5 +1,5 @@ module Yap module Shell - VERSION = "0.1.1" + VERSION = "0.2.0" end end
Bumping version to <I>
diff --git a/lib/db/file.js b/lib/db/file.js index <HASH>..<HASH> 100644 --- a/lib/db/file.js +++ b/lib/db/file.js @@ -188,5 +188,8 @@ module.exports = utils.inherit(Object, { }, getUserBinCount: function (id, cb) { cb(null, { total: 0 }); // TODO read directory for count + }, + setProAccount: function(cb) { + cb(null, null); } });
Adding setProAccount method to file db
diff --git a/easyaudit/signals/request_signals.py b/easyaudit/signals/request_signals.py index <HASH>..<HASH> 100644 --- a/easyaudit/signals/request_signals.py +++ b/easyaudit/signals/request_signals.py @@ -1,13 +1,20 @@ from Cookie import SimpleCookie +from django.contrib.auth import get_user_model from django.contrib.sessions.models import Session from django.core.signals import request_started from django.utils import timezone from easyaudit.models import RequestEvent -from easyaudit.settings import WATCH_REQUEST_EVENTS +from easyaudit.settings import UNREGISTERED_URLS, WATCH_REQUEST_EVENTS +import re def should_log_url(url): + # check if current url is blacklisted + for unregistered_url in UNREGISTERED_URLS: + pattern = re.compile(unregistered_url) + if pattern.match(url): + return False return True
Compares the current URL against a list of blacklisted URL regex.
diff --git a/src/Leevel/Router/Proxy/Request.php b/src/Leevel/Router/Proxy/Request.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Router/Proxy/Request.php +++ b/src/Leevel/Router/Proxy/Request.php @@ -218,7 +218,7 @@ class Request * @param array $server The SERVER parameters * @param null|resource|string $content The raw body data */ - public static function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) + public static function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): void { self::proxy()->initialize($query, $request, $attributes, $cookies, $files, $server, $content); }
fix(router): fix for phpstan level 5
diff --git a/lib/natto/option_parse.rb b/lib/natto/option_parse.rb index <HASH>..<HASH> 100644 --- a/lib/natto/option_parse.rb +++ b/lib/natto/option_parse.rb @@ -104,7 +104,7 @@ module Natto SUPPORTED_OPTS.values.each do |k| if options.has_key? k key = k.to_s.gsub('_', '-') - if %w( all-morphs allocate-sentence ).include? key + if %w( all-morphs allocate-sentence partial ).include? key opt << "--#{key}" if options[k]==true else opt << "--#{key}=#{options[k]}"
Adding partial to options string builder. Issue <I>.
diff --git a/src/Clone.js b/src/Clone.js index <HASH>..<HASH> 100644 --- a/src/Clone.js +++ b/src/Clone.js @@ -230,9 +230,17 @@ export class DocumentCloner { } if (node instanceof HTMLStyleElement && node.sheet && node.sheet.cssRules) { - const css = [].slice - .call(node.sheet.cssRules, 0) - .reduce((css, rule) => css + rule.cssText, ''); + const css = [].slice.call(node.sheet.cssRules, 0).reduce((css, rule) => { + try { + if (rule && rule.cssText) { + return css + rule.cssText; + } + return css; + } catch (err) { + this.logger.log('Unable to access cssText property', rule.name); + return css; + } + }, ''); const style = node.cloneNode(false); style.textContent = css; return style;
IE<I> Member not found fix Wrap accesing the cssText property in a try...catch (#<I>) * <URL>
diff --git a/activerecord/test/reflection_test.rb b/activerecord/test/reflection_test.rb index <HASH>..<HASH> 100644 --- a/activerecord/test/reflection_test.rb +++ b/activerecord/test/reflection_test.rb @@ -3,14 +3,21 @@ require 'fixtures/topic' require 'fixtures/customer' require 'fixtures/company' require 'fixtures/company_in_module' +require 'fixtures/subscriber' class ReflectionTest < Test::Unit::TestCase - fixtures :topics, :customers, :companies + fixtures :topics, :customers, :companies, :subscribers def setup @first = Topic.find(1) end + def test_column_null_not_null + subscriber = Subscriber.find(:first) + assert subscriber.column_for_attribute("name").null + assert !subscriber.column_for_attribute("nick").null + end + def test_read_attribute_names assert_equal( %w( id title author_name author_email_address bonus_time written_on last_read content approved replies_count parent_id type ).sort,
added test checking that NOT NULL is properly reflected on [<EMAIL>] closes #<I> git-svn-id: <URL>
diff --git a/phypayload.go b/phypayload.go index <HASH>..<HASH> 100644 --- a/phypayload.go +++ b/phypayload.go @@ -96,8 +96,7 @@ func (h *MHDR) UnmarshalBinary(data []byte) error { return nil } -// PHYPayload represents the physical payload. Use NewPhyPayload for creating -// a new PHYPayload. +// PHYPayload represents the physical payload. type PHYPayload struct { MHDR MHDR MACPayload Payload
Minor documentation fix There is no `NewPhyPayload` function.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -18,7 +18,7 @@ var slice = Array.prototype.slice; // Create singletonian temper usable for constructed pagelets. This will ensure // caching works properly and allows optimize to use temper. // -var temper = new Temper(); +var temper = new Temper; /** * A pagelet is the representation of an item, section, column, widget on the @@ -739,6 +739,11 @@ Pagelet.traverse = function traverse(parent) { }; // +// Make temper available on the constructor, for easy access to the singleton. +// +Pagelet.temper = temper; + +// // Expose the pagelet. // module.exports = Pagelet;
[fix] allow temper access from the constructor object
diff --git a/hijack/admin.py b/hijack/admin.py index <HASH>..<HASH> 100755 --- a/hijack/admin.py +++ b/hijack/admin.py @@ -4,7 +4,7 @@ from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.core.urlresolvers import reverse from django.template.loader import get_template -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from django import VERSION from hijack import settings as hijack_settings
Changed the ugettext to ugettext_lazy This fixes the error message about form plural ValueError: plural forms expression could be dangerous
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup, find_packages from yaml2rst import __version__ long_description = "\n\n".join([ - open("README.txt").read(), + open("README.rst").read(), ]) setup(
Fix: wrong name of README-file in setup.py
diff --git a/tests/Assert.php b/tests/Assert.php index <HASH>..<HASH> 100644 --- a/tests/Assert.php +++ b/tests/Assert.php @@ -13,6 +13,30 @@ use PHPUnit\Framework\Assert as PhpUnitAssert; final class Assert { /** + * A PHPUnit 4, 7 & 9 compatible version of 'assertRegExp' and its replacement, + * 'assertMatchesRegularExpression'. + * + * This is necessary to avoid warnings - PHPUnit 9 deprecated 'assertRegExp' + * in favour of 'assertMatchesRegularExpression' and outputs a warning if + * the former is used + * + * @param string $regex + * @param string $value + * + * @return void + */ + public static function matchesRegularExpression($regex, $value) + { + if (method_exists(PhpUnitAssert::class, 'assertMatchesRegularExpression')) { + PhpUnitAssert::assertMatchesRegularExpression($regex, $value); + + return; + } + + PhpUnitAssert::assertRegExp($regex, $value); + } + + /** * A replacement for 'assertInternalType', which was removed in PHPUnit 9. * * @param string $type
Add a replacement for regex assertions We can't migrate away from 'assertRegExp' to its replacement ('assertMatchesRegularExpression') because the later doesn't exist in PHPUnit 4 Therefore we need a new regex assertion that calls the right thing
diff --git a/pkg/cmd/cli/cmd/cancelbuild.go b/pkg/cmd/cli/cmd/cancelbuild.go index <HASH>..<HASH> 100644 --- a/pkg/cmd/cli/cmd/cancelbuild.go +++ b/pkg/cmd/cli/cmd/cancelbuild.go @@ -39,7 +39,7 @@ func NewCmdCancelBuild(fullName string, f *clientcmd.Factory, out io.Writer) *co Short: "Cancel a pending or running build", Long: cancelBuildLong, Example: fmt.Sprintf(cancelBuildExample, fullName), - SuggestFor: []string{"builds"}, + SuggestFor: []string{"builds", "stop-build"}, Run: func(cmd *cobra.Command, args []string) { err := RunCancelBuild(f, out, cmd, args) cmdutil.CheckErr(err)
Make `oc cancel-build` to be suggested for `oc stop-build`.
diff --git a/gitmap_test.go b/gitmap_test.go index <HASH>..<HASH> 100644 --- a/gitmap_test.go +++ b/gitmap_test.go @@ -48,8 +48,8 @@ func assertFile( t *testing.T, gm gitmap.GitMap, filename, - expectedAbbreviatedTreeHash, - expectedTreeHash string) { + expectedAbbreviatedHash, + expectedHash string) { var ( gi *gitmap.GitInfo @@ -60,11 +60,15 @@ func assertFile( t.Fatalf(filename) } - if gi.AbbreviatedHash != expectedAbbreviatedTreeHash || gi.Hash != expectedTreeHash { + if gi.AbbreviatedHash != expectedAbbreviatedHash || gi.Hash != expectedHash { t.Error("Invalid tree hash, file", filename, "abbreviated:", gi.AbbreviatedHash, "full:", gi.Hash, gi.Subject) } if gi.AuthorName != "Bjørn Erik Pedersen" || gi.AuthorEmail != "[email protected]" { t.Error("These commits are mine! Got", gi.AuthorName, "and", gi.AuthorEmail) } + + if gi.AuthorDate.Format("2006-01-02") != "2016-07-19" { + t.Error("Invalid date:", gi.AuthorDate) + } }
Add date assertion and fix var names in test
diff --git a/components/api/src/main/java/org/openengsb/core/api/security/model/Permission.java b/components/api/src/main/java/org/openengsb/core/api/security/model/Permission.java index <HASH>..<HASH> 100644 --- a/components/api/src/main/java/org/openengsb/core/api/security/model/Permission.java +++ b/components/api/src/main/java/org/openengsb/core/api/security/model/Permission.java @@ -27,7 +27,6 @@ package org.openengsb.core.api.security.model; * <li>the {@link Object#toString()} must create a string-representation that can be used with that constructor the * recreate the object</li> * </ul> - * This works fine with all wrapped primitive types. * * Collections of values are also allowed. However the types of the values underly the same constraints as single * values.
[OPENENGSB-<I>] fix permission-doc
diff --git a/mkdir.js b/mkdir.js index <HASH>..<HASH> 100644 --- a/mkdir.js +++ b/mkdir.js @@ -36,6 +36,14 @@ _mkdir = function (path, options, resolve, reject) { }, reject); } else { stat(path, function (statErr, stats) { + if (statErr) { + if (statErr.code !== 'ENOENT') { + reject(err); + return; + } + _mkdir(path, options, resolve, reject); + return; + } if (statErr || !stats.isDirectory()) reject(err); else resolve(null); });
Address race condition isssue
diff --git a/reana_commons/version.py b/reana_commons/version.py index <HASH>..<HASH> 100755 --- a/reana_commons/version.py +++ b/reana_commons/version.py @@ -14,4 +14,4 @@ and parsed by ``setup.py``. from __future__ import absolute_import, print_function -__version__ = "0.5.0.dev20190207" +__version__ = "0.5.0.dev20190212"
release: <I>.de<I>
diff --git a/patroni/__init__.py b/patroni/__init__.py index <HASH>..<HASH> 100644 --- a/patroni/__init__.py +++ b/patroni/__init__.py @@ -129,7 +129,10 @@ class Patroni(object): signal.signal(signal.SIGTERM, self.sigterm_handler) def shutdown(self): - self.api.shutdown() + try: + self.api.shutdown() + except Exception: + logger.exception('Exception during RestApi.shutdown') self.ha.shutdown() diff --git a/tests/test_patroni.py b/tests/test_patroni.py index <HASH>..<HASH> 100644 --- a/tests/test_patroni.py +++ b/tests/test_patroni.py @@ -151,3 +151,7 @@ class TestPatroni(unittest.TestCase): self.assertTrue(self.p.nosync) self.p.tags['nosync'] = None self.assertFalse(self.p.nosync) + + def test_shutdown(self): + self.p.api.shutdown = Mock(side_effect=Exception) + self.p.shutdown()
Rest api thread can raise an exception during shutdown (#<I>) catch it and report