diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/stanza/models/classifier.py b/stanza/models/classifier.py index <HASH>..<HASH> 100644 --- a/stanza/models/classifier.py +++ b/stanza/models/classifier.py @@ -156,7 +156,11 @@ def read_dataset(dataset, wordvec_type, min_len): """ lines = [] for filename in dataset.split(","): - new_lines = open(filename).readlines() + try: + new_lines = open(filename, encoding="utf-8").readlines() + except UnicodeDecodeError: + logger.error("Could not read {}".format(filename)) + raise lines.extend(new_lines) lines = [x.strip() for x in lines] lines = [x.split(maxsplit=1) for x in lines if x]
Sometimes Windows won't have utf-8 as the default encoding
diff --git a/web/concrete/config/base.php b/web/concrete/config/base.php index <HASH>..<HASH> 100644 --- a/web/concrete/config/base.php +++ b/web/concrete/config/base.php @@ -106,7 +106,7 @@ if (!defined('DB_CHARSET')) { } if (!defined("DB_COLLATE")) { - define('DB_COLLATE', ''); + define('DB_COLLATE', 'utf8_unicode_ci'); } define("LANGUAGE_DOMAIN_CORE", "messages"); diff --git a/web/concrete/core/controllers/single_pages/upgrade.php b/web/concrete/core/controllers/single_pages/upgrade.php index <HASH>..<HASH> 100644 --- a/web/concrete/core/controllers/single_pages/upgrade.php +++ b/web/concrete/core/controllers/single_pages/upgrade.php @@ -25,6 +25,7 @@ class Concrete5_Controller_Upgrade extends Controller { Cache::disableCache(); Cache::disableLocalCache(); $this->site_version = Config::get('SITE_APP_VERSION'); + Database::ensureEncoding(); } public function view() {
maintaining unicode on upgrade Former-commit-id: <I>ec4e5de7f<I>e<I>a<I>d<I>b<I>ceb<I>f
diff --git a/lib/appsignal/version.rb b/lib/appsignal/version.rb index <HASH>..<HASH> 100644 --- a/lib/appsignal/version.rb +++ b/lib/appsignal/version.rb @@ -1,3 +1,3 @@ module Appsignal - VERSION = '0.4.0' + VERSION = '0.4.1' end
Bump to <I> [ci skip]
diff --git a/loom/master/analysis/task_manager/cloud.py b/loom/master/analysis/task_manager/cloud.py index <HASH>..<HASH> 100644 --- a/loom/master/analysis/task_manager/cloud.py +++ b/loom/master/analysis/task_manager/cloud.py @@ -25,10 +25,10 @@ class CloudTaskManager: def run(cls, task_run, task_run_location_id, requested_resources): # Don't want to block while waiting for VM to come up, so start another process to finish the rest of the steps. logger = loom.common.logger.get_logger('TaskManagerLogger', logfile='/tmp/loom_cloud_taskmanager.log') - logger.debug("task_run: %s, task_run_location_id: %s, requested_resources: %s" % (task_run, task_run_location_id, requested_resources)) + task_run_json = json.dumps(task_run) + logger.debug("task_run_json: %s, task_run_location_id: %s, requested_resources: %s" % (task_run_json, task_run_location_id, requested_resources)) logger.debug("Launching CloudTaskManager as a separate process.") - task_run_json = json.dumps(task_run) process = multiprocessing.Process(target=CloudTaskManager._run, args=(task_run_json, task_run_location_id, requested_resources)) process.start()
Debugging for passing a taskrun as a JSON object.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,9 +3,9 @@ import sdist_upip setup(name='picoweb', - version='1.6.1', + version='1.7.1', description="A very lightweight, memory-efficient async web framework \ -for MicroPython/Pycopy and its uasyncio module.", +for Pycopy (https://github.com/pfalcon/pycopy) and its uasyncio module.", long_description=open('README.rst').read(), url='https://github.com/pfalcon/picoweb', author='Paul Sokolovsky', @@ -15,5 +15,5 @@ for MicroPython/Pycopy and its uasyncio module.", packages=['picoweb'], # Note: no explicit dependency on 'utemplate', if a specific app uses # templates, it must depend on it. Likewise, don't depend on - # micropython-ulogging as application might not use logging. - install_requires=['micropython-uasyncio', 'micropython-pkg_resources']) + # pycopy-ulogging as application might not use logging. + install_requires=['pycopy-uasyncio', 'pycopy-pkg_resources'])
setup.py: Release <I>, update for Pycopy infrastructure.
diff --git a/lib/rabbitmq/connection.rb b/lib/rabbitmq/connection.rb index <HASH>..<HASH> 100644 --- a/lib/rabbitmq/connection.rb +++ b/lib/rabbitmq/connection.rb @@ -44,11 +44,15 @@ module RabbitMQ connect_socket! login! open_channel! + + self end def close raise DestroyedError unless @ptr FFI.amqp_connection_close(@ptr, 200) + + self end private def create_socket! diff --git a/spec/connection_spec.rb b/spec/connection_spec.rb index <HASH>..<HASH> 100644 --- a/spec/connection_spec.rb +++ b/spec/connection_spec.rb @@ -33,6 +33,10 @@ describe RabbitMQ::Connection do subject.start subject.start end + + it "returns self" do + subject.start.should eq subject + end end describe "close" do @@ -51,6 +55,10 @@ describe RabbitMQ::Connection do it "can be called before connecting to no effect" do subject.close end + + it "returns self" do + subject.close.should eq subject + end end it "uses Util.connection_info to parse info from its creation arguments" do
Return self from Connection#start and #close.
diff --git a/src/ReactImageMagnify.js b/src/ReactImageMagnify.js index <HASH>..<HASH> 100644 --- a/src/ReactImageMagnify.js +++ b/src/ReactImageMagnify.js @@ -156,27 +156,27 @@ class ReactImageMagnify extends React.Component { const { smallImage, smallImage: { - isFluidWidth: isSmallImageFluidWidth + isFluidWidth }, } = this.props; + + if (!isFluidWidth) { + return smallImage; + } + const { - smallImageWidth, - smallImageHeight + smallImageWidth: fluidWidth, + smallImageHeight: fluidHeight } = this.state; - const fluidWidthSmallImage = objectAssign( + return objectAssign( {}, smallImage, { - width: smallImageWidth, - height: smallImageHeight + width: fluidWidth, + height: fluidHeight } ); - const fixedWidthSmallImage = smallImage; - - return isSmallImageFluidWidth - ? fluidWidthSmallImage - : fixedWidthSmallImage } get enlargedImagePlacement() {
Refactor: ReactImageMagnify - get smallImage
diff --git a/routes-v1/subroutes/mobilizations.js b/routes-v1/subroutes/mobilizations.js index <HASH>..<HASH> 100644 --- a/routes-v1/subroutes/mobilizations.js +++ b/routes-v1/subroutes/mobilizations.js @@ -63,13 +63,15 @@ const InsideMobilization = connect(stateToProps, actionsToProps)(class extends R render () { const { - match: { path }, + match: { path, params: { mobilization_id: id } }, mobilization, blocksIsLoaded, widgetsIsLoaded } = this.props - return !mobilization || !blocksIsLoaded || !widgetsIsLoaded ? <Loading /> : ( + const hasId = id && !isNaN(id) + + return (!mobilization || !blocksIsLoaded || !widgetsIsLoaded) && hasId ? <Loading /> : ( <React.Fragment> <Route exact path={`${path}/blocks/create`} component={BlockCreate} /> <Route exact path={`${path}/edit`} component={MobilizationsEdit} />
fix(routes-v1): mobilization featch loading layer condition
diff --git a/test/unit/plugins/providers/hyperv/provider_test.rb b/test/unit/plugins/providers/hyperv/provider_test.rb index <HASH>..<HASH> 100644 --- a/test/unit/plugins/providers/hyperv/provider_test.rb +++ b/test/unit/plugins/providers/hyperv/provider_test.rb @@ -14,6 +14,7 @@ describe VagrantPlugins::HyperV::Provider do stub_const("Vagrant::Util::PowerShell", powershell) allow(machine).to receive(:id).and_return("foo") allow(platform).to receive(:windows?).and_return(true) + allow(platform).to receive(:wsl?).and_return(false) allow(platform).to receive(:windows_admin?).and_return(true) allow(platform).to receive(:windows_hyperv_admin?).and_return(true) allow(powershell).to receive(:available?).and_return(true) @@ -27,6 +28,12 @@ describe VagrantPlugins::HyperV::Provider do expect(subject).to_not be_usable end + it "returns true if within WSL" do + expect(platform).to receive(:windows?).and_return(false) + expect(platform).to receive(:wsl?).and_return(true) + expect(subject).to be_usable + end + it "returns false if neither an admin nor a hyper-v admin" do allow(platform).to receive(:windows_admin?).and_return(false) allow(platform).to receive(:windows_hyperv_admin?).and_return(false)
Add WSL check on usable? test for provider
diff --git a/src/commands/isDescendent.js b/src/commands/isDescendent.js index <HASH>..<HASH> 100644 --- a/src/commands/isDescendent.js +++ b/src/commands/isDescendent.js @@ -37,11 +37,9 @@ export async function isDescendent ({ ancestor, depth = -1 }) { - console.log('isDescendent', oid, ancestor) try { const fs = new FileSystem(_fs) const shallows = await GitShallowManager.read({ fs, gitdir }) - console.log('shallows', shallows) if (!oid) { throw new GitError(E.MissingRequiredParameterError, { function: 'isDescendent', @@ -67,7 +65,6 @@ export async function isDescendent ({ throw new GitError(E.MaxSearchDepthExceeded, { depth }) } const oid = queue.shift() - console.log('oid', oid) const { type, object } = await readObject({ fs, gitdir,
fix: remove stray console.logs (#<I>)
diff --git a/.gitignore b/.gitignore index <HASH>..<HASH> 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ # logs npm-debug.log + diff --git a/lib/system.js b/lib/system.js index <HASH>..<HASH> 100644 --- a/lib/system.js +++ b/lib/system.js @@ -13,6 +13,10 @@ export function abiToNodeRange (abi) { if (/^m?51/.test(abi)) return 'node7'; if (/^m?57/.test(abi)) return 'node8'; if (/^m?59/.test(abi)) return 'node9'; + if (/^m?64/.test(abi)) return 'node10'; + if (/^m?67/.test(abi)) return 'node11'; + if (/^m?72/.test(abi)) return 'node12'; + if (/^m?79/.test(abi)) return 'node13'; return abi; } diff --git a/lib/verify.js b/lib/verify.js index <HASH>..<HASH> 100644 --- a/lib/verify.js +++ b/lib/verify.js @@ -36,6 +36,7 @@ const script = ` if (modules === 64) { kCpuFeaturesOffset = 0x0c; } else + // what about 67 here? if (modules === 72) { // no cpu features anymore } else
missing abi entries (#<I>) * fix: cloned too much from node repo * chore: add missed bare * fix: issue #<I> nodeVersion on clone with less branches * fix: typo R removed * fix: remove and edited files as expected for the pull request * test: set test to new git pull command results * feat(build): knowing node <I> to <I>
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,12 +6,6 @@ require 'rspec/rails' require 'database_cleaner' require 'genspec' -if RUBY_VERSION[0].to_i > 1 - require 'byebug' -else - require 'ruby-debug'; -end - namespace :dummy do load 'spec/dummyapp/Rakefile' end
Remove debugger require from spec_helper.
diff --git a/common/src/com/thoughtworks/go/domain/Matcher.java b/common/src/com/thoughtworks/go/domain/Matcher.java index <HASH>..<HASH> 100644 --- a/common/src/com/thoughtworks/go/domain/Matcher.java +++ b/common/src/com/thoughtworks/go/domain/Matcher.java @@ -82,8 +82,8 @@ public class Matcher { public boolean matches(String comment) { for (String escapedMatcher : escapeMatchers()) { - Pattern pattern = Pattern.compile(".*\\B" + escapedMatcher + "\\B.*|.*\\b" + escapedMatcher + "\\b.*"); - if (pattern.matcher(comment).matches()) { + Pattern pattern = Pattern.compile("\\B" + escapedMatcher + "\\B|\\b" + escapedMatcher + "\\b"); + if (pattern.matcher(comment).find()) { return true; } }
#<I> - Reverts an earlier revert. CLA signed. This reverts commit d<I>c<I>c<I>c<I>abb7f<I>da1b<I>ed6.
diff --git a/docs/pages/index.js b/docs/pages/index.js index <HASH>..<HASH> 100644 --- a/docs/pages/index.js +++ b/docs/pages/index.js @@ -117,10 +117,6 @@ export default function LandingPage(props) { const { sponsorsProps } = props; React.useEffect(() => { - if (window.location.hash !== '' && window.location.hash !== '#main=content') { - window.location.replace(`https://v0.material-ui.com/${window.location.hash}`); - } - loadDependencies(); }, []); const t = useSelector((state) => state.options.t);
[docs] Remove redirection to v0 (#<I>) (#<I>)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setuptools.setup(name='pytest-cov', url='https://github.com/schlamar/pytest-cov', py_modules=['pytest_cov'], install_requires=['pytest>=2.5.2', - 'cov-core>=1.9'], + 'cov-core>=1.10'], entry_points={'pytest11': ['pytest_cov = pytest_cov']}, license='MIT License', zip_safe=False,
Set cov-core dependency to <I>
diff --git a/src/Makes/MakeModel.php b/src/Makes/MakeModel.php index <HASH>..<HASH> 100644 --- a/src/Makes/MakeModel.php +++ b/src/Makes/MakeModel.php @@ -32,11 +32,10 @@ class MakeModel { if (! $this->files->exists($modelPath)) { $this->scaffoldCommandObj->call('make:model', [ - 'name' => $name, - '--no-migration' => true + 'name' => $name ]); } } -} \ No newline at end of file +}
Update MakeModel.php to work with Laravel <I> Laravel <I> no longer supports the --no-migration flag. It's not even needed, as migrations aren't made by default not.
diff --git a/lib/rails_env_credentials/version.rb b/lib/rails_env_credentials/version.rb index <HASH>..<HASH> 100644 --- a/lib/rails_env_credentials/version.rb +++ b/lib/rails_env_credentials/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module RailsEnvCredentials - VERSION = "0.1.1" + VERSION = "0.1.2" end
:shipit: Bump to <I>
diff --git a/phoebe/frontend/bundle.py b/phoebe/frontend/bundle.py index <HASH>..<HASH> 100644 --- a/phoebe/frontend/bundle.py +++ b/phoebe/frontend/bundle.py @@ -1308,10 +1308,16 @@ class Bundle(ParameterSet): # TODO: make sure also removes and handles the percomponent parameters correctly (ie maxpoints@phoebe@compute) raise NotImplementedError - def add_spot(self, component, feature=None, **kwargs): + def add_spot(self, component=None, feature=None, **kwargs): """ Shortcut to :meth:`add_feature` but with kind='spot' """ + if component is None: + if len(self.hierarchy.get_stars())==1: + component = self.hierarchy.get_stars()[0] + else: + raise ValueError("must provide component for spot") + kwargs.setdefault('component', component) kwargs.setdefault('feature', feature) return self.add_feature('spot', **kwargs)
allow spot to be added for single stars without providing component
diff --git a/src/Symfony/Component/Finder/SplFileInfo.php b/src/Symfony/Component/Finder/SplFileInfo.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Finder/SplFileInfo.php +++ b/src/Symfony/Component/Finder/SplFileInfo.php @@ -38,6 +38,8 @@ class SplFileInfo extends \SplFileInfo /** * Returns the relative path. * + * This path does not contain the file name. + * * @return string the relative path */ public function getRelativePath() @@ -48,6 +50,8 @@ class SplFileInfo extends \SplFileInfo /** * Returns the relative path name. * + * This path contains the file name. + * * @return string the relative path name */ public function getRelativePathname()
Improve the phpdoc of SplFileInfo methods
diff --git a/structr-core/src/main/java/org/structr/core/graph/Factory.java b/structr-core/src/main/java/org/structr/core/graph/Factory.java index <HASH>..<HASH> 100644 --- a/structr-core/src/main/java/org/structr/core/graph/Factory.java +++ b/structr-core/src/main/java/org/structr/core/graph/Factory.java @@ -348,6 +348,7 @@ public abstract class Factory<S, T extends GraphObject> implements Adapter<S, T> SecurityContext securityContext = factoryProfile.getSecurityContext(); // In case of superuser or in public context, don't check the overall result count + // (SearchCommand adds visibleToPublicUsers: true in case of an anonymous user) boolean dontCheckCount = securityContext.isSuperUser() || securityContext.getUser(false) == null; if(dontCheckCount){
Added comment in Factory.java.
diff --git a/src/dom.js b/src/dom.js index <HASH>..<HASH> 100644 --- a/src/dom.js +++ b/src/dom.js @@ -81,12 +81,19 @@ export const BlobProvider = ({ document: doc, children }) => { return <InternalBlobProvider document={doc}>{children}</InternalBlobProvider>; }; -export const PDFViewer = ({ className, style, children, ...props }) => { +export const PDFViewer = ({ + className, + style, + children, + innerRef, + ...props +}) => { return ( <InternalBlobProvider document={children}> {({ url }) => ( <iframe className={className} + ref={innerRef} src={url} style={Array.isArray(style) ? flatStyles(style) : style} {...props}
Add innerRef prop to PDFViewer (#<I>)
diff --git a/tasks/angular-service.js b/tasks/angular-service.js index <HASH>..<HASH> 100644 --- a/tasks/angular-service.js +++ b/tasks/angular-service.js @@ -260,7 +260,7 @@ module.exports = function(grunt) { var deps = data.inject || []; // Service dependencies. var name = data.name; // Name of service. var choose = data.choose; - var pretty = data.pretty || true; + var pretty = (data.pretty !== undefined) ? data.pretty : true; // If pretty is `true`, set it to default beautifier settings. if (pretty === true) {
fix `pretty = false` option you'll never get a falsy value out of "result = thing || true".
diff --git a/server.js b/server.js index <HASH>..<HASH> 100644 --- a/server.js +++ b/server.js @@ -89,7 +89,7 @@ function Server (opts) { delete this.peers[peerStr]; break; case 'error': - this.emit('error', data.toString(), string2peer(peerStr)); + this.emit('error', new Error(data.toString()), string2peer(peerStr)); } }; @@ -137,8 +137,11 @@ function Server (opts) { // Forward incoming packages to openSSL socket.on('message', (packet, peer) => this.backend.handlePacket(peer2string(peer), packet)); - // Listen on given port - socket.bind(opts.port); + // Expose bind method + this.bind = function () { + const args = Array.prototype.slice.call(arguments); + socket.bind.apply(socket, args); + }; } util.inherits(Server, events.EventEmitter);
Expose bind method instead of directly callig it
diff --git a/lib/lanes/concerns/code_identifier.rb b/lib/lanes/concerns/code_identifier.rb index <HASH>..<HASH> 100644 --- a/lib/lanes/concerns/code_identifier.rb +++ b/lib/lanes/concerns/code_identifier.rb @@ -26,7 +26,7 @@ module Lanes before_validation(:on=>:create) do source = self[from] unless source.blank? - self.code ||= Lanes::Strings.code_identifier( source, length:max_length ) + self.code ||= Lanes::Strings.code_identifier( source, length:max_length, padding: '' ) end end end
Don't pad code ids when template string is short
diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index <HASH>..<HASH> 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -241,7 +241,7 @@ class Debugger { return; } - $_this =& Debugger::getInstance(); + $_this = Debugger::getInstance(); if (empty($file)) { $file = '[internal]'; @@ -327,7 +327,7 @@ class Debugger { * @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class */ public static function trace($options = array()) { - $_this =& Debugger::getInstance(); + $_this = Debugger::getInstance(); $defaults = array( 'depth' => 999, 'format' => $_this->_outputFormat, @@ -551,7 +551,7 @@ class Debugger { * @param array $strings Template strings to be used for the output format. */ public function output($format = null, $strings = array()) { - $_this =& Debugger::getInstance(); + $_this = Debugger::getInstance(); $data = null; if (is_null($format)) {
Removing E_STRICT errors from debugger
diff --git a/tasks.py b/tasks.py index <HASH>..<HASH> 100644 --- a/tasks.py +++ b/tasks.py @@ -81,7 +81,7 @@ def tests_prepare_config(ctx, version, source, target): if line.startswith('db_name'): config_content[idx] = 'db_name = {}\n'.format(dbname(version)) - with open(target, 'w+') as config_file: + with open(target, 'w') as config_file: for line in config_content: config_file.write(line)
No need to open in w+
diff --git a/lib/filelib.php b/lib/filelib.php index <HASH>..<HASH> 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -4182,6 +4182,14 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) { require_login(); } + // Check if user can view this category. + if (!has_capability('moodle/category:viewhiddencategories', $context)) { + $coursecatvisible = $DB->get_field('course_categories', 'visible', array('id' => $context->instanceid)); + if (!$coursecatvisible) { + send_file_not_found(); + } + } + $filename = array_pop($args); $filepath = $args ? '/'.implode('/', $args).'/' : '/'; if (!$file = $fs->get_file($context->id, 'coursecat', 'description', 0, $filepath, $filename) or $file->is_directory()) {
MDL-<I> file_info: check capability when serving file in coursecat description
diff --git a/channel.go b/channel.go index <HASH>..<HASH> 100644 --- a/channel.go +++ b/channel.go @@ -323,7 +323,7 @@ func (ch *Channel) serve() { netConn.Close() continue } - c.onCloseStateChange = ch.ConnectionCloseStateChange + c.onCloseStateChange = ch.connectionCloseStateChange } } @@ -362,7 +362,7 @@ func (ch *Channel) Connect(ctx context.Context, hostPort string, connectionOptio if err != nil { return nil, err } - c.onCloseStateChange = ch.ConnectionCloseStateChange + c.onCloseStateChange = ch.connectionCloseStateChange if err := c.sendInit(ctx); err != nil { return nil, err @@ -384,7 +384,8 @@ func (ch *Channel) Connect(ctx context.Context, hostPort string, connectionOptio return c, err } -func (ch *Channel) ConnectionCloseStateChange(c *Connection) { +// connectionCloseStateChange is called when a connection's close state changes. +func (ch *Channel) connectionCloseStateChange(c *Connection) { switch chState := ch.State(); chState { case ChannelStartClose, ChannelInboundClosed: ch.mutable.mut.RLock()
Unexport function that should not be exported
diff --git a/salt/matchers/confirm_top.py b/salt/matchers/confirm_top.py index <HASH>..<HASH> 100644 --- a/salt/matchers/confirm_top.py +++ b/salt/matchers/confirm_top.py @@ -1,11 +1,8 @@ -# -*- coding: utf-8 -*- """ The matcher subsystem needs a function called "confirm_top", which takes the data passed to a top file environment and determines if that data matches this minion. """ -from __future__ import absolute_import - import logging import salt.loader diff --git a/tests/unit/matchers/test_confirm_top.py b/tests/unit/matchers/test_confirm_top.py index <HASH>..<HASH> 100644 --- a/tests/unit/matchers/test_confirm_top.py +++ b/tests/unit/matchers/test_confirm_top.py @@ -1,12 +1,5 @@ -# -*- coding: utf-8 -*- - -# Import python libs -from __future__ import absolute_import, print_function, unicode_literals - import salt.config import salt.loader - -# Import Salt Testing libs from tests.support.unit import TestCase
Fix pre-commit black and isort
diff --git a/lib/Utility.php b/lib/Utility.php index <HASH>..<HASH> 100644 --- a/lib/Utility.php +++ b/lib/Utility.php @@ -113,9 +113,13 @@ class Utility ********************/ public static function dumper($var) { - echo "<pre>\n"; + if (php_sapi_name() != 'cli') { // DONT PRE THE CLI! + echo "<pre>\n"; + } print_r($var); - echo "</pre><br>\n"; + if (php_sapi_name() != 'cli') { // DONT PRE THE CLI! + echo "</pre><br>\n"; + } } public static function dumperToString($var) @@ -459,7 +463,7 @@ class Utility public static function flush() { - if (php_sapi_name() != 'cli') { // DONT FLUSH THE FUCKING CLI! + if (php_sapi_name() != 'cli') { // DONT FLUSH THE CLI! //echo(str_repeat(' ',256)); if (ob_get_length()) { @ob_flush();
added cli detection to dumper... after like 7+ years its about time i got around to doing that
diff --git a/spec/requests/feed_spec.rb b/spec/requests/feed_spec.rb index <HASH>..<HASH> 100644 --- a/spec/requests/feed_spec.rb +++ b/spec/requests/feed_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe "feed" do before(:each) do - Factory(:posts_revision, url: "url/to/post") + Factory(:posts_revision, :url => "url/to/post") end # test to prevent regression for issue #72
fixed a test that used <I> style
diff --git a/loompy/_version.py b/loompy/_version.py index <HASH>..<HASH> 100644 --- a/loompy/_version.py +++ b/loompy/_version.py @@ -1 +1 @@ -__version__ = '1.0.1' +__version__ = '1.0.2'
version bump for pypi
diff --git a/test/mock/index.js b/test/mock/index.js index <HASH>..<HASH> 100644 --- a/test/mock/index.js +++ b/test/mock/index.js @@ -1,5 +1,34 @@ var Server = require('./lib/server'); +const cleanup = (servers, spy, callback) => { + if (!Array.isArray(servers)) { + throw new Error('First argument must be an array of mock servers'); + } + + if (spy) { + const alreadyDrained = spy.connectionCount() === 0; + const finish = () => { + callback(null, null); + }; + + if (!alreadyDrained) { + spy.once('drained', () => finish()); + } + + const cleanupPromise = Promise.all(servers.map(server => server.destroy())).catch(err => + callback(err, null) + ); + + if (alreadyDrained) { + cleanupPromise.then(() => finish()); + } + } else { + Promise.all(servers.map(server => server.destroy())) + .then(() => callback(null, null)) + .catch(err => callback(err, null)); + } +}; + /* * Main module */ @@ -7,5 +36,7 @@ module.exports = { createServer: function(port, host, options) { options = options || {}; return new Server(port, host, options).start(); - } + }, + + cleanup: cleanup };
feat(mock): support a means of consistently cleaning up mock servers NODE-<I>
diff --git a/jfoenix/src/main/java/com/jfoenix/validation/RegexValidator.java b/jfoenix/src/main/java/com/jfoenix/validation/RegexValidator.java index <HASH>..<HASH> 100644 --- a/jfoenix/src/main/java/com/jfoenix/validation/RegexValidator.java +++ b/jfoenix/src/main/java/com/jfoenix/validation/RegexValidator.java @@ -63,7 +63,9 @@ public class RegexValidator extends ValidatorBase { private void evalTextInputField() { TextInputControl textField = (TextInputControl) srcControl.get(); - if (regexPatternCompiled.matcher(textField.getText()).matches()) { + String text = (textField.getText() == null) ? "" : textField.getText(); // Treat null like empty string + + if (regexPatternCompiled.matcher(text).matches()) { hasErrors.set(false); } else { hasErrors.set(true);
Matcher doesn't like nulls. If the text is null, we'll treat it like an empty string.
diff --git a/is.go b/is.go index <HASH>..<HASH> 100644 --- a/is.go +++ b/is.go @@ -31,7 +31,7 @@ // is.Equal(signedin, true) // must be signed in // // body := readBody(r) -// is.OK(strings.Contains(body, "Hi there")) +// is.True(strings.Contains(body, "Hi there")) // // } package is
Replace is.OK with is.True in package description Looks like this was an oversight in #2.
diff --git a/core/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java b/core/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java +++ b/core/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java @@ -35,7 +35,7 @@ public class WebInterfaceBrowseServlet extends HttpServlet { * Class to make referencing file objects more intuitive. Mainly to avoid implicit association by * array indexes. */ - public static class UiBlockInfo implements Comparable<UiBlockInfo> { + public static final class UiBlockInfo { private final long mId; private final long mBlockLength; private final boolean mInMemory; @@ -46,11 +46,6 @@ public class WebInterfaceBrowseServlet extends HttpServlet { mInMemory = blockInfo.isInMemory(); } - @Override - public int compareTo(UiBlockInfo p) { - return (mId < p.mId ? -1 : (mId == p.mId ? 0 : 1)); - } - public long getBlockLength() { return mBlockLength; }
removed compareTo from UiBlockInfo since its bad practice to define it without equals and hash. Inspecting the code, it wasnt needed so removed
diff --git a/php/commands/export.php b/php/commands/export.php index <HASH>..<HASH> 100644 --- a/php/commands/export.php +++ b/php/commands/export.php @@ -36,7 +36,7 @@ class Export_Command extends WP_CLI_Command { * comma. Defaults to all. * * [--post_type__not_in=<post-type>] - * : Export all post types except those identified. Seperate multiple post types + * : Export all post types except those identified. Separate multiple post types * with a comma. Defaults to none. * * [--post__in=<pid>]
Correct spelling of 'separate' in the `wp export` command docs.
diff --git a/lxd/db/images_test.go b/lxd/db/images_test.go index <HASH>..<HASH> 100644 --- a/lxd/db/images_test.go +++ b/lxd/db/images_test.go @@ -37,7 +37,7 @@ func TestLocateImage(t *testing.T) { address, err = cluster.LocateImage("abc") require.Equal(t, "", address) - require.EqualError(t, err, "image not available on any online node") + require.EqualError(t, err, "Image not available on any online node") } func TestImageExists(t *testing.T) {
lxd/db/images/test: Fixes tests for LocateImage
diff --git a/dump2polarion/csv2sqlite_cli.py b/dump2polarion/csv2sqlite_cli.py index <HASH>..<HASH> 100644 --- a/dump2polarion/csv2sqlite_cli.py +++ b/dump2polarion/csv2sqlite_cli.py @@ -80,6 +80,9 @@ def main(args=None): init_log(args.log_level) + if '.csv' not in args.input_file.lower(): + logger.warn("Make sure the input file '{}' is in CSV format".format(args.input_file)) + try: records = csvtools.get_imported_data(args.input_file) except (EnvironmentError, Dump2PolarionException) as err:
warn if input file doesn't seem to be CSV file
diff --git a/js/server/SocketServer.js b/js/server/SocketServer.js index <HASH>..<HASH> 100644 --- a/js/server/SocketServer.js +++ b/js/server/SocketServer.js @@ -22,6 +22,10 @@ function start(httpServer, withEngine) { engine = withEngine storage.setStore(engine.getStore()) + if (!httpServer) { + httpServer = require('http').createServer(function(){}) + httpServer.listen(8080, '127.0.0.1') + } var socket = io.listen(httpServer) socket.on('connection', _handleConnection) }
If there's not http server, start one
diff --git a/src/Offer/ReadModel/JSONLD/OfferLDProjector.php b/src/Offer/ReadModel/JSONLD/OfferLDProjector.php index <HASH>..<HASH> 100644 --- a/src/Offer/ReadModel/JSONLD/OfferLDProjector.php +++ b/src/Offer/ReadModel/JSONLD/OfferLDProjector.php @@ -94,6 +94,9 @@ abstract class OfferLDProjector implements OrganizerServiceInterface protected $eventsNotTriggeringUpdateModified; /** + * Associative array of bases prices. + * Key is the language, value is the translated string. + * * @var string[] */ private $basePriceTranslations;
III-<I> Add comment about base price translations being an associative array.
diff --git a/src/you_get/cli_wrapper/player/__main__.py b/src/you_get/cli_wrapper/player/__main__.py index <HASH>..<HASH> 100644 --- a/src/you_get/cli_wrapper/player/__main__.py +++ b/src/you_get/cli_wrapper/player/__main__.py @@ -1,7 +1,9 @@ #!/usr/bin/env python +''' WIP def main(): script_main('you-get', any_download, any_download_playlist) if __name__ == "__main__": main() +'''
comment the WIP code to silent lint
diff --git a/bundles/org.eclipse.orion.client.core/static/js/status.js b/bundles/org.eclipse.orion.client.core/static/js/status.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.core/static/js/status.js +++ b/bundles/org.eclipse.orion.client.core/static/js/status.js @@ -60,16 +60,16 @@ eclipse.StatusReportingService.prototype = { } var message = status.message || status; var color = "red"; - if (status.severity) { - switch (status.severity) { - case "warning": + if (status.Severity) { + switch (status.Severity) { + case "Warning": color = "#FFCC00"; break; - case "error": + case "Error": color = "red"; break; - case "info": - case "ok": + case "Info": + case "Ok": color = "green"; break; }
Bug <I> - Exception JSON response objects should have upper case properties
diff --git a/fuseops/convert.go b/fuseops/convert.go index <HASH>..<HASH> 100644 --- a/fuseops/convert.go +++ b/fuseops/convert.go @@ -82,6 +82,14 @@ func Convert(r bazilfuse.Request, logger *log.Logger) (o Op) { o = to co = &to.commonOp + case *bazilfuse.ForgetRequest: + to := &ForgetInodeOp{ + Inode: InodeID(typed.Header.Node), + N: typed.N, + } + o = to + co = &to.commonOp + case *bazilfuse.MkdirRequest: to := &MkDirOp{ Parent: InodeID(typed.Header.Node), diff --git a/fuseops/ops.go b/fuseops/ops.go index <HASH>..<HASH> 100644 --- a/fuseops/ops.go +++ b/fuseops/ops.go @@ -255,10 +255,10 @@ type ForgetInodeOp struct { commonOp // The inode whose reference count should be decremented. - ID InodeID + Inode InodeID // The amount to decrement the reference count. - N int + N uint64 } func (o *ForgetInodeOp) Respond(err error) {
Added connection support for ForgetInodeOp.
diff --git a/lib/middleware/hsts.js b/lib/middleware/hsts.js index <HASH>..<HASH> 100644 --- a/lib/middleware/hsts.js +++ b/lib/middleware/hsts.js @@ -12,7 +12,7 @@ module.exports = function (maxAge, includeSubdomains) { if (includeSubdomains) header += '; includeSubdomains'; return function (req, res, next) { - if (req.connection.encrypted) { + if (typeof req.secure !== "undefined" ? req.secure : req.connection.encrypted) { res.header('Strict-Transport-Security', header); } next();
Use req.secure if it is set
diff --git a/bin/changelog.js b/bin/changelog.js index <HASH>..<HASH> 100755 --- a/bin/changelog.js +++ b/bin/changelog.js @@ -138,7 +138,7 @@ async function getCommitMessage(commitInfo) { let lines = message.split(/\n\n/); - if (lines[1] === '') { + if (!lines[1]) { let pullRequest = await getPullRequest({ user: 'emberjs', repo: 'ember.js',
Fetch PR title Github on undefined/null as well as empty string
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ install_requires = [ "troposphere>=1.9.0", "botocore>=1.6.0", "boto3>=1.3.1", - "PyYAML~=3.12", + "PyYAML>=3.12", "awacs>=0.6.0", "formic~=0.9b", "gitpython~=2.0",
Use a less strict pinning for PyYAML (#<I>) * loosen up PyYAML version a bit. * Update setup.py
diff --git a/lib/rules/spaced-comment.js b/lib/rules/spaced-comment.js index <HASH>..<HASH> 100644 --- a/lib/rules/spaced-comment.js +++ b/lib/rules/spaced-comment.js @@ -46,7 +46,7 @@ module.exports = function(context) { markers = unescapedMarkers.map(escaper); // the markerMatcher includes any markers in the list, followed by space/tab - markerMatcher = new RegExp("((^(" + markers.join("))|(^(") + ")))[ \\t]"); + markerMatcher = new RegExp("((^(" + markers.join("))|(^(") + ")))[ \\t\\n]"); } diff --git a/tests/lib/rules/spaced-comment.js b/tests/lib/rules/spaced-comment.js index <HASH>..<HASH> 100644 --- a/tests/lib/rules/spaced-comment.js +++ b/tests/lib/rules/spaced-comment.js @@ -130,6 +130,10 @@ eslintTester.addRuleTest("lib/rules/spaced-comment", { { code: "/* \n *Test\n */", options: ["always"] + }, + { + code: "/*!\n *comment\n */", + options: ["always", { markers: ["!"] }] } ],
Fix: Allow blocked comments with markers and new-line (fixes #<I>)
diff --git a/simuvex/storage/paged_memory.py b/simuvex/storage/paged_memory.py index <HASH>..<HASH> 100644 --- a/simuvex/storage/paged_memory.py +++ b/simuvex/storage/paged_memory.py @@ -777,7 +777,8 @@ class SimPagedMemory(object): if self.state.mode != 'fastpath': for page in xrange(pages): if base_page_num + page in self._pages: - raise SimMemoryError("map_page received address and length combination which contained mapped page") + l.warning("map_page received address and length combination which contained mapped page") + return if isinstance(permissions, (int, long)): permissions = claripy.BVV(permissions, 3)
map_page now warns if a page is already mapped instead of raising SimMemoryError
diff --git a/src/main/java/com/bullhornsdk/data/model/entity/file/CandidateFileAttachment.java b/src/main/java/com/bullhornsdk/data/model/entity/file/CandidateFileAttachment.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/bullhornsdk/data/model/entity/file/CandidateFileAttachment.java +++ b/src/main/java/com/bullhornsdk/data/model/entity/file/CandidateFileAttachment.java @@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonRootName; "fileType", "isCopied", "isDeleted", + "isEncrypted", "isExternal", "isOpen", "isPrivate",
added json tag isEncrypted
diff --git a/devices.js b/devices.js index <HASH>..<HASH> 100644 --- a/devices.js +++ b/devices.js @@ -1393,6 +1393,13 @@ const devices = [ extend: generic.light_onoff_brightness_colortemp, }, { + zigbeeModel: ['LIGHTIFY BR RGBW'], + model: '73739', + vendor: 'Sylvania', + description: 'LIGHTIFY LED RGBW BR30', + extend: generic.light_onoff_brightness_colortemp_colorxy, + }, + { zigbeeModel: ['LIGHTIFY A19 RGBW'], model: '73693', vendor: 'Sylvania',
Add Support for Osram BR<I> RGBW (#<I>) * Add support for Sengled E<I>-N<I> (BR<I>) Light * Add Osram BR<I> RGBW LED to HA * Update devices.js
diff --git a/lib/netsuite/records/journal_entry.rb b/lib/netsuite/records/journal_entry.rb index <HASH>..<HASH> 100644 --- a/lib/netsuite/records/journal_entry.rb +++ b/lib/netsuite/records/journal_entry.rb @@ -39,6 +39,10 @@ module NetSuite "Transaction" end + def self.search_class_namespace + "tranSales" + end + end end end
Add search namespace override to JournalEntry The namespace for JournalEntry is tranGeneral, but it's search falls under the Transaction schema with the namespace tranSales. Add a search_class_namespace override to make this work properly.
diff --git a/app/models/barbeque/job_execution.rb b/app/models/barbeque/job_execution.rb index <HASH>..<HASH> 100644 --- a/app/models/barbeque/job_execution.rb +++ b/app/models/barbeque/job_execution.rb @@ -3,7 +3,7 @@ class Barbeque::JobExecution < Barbeque::ApplicationRecord belongs_to :job_queue has_one :slack_notification, through: :job_definition has_one :app, through: :job_definition - has_many :job_retries + has_many :job_retries, dependent: :destroy enum status: { pending: 0,
Destroy retries after their execution destruction
diff --git a/tests/unit/components/when-input-test.js b/tests/unit/components/when-input-test.js index <HASH>..<HASH> 100644 --- a/tests/unit/components/when-input-test.js +++ b/tests/unit/components/when-input-test.js @@ -131,7 +131,7 @@ describe('Unit: frost-bunsen-input-when', function () { component.send('selectedButton', eventObject) }) - it('sets "selectedValue" to the value the second radio button', function () { + it('sets "selectedValue" to the value the first radio button', function () { expect(component.get('selectedValue')).to.equal(firstButtonValue) })
update a test title to be correct
diff --git a/spec/baza_models/query_spec.rb b/spec/baza_models/query_spec.rb index <HASH>..<HASH> 100644 --- a/spec/baza_models/query_spec.rb +++ b/spec/baza_models/query_spec.rb @@ -42,6 +42,13 @@ describe BazaModels::Query do expect(query.to_sql).to eq "SELECT `users`.* FROM `users` LEFT JOIN roles ON roles.user_id = users.id WHERE `roles`.`role` = 'administrator'" expect(query.to_a).to eq [user] end + + it "does deep joins" do + query = Organization.joins(user: :person).to_sql + + expect(query).to include "INNER JOIN `users` ON `users.organization_id` = `organizations`.`id`" + expect(query).to include "INNER JOIN `persons` ON `persons.user_id` = `users`.`id`" + end end context "#group, #order" do
Added spec for deep joins
diff --git a/test/com/belladati/sdk/impl/SDKTest.java b/test/com/belladati/sdk/impl/SDKTest.java index <HASH>..<HASH> 100644 --- a/test/com/belladati/sdk/impl/SDKTest.java +++ b/test/com/belladati/sdk/impl/SDKTest.java @@ -28,7 +28,7 @@ public class SDKTest { protected final JsonBuilder builder = new JsonBuilder(); /** system default locale */ - private static final Locale DEFAULT_LOCALE = Locale.getDefault(); + private static final Locale DEFAULT_LOCALE = Locale.ENGLISH; @BeforeMethod(alwaysRun = true) protected void setupServer() throws Exception {
Failing tests fixed. Root cause was system locale. If different from ENGLISH, hardcoded date strings do not match with hardcoded generated once (Pi vs Fri, etc.)
diff --git a/tofu/geom/_core_optics.py b/tofu/geom/_core_optics.py index <HASH>..<HASH> 100644 --- a/tofu/geom/_core_optics.py +++ b/tofu/geom/_core_optics.py @@ -2801,6 +2801,14 @@ class CrystalBragg(utils.ToFuObject): ) # --------------- + # refactor pts and lambok + + indok = np.any(lambok, axis=0) + pts = pts[:, indok] + ptsXYZ = ptsXYZ[:, indok] + lambok = lambok[:, indok] + + # --------------- # check strict if strict is True:
[#<I>] Cryst.get_plasmadomain_at_lamb() now faster and lighter thanks to refactoring, TODO: parallelizing?
diff --git a/mongo_orchestration/servers.py b/mongo_orchestration/servers.py index <HASH>..<HASH> 100644 --- a/mongo_orchestration/servers.py +++ b/mongo_orchestration/servers.py @@ -326,17 +326,18 @@ class Server(BaseModel): self.port = int(self.hostname.split(':')[1]) # Wait for Server to respond to isMaster. - for i in range(timeout): + # Only try 6 times, each ConnectionFailure is 30 seconds. + max_attempts = 6 + for i in range(max_attempts): try: self.run_command('isMaster') break except pymongo.errors.ConnectionFailure: logger.exception('isMaster command failed:') - time.sleep(0.1) else: raise TimeoutError( "Server did not respond to 'isMaster' after %d attempts." - % timeout) + % max_attempts) except (OSError, TimeoutError): logpath = self.cfg.get('logpath') if logpath:
Reduce isMaster waiting time from <I> hours to 3 minutes.
diff --git a/table/tables/tables_test.go b/table/tables/tables_test.go index <HASH>..<HASH> 100644 --- a/table/tables/tables_test.go +++ b/table/tables/tables_test.go @@ -397,7 +397,7 @@ func (ts *testSuite) TestTableFromMeta(c *C) { c.Assert(err, IsNil) tb, err := ts.dom.InfoSchema().TableByName(model.NewCIStr("test"), model.NewCIStr("meta")) c.Assert(err, IsNil) - tbInfo := tb.Meta() + tbInfo := tb.Meta().Clone() // For test coverage tbInfo.Columns[0].GeneratedExprString = "a"
planner: fix the unstable unit test TestTableFromMeta (#<I>)
diff --git a/boot/server.js b/boot/server.js index <HASH>..<HASH> 100644 --- a/boot/server.js +++ b/boot/server.js @@ -1,5 +1,17 @@ /* global process, __dirname */ +// Ensure running a compatible version of Node before getting too far... +var semver = require('semver') +var packageJson = require('../package.json') +if (packageJson.engines && + packageJson.engines.node && + !semver.satisfies(process.versions.node, packageJson.engines.node)) { + console.error('Incompatible version of node - running [%s] but require [%s]', + process.versions.node, packageJson.engines.node) + process.exit(1) +} + + /** * Configuration dependencies */
Added version check to server.js
diff --git a/src/main/java/org/zendesk/client/v2/Zendesk.java b/src/main/java/org/zendesk/client/v2/Zendesk.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/zendesk/client/v2/Zendesk.java +++ b/src/main/java/org/zendesk/client/v2/Zendesk.java @@ -2402,6 +2402,11 @@ public class Zendesk implements Closeable { @Override public JobStatus<T> onCompleted(Response response) throws Exception { JobStatus<T> result = super.onCompleted(response); + if (result == null) { + // null is when we receive a 404 response. + // For an async job we trigger an error + throw new ZendeskResponseException(response); + } result.setResultsClass(resultClass); return result; }
[fix] A <I> answer (result==null) for an async Job should be considered as an error.
diff --git a/Kwc/Basic/Text/StylesModel.php b/Kwc/Basic/Text/StylesModel.php index <HASH>..<HASH> 100644 --- a/Kwc/Basic/Text/StylesModel.php +++ b/Kwc/Basic/Text/StylesModel.php @@ -45,9 +45,7 @@ class Kwc_Basic_Text_StylesModel extends Kwf_Model_Db_Proxy $package = Kwf_Assets_Package_Default::getInstance('Frontend'); $ret = array(); foreach ($package->getDependency()->getFilteredUniqueDependencies('text/css') as $dep) { - if ($dep instanceof Kwf_Assets_Dependency_File) { - $ret = array_merge($ret, self::parseMasterStyles(file_get_contents($dep->getAbsoluteFileName()))); - } + $ret = array_merge($ret, self::parseMasterStyles($dep->getContentsSourceString())); } Kwf_Cache_SimpleStatic::add($cacheId, $ret); return $ret;
Use ConentsSourceString method to get contents - Kwf_Assets_Components_Dependency_Css isn't a File dependency - this is also very efficent
diff --git a/src/BTChip.js b/src/BTChip.js index <HASH>..<HASH> 100644 --- a/src/BTChip.js +++ b/src/BTChip.js @@ -58,6 +58,9 @@ BTChip.prototype._almostConvertU32 = function(number, hdFlag) { } BTChip.prototype.parseBIP32Path = function(path) { + if (path.indexOf("m/") == 0) { + path = path.substring(2); + } var result = []; var components = path.split("/"); for (var i=0; i<components.length; i++) {
Handle conventional path naming m/
diff --git a/tests/unit/models/geometry/PoreVolumeTest.py b/tests/unit/models/geometry/PoreVolumeTest.py index <HASH>..<HASH> 100644 --- a/tests/unit/models/geometry/PoreVolumeTest.py +++ b/tests/unit/models/geometry/PoreVolumeTest.py @@ -49,6 +49,15 @@ class PoreVolumeTest: b = np.unique(self.geo['pore.volume']) assert_approx_equal(a, b) + def test_effective(self): + net = op.network.Cubic(shape=[2, 2, 1]) + net['pore.volume'] = 0.5 + net['throat.volume'] = 0.25 + net.add_model(propname='pore.volume_effective', + model=mods.effective) + a = np.array([0.5 + 0.25]) + b = np.unique(net['pore.volume_effective']) + assert_approx_equal(a, b) if __name__ == '__main__':
Added unit test for effective volume model
diff --git a/ipyrad/assemble/demultiplex.py b/ipyrad/assemble/demultiplex.py index <HASH>..<HASH> 100644 --- a/ipyrad/assemble/demultiplex.py +++ b/ipyrad/assemble/demultiplex.py @@ -216,10 +216,10 @@ class FileLinker: rasyncs = {} if createdinc: for sample in self.data.samples.values(): - gzipped = bool(sample.files.fastqs[0].endswith(".gz")) + gzipped = bool(sample.files.fastqs[0][0].endswith(".gz")) rasyncs[sample.name] = self.lbview.apply( zbufcountlines, - *(sample.files.fastqs[0], gzipped) + *(sample.files.fastqs[0][0], gzipped) ) # wait for link jobs to finish if parallel
fix to fastqs tuple in a list on fastq loader
diff --git a/src/security/is-request-valid.js b/src/security/is-request-valid.js index <HASH>..<HASH> 100644 --- a/src/security/is-request-valid.js +++ b/src/security/is-request-valid.js @@ -14,7 +14,7 @@ module.exports = function isRequestValid(context, req, cb) { currentDate = new Date(), diff = (currentDate - requestDate) / 1000; - req.pipe(hashStream(context.secretKey, queryString.dt)).pipe(concat(function(hash) { + req.pipe(hashStream(context.sharedSecret, queryString.dt)).pipe(concat(function(hash) { if (hash !== queryString.messageHash || diff > timeout) { console.error(util.format("Unauthorized access from %s, %s, %s Computed: %s"), req.headers.host, queryString.messageHash, queryString.dt, hash);
changing secretKey to sharedSecret in isRequestValid
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( 'simple_elasticsearch.management', 'simple_elasticsearch.management.commands' ], - version = '0.1.1', + version = '0.1.3', url='http://github.com/jaddison/django-simple-elasticsearch', keywords=['search', 'django', 'elasticsearch', 'es', 'index'], license='BSD', diff --git a/simple_elasticsearch/utils.py b/simple_elasticsearch/utils.py index <HASH>..<HASH> 100644 --- a/simple_elasticsearch/utils.py +++ b/simple_elasticsearch/utils.py @@ -39,7 +39,7 @@ def recursive_dict_update(d, u): return d -def queryset_generator(queryset, chunksize=1000): +def queryset_iterator(queryset, chunksize=1000): last_pk = queryset.order_by('-pk')[0].pk queryset = queryset.order_by('pk') pk = queryset[0].pk - 1
Updating pypi version and fixing a function naming bug.
diff --git a/providers/providers.go b/providers/providers.go index <HASH>..<HASH> 100644 --- a/providers/providers.go +++ b/providers/providers.go @@ -118,12 +118,7 @@ func loadProvSet(dstore ds.Datastore, k *cid.Cid) (*providerSet, error) { } out := newProviderSet() - //for e := range res.Next() { - for { - e, ok := res.NextSync() - if !ok { - break - } + for e := range res.Next() { if e.Error != nil { log.Error("got an error: ", e.Error) continue
use old 'Next' method for now
diff --git a/quarkc/compiler.py b/quarkc/compiler.py index <HASH>..<HASH> 100644 --- a/quarkc/compiler.py +++ b/quarkc/compiler.py @@ -38,7 +38,7 @@ from .dispatch import overload from .helpers import ( lineinfo, is_meta, get_fields, base_bindings, get_methods, get_field, is_abstract, constructor, base_type, base_constructors, has_super, has_return, - is_newer, compiled_quark, namever, mdroot, + is_newer, compiled_quark, namever, mdroot, is_extendable ) from .environment import Environment from . import docmaker @@ -948,7 +948,7 @@ class Reflector: "mdefs": "\n".join(mdefs), "methods": ", ".join(mids), "parents": ", ".join(['reflect.Class.get("{}")'.format(self.qual(parent_type.resolved.type)) - for parent_type in cls.bases] + for parent_type in cls.bases if is_extendable(parent_type)] or ["reflect.Class.OBJECT"]), "construct": construct}
Only try to track parent relationships of types have a reflect.Class.
diff --git a/src/Select.js b/src/Select.js index <HASH>..<HASH> 100644 --- a/src/Select.js +++ b/src/Select.js @@ -172,7 +172,10 @@ var Select = React.createClass({ }, selectValue: function(value) { - this[this.props.multi ? 'addValue' : 'setValue'](value); + if(!this.props.multi) + this.setValue(value); + else if(value) + this.addValue(value); }, addValue: function(value) {
Do not ever addValue(undefined)
diff --git a/Generator/Info8.php b/Generator/Info8.php index <HASH>..<HASH> 100644 --- a/Generator/Info8.php +++ b/Generator/Info8.php @@ -29,7 +29,7 @@ class Info8 extends Info { $files = array_shift($args); $module_data = $this->base_component->component_data; - print_r($module_data); + //print_r($module_data); $lines = array(); $lines['name'] = $module_data['readable_name'];
Fixed uncommented debug code.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -80,14 +80,6 @@ var createServer = function(e, index) { return server; }; -//--------------------------------------------------------------- -//exit on ctrl-c -process.on('SIGINT', function() { - console.log("\n[ QUIT ]--> Caught interrupt signal on SERVER module"); - process.exit(); -}); -//--------------------------------------------------------------- - module.exports = function(torrent, opts) { if (!opts) opts = {}; if (opts.blocklist) {
removed on sigint handling, not required as it is the default behaviouor
diff --git a/dependency-check-core/src/test/java/org/owasp/dependencycheck/suppression/SuppressionHandlerTest.java b/dependency-check-core/src/test/java/org/owasp/dependencycheck/suppression/SuppressionHandlerTest.java index <HASH>..<HASH> 100644 --- a/dependency-check-core/src/test/java/org/owasp/dependencycheck/suppression/SuppressionHandlerTest.java +++ b/dependency-check-core/src/test/java/org/owasp/dependencycheck/suppression/SuppressionHandlerTest.java @@ -88,7 +88,15 @@ public class SuppressionHandlerTest { xmlReader.parse(in); - List result = handler.getSuppressionRules(); + List<SuppressionRule> result = handler.getSuppressionRules(); assertTrue(result.size() > 3); + int baseCount = 0; + for (SuppressionRule r : result) { + if (r.isBase()) { + baseCount++; + } + } + assertTrue(baseCount > 0); + } }
added assertion to validate that the base flag is being processed Former-commit-id: <I>e<I>af8f<I>d<I>f<I>f<I>e<I>c<I>
diff --git a/lib/command_line_reporter/row.rb b/lib/command_line_reporter/row.rb index <HASH>..<HASH> 100644 --- a/lib/command_line_reporter/row.rb +++ b/lib/command_line_reporter/row.rb @@ -46,7 +46,7 @@ module CommandLineReporter # c1.screen_rows.size == 5 # c2.screen_rows.size == 2 # - # So when we don't have a screen row for c2 we need to fill the screen with the + # So when we don't have a screen row for c2 we need to fill the screen with the # proper number of blanks so the layout looks like (parenthesis on the right just # indicate screen row index) # @@ -58,12 +58,15 @@ module CommandLineReporter # | xxxxxxxxxxx | | (4) # +-------------+------------+ if col.screen_rows[sr].nil? - line << ' ' * col.width + line << ' ' * col.width << ' ' else - line << self.columns[mc].screen_rows[sr] + line << self.columns[mc].screen_rows[sr] << ' ' end - line << ' ' + ((self.border) ? "#{border_char} " : '') + if self.border + line << border_char + line << ' ' if mc < self.columns.size - 1 + end end puts line
Do not print superfluous whitespace behind rows This fix removes the single whitespace character that would be printed behind the last border on a row.
diff --git a/app/models/changeset.rb b/app/models/changeset.rb index <HASH>..<HASH> 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -36,8 +36,9 @@ class Changeset < ActiveRecord::Base PROMOTED = 'promoted' PROMOTING = 'promoting' DELETING = 'deleting' + DELETED = 'deleted' FAILED = 'failed' - STATES = [NEW, REVIEW, PROMOTING, PROMOTED, FAILED, DELETING] + STATES = [NEW, REVIEW, PROMOTING, PROMOTED, FAILED, DELETING, DELETED] PROMOTION = 'promotion'
Adding a missing 'deleted' state to indicate succesfu completion of delete
diff --git a/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php b/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php index <HASH>..<HASH> 100644 --- a/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php +++ b/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php @@ -434,9 +434,9 @@ final class PhpStormStubsSourceStubber implements SourceStubber } /** - * @param Node\Stmt[] $stmts + * @param list<Node\Stmt> $stmts * - * @return Node\Stmt[] + * @return list<Node\Stmt> */ private function modifyStmtsByPhpVersion(array $stmts): array {
Improved array types in PhpStormStubsSourceStubber
diff --git a/javascript/CMSMain.EditForm.js b/javascript/CMSMain.EditForm.js index <HASH>..<HASH> 100644 --- a/javascript/CMSMain.EditForm.js +++ b/javascript/CMSMain.EditForm.js @@ -189,7 +189,15 @@ else if(this.attr('id') == 'CanCreateTopLevelType') dropdown = $('#CreateTopLevelGroups'); this.find('.optionset :input').bind('change', function(e) { - dropdown[e.target.value == 'OnlyTheseUsers' ? 'show' : 'hide'](); + var wrapper = $(this).closest('.middleColumn').parent('div'); + if(e.target.value == 'OnlyTheseUsers') { + wrapper.addClass('remove-splitter'); + dropdown['show'](); + } + else { + wrapper.removeClass('remove-splitter'); + dropdown['hide'](); + } }); // initial state
BUGFIX: #<I> Removed bottom border of the parent div wrapped around settings' options-sets when radio-buttons with a value of 'OnlyTheseUsers' is selected.
diff --git a/fetch.js b/fetch.js index <HASH>..<HASH> 100644 --- a/fetch.js +++ b/fetch.js @@ -82,7 +82,8 @@ } this.formData = function() { - return Promise.resolve(decode(this._body)) + var rejected = consumed(this) + return rejected ? rejected : Promise.resolve(decode(this._body)) } this.json = function() {
FormData should only able to consume once
diff --git a/lib/crass/parser.rb b/lib/crass/parser.rb index <HASH>..<HASH> 100644 --- a/lib/crass/parser.rb +++ b/lib/crass/parser.rb @@ -76,20 +76,32 @@ module Crass string = '' nodes.each do |node| + next if node.nil? + case node[:node] + when :at_rule + string << node[:tokens].first[:raw] + string << self.stringify(node[:prelude], options) + + if node[:block] + string << self.stringify(node[:block], options) + end + when :comment string << node[:raw] unless options[:exclude_comments] - when :style_rule - string << self.stringify(node[:selector][:tokens], options) - string << "{" - string << self.stringify(node[:children], options) - string << "}" - when :property - string << options[:indent] if options[:indent] string << self.stringify(node[:tokens], options) + when :simple_block + string << node[:start] + string << self.stringify(node[:value], options) + string << node[:end] + + when :style_rule + string << self.stringify(node[:selector][:tokens], options) + string << "{#{self.stringify(node[:children], options)}}" + else if node.key?(:raw) string << node[:raw]
Improve serialization of simple blocks and at-rules. You can now alter the value of a simple block and have those changes reflected in the serialized CSS (previously simple blocks were serialized directly from their original tokens).
diff --git a/lib/assertions.js b/lib/assertions.js index <HASH>..<HASH> 100644 --- a/lib/assertions.js +++ b/lib/assertions.js @@ -238,7 +238,7 @@ module.exports = function (expect) { if (this.flags.only) { expect(hasKeys, 'to be truthy'); - expect(Object.keys(subject).length === keys.length, '[not] to be truthy'); + expect(expect.findTypeOf(subject).getKeys(subject).length === keys.length, '[not] to be truthy'); } else { expect(hasKeys, '[not] to be truthy'); } diff --git a/test/unexpected.spec.js b/test/unexpected.spec.js index <HASH>..<HASH> 100644 --- a/test/unexpected.spec.js +++ b/test/unexpected.spec.js @@ -1210,6 +1210,12 @@ describe('unexpected', function () { }); }); + describe('to have keys assertion', function () { + it('should work with non-enumerable keys returned by the getKeys function of the subject type', function () { + expect(new Error('foo'), 'to only have key', 'message'); + }); + }); + describe('properties assertion', function () { it('asserts presence of a list of properties', function () { expect({a: 'foo', b: 'bar'}, 'to have properties', ['a', 'b']);
to have only key(s): Use type.getKeys instead of Object.keys.
diff --git a/src/Requests/Application/Scan/Issue/CommentRequests.php b/src/Requests/Application/Scan/Issue/CommentRequests.php index <HASH>..<HASH> 100644 --- a/src/Requests/Application/Scan/Issue/CommentRequests.php +++ b/src/Requests/Application/Scan/Issue/CommentRequests.php @@ -34,12 +34,9 @@ class CommentRequests extends BaseRequest * @param array $queryParams * @return Response */ - public function getAll($appId = null, $scanId = null, $issueId = null, array $queryParams = []) + public function getAll($appId, $scanId, $issueId, array $queryParams = []) { - $uri = is_null($appId) - ? "/applications/scans/issues/comments/all" - : $this->uri($appId, $scanId, $issueId); - $response = $this->client->get($uri, [ + $response = $this->client->get($this->uri($appId, $scanId, $issueId), [ 'query' => $queryParams, ]);
Remove end point to read out all comments
diff --git a/src/DailymilePHP/Client.php b/src/DailymilePHP/Client.php index <HASH>..<HASH> 100644 --- a/src/DailymilePHP/Client.php +++ b/src/DailymilePHP/Client.php @@ -26,7 +26,7 @@ class Client { } return $getAll - ? $this->getPagedEntries() + ? $this->getPagedEntries($parameters) : $this->normaliseAndFetch($parameters, 'entries')['entries']; } @@ -90,14 +90,14 @@ class Client { return is_array($param) ? $param[$key] : $param; } - private function getPagedEntries($username, $params) + private function getPagedEntries($params) { $results = []; $page = 1; do { - $parameters['page'] = strval($page++); - $fetched = $this->normaliseAndFetch($parameters, 'entries')['entries']; + $params['page'] = strval($page++); + $fetched = $this->normaliseAndFetch($params, 'entries')['entries']; $results = array_merge($results, $fetched); } while (count($fetched));
remember to run tests after refactoring. oops.
diff --git a/tests/test_pipeline/test_network.py b/tests/test_pipeline/test_network.py index <HASH>..<HASH> 100644 --- a/tests/test_pipeline/test_network.py +++ b/tests/test_pipeline/test_network.py @@ -14,7 +14,8 @@ def test_http_client(): instance = Session.return_value http_client = HTTPClientProperty(session_class=Session, a=1) assert http_client.provide_value(dinergate) is instance - Session.assert_called_once_with(a=1) + Session.assert_called_once_with() + assert instance.a == 1 def test_url_query():
fix up the broken unittest for last commit.
diff --git a/support/cas-server-support-token-tickets/src/main/java/org/apereo/cas/token/authentication/principal/TokenWebApplicationServiceResponseBuilder.java b/support/cas-server-support-token-tickets/src/main/java/org/apereo/cas/token/authentication/principal/TokenWebApplicationServiceResponseBuilder.java index <HASH>..<HASH> 100644 --- a/support/cas-server-support-token-tickets/src/main/java/org/apereo/cas/token/authentication/principal/TokenWebApplicationServiceResponseBuilder.java +++ b/support/cas-server-support-token-tickets/src/main/java/org/apereo/cas/token/authentication/principal/TokenWebApplicationServiceResponseBuilder.java @@ -34,7 +34,7 @@ public class TokenWebApplicationServiceResponseBuilder extends WebApplicationSer final Map<String, String> parameters) { final RegisteredService registeredService = this.servicesManager.findServiceBy(service); RegisteredServiceAccessStrategyUtils.ensureServiceAccessIsAllowed(service, registeredService); - final boolean tokenAsResponse = RegisteredServiceProperty.RegisteredServiceProperties.TOKEN_AS_RESPONSE.isAssignedTo(registeredService); + final boolean tokenAsResponse = RegisteredServiceProperty.RegisteredServiceProperties.TOKEN_AS_SERVICE_TICKET.isAssignedTo(registeredService); if (!tokenAsResponse) { return super.buildInternal(service, parameters);
TOKEN_AS_RESPONSE is deprecated, TOKEN_AS_SERVICE_TICKET is to be used instead (#<I>)
diff --git a/lib/couch.php b/lib/couch.php index <HASH>..<HASH> 100644 --- a/lib/couch.php +++ b/lib/couch.php @@ -173,7 +173,7 @@ class couch { $this->_disconnect(); //log_message('debug',"COUCH : Executed query $method $url"); - + //log_message('debug',"COUCH : ".$raw_response); return $raw_response; } diff --git a/lib/couchClient.php b/lib/couchClient.php index <HASH>..<HASH> 100644 --- a/lib/couchClient.php +++ b/lib/couchClient.php @@ -605,7 +605,7 @@ class couchException extends Exception { * @param string $raw_response HTTP response from the CouchDB server */ function __construct($raw_response) { - $this->couch_response = couch::parse_raw_response($raw_response); + $this->couch_response = couch::parseRawResponse($raw_response); parent::__construct($this->couch_response['status_message'], $this->couch_response['status_code']); }
another bugfix related to mass renaming, in excpetion class
diff --git a/lib/views.js b/lib/views.js index <HASH>..<HASH> 100644 --- a/lib/views.js +++ b/lib/views.js @@ -110,6 +110,7 @@ Views.prototype.setView = function(key, value) { var name = this.options.inflection; if (name) this.emit(name, view, this); + view.isType = this.isType.bind(this); this.views[view.key] = view; return view;
expose `isType` on view
diff --git a/lib/websearch_external_collections.py b/lib/websearch_external_collections.py index <HASH>..<HASH> 100644 --- a/lib/websearch_external_collections.py +++ b/lib/websearch_external_collections.py @@ -331,7 +331,7 @@ def calculate_hosted_collections_results(req, pattern_list, field, hosted_collec if not hosted_collections: return (None, None) vprint = get_verbose_print(req, 'Hosted collections: ', verbosity_level) - vprint(3, 'pattern_list = %s, field = %s' % (cgi.escape(pattern_list), cgi.escape(field))) + vprint(3, 'pattern_list = %s, field = %s' % (cgi.escape(repr(pattern_list)), cgi.escape(field))) # firstly we calculate the search parameters, i.e. the actual hosted search engines and the basic search units (hosted_search_engines, basic_search_units) = \
WebSearch: external search pattern_list escape fix * Fixes problem with escaping of pattern_list in external searching that slipped in c<I>ce6cee2d3dcf1eef<I>f<I>e<I>a7c8f.
diff --git a/benchmarks/memory/test_curves.py b/benchmarks/memory/test_curves.py index <HASH>..<HASH> 100644 --- a/benchmarks/memory/test_curves.py +++ b/benchmarks/memory/test_curves.py @@ -29,7 +29,10 @@ SUCCESS_TEMPLATE = 'Memory usage: {:g}KB.' def get_bounds(): # NOTE: These bounds assume **just** the interpeter is running this code. # When using a test runner like `py.test`, usage goes up by 4-8 KB. - return 28, 32 + if os.getenv('CIRCLECI') == 'true': + return 28, 33 + else: + return 28, 32 def intersect_all(): diff --git a/benchmarks/time/test_curves.py b/benchmarks/time/test_curves.py index <HASH>..<HASH> 100644 --- a/benchmarks/time/test_curves.py +++ b/benchmarks/time/test_curves.py @@ -22,7 +22,7 @@ FAILURES = (11, 20, 24, 42) def get_bounds(): if os.getenv('CIRCLECI') == 'true': - return 42.0 / 1024.0, 52.0 / 1024.0 + return 42.0 / 1024.0, 70.0 / 1024.0 else: return 35.0 / 1024.0, 42.0 / 1024.0
Loosening bounds on benchmarks on CircleCI. These are "supported" by builds #<I> through #<I> (e.g. <URL>
diff --git a/src/App/Component/Module/Manager.php b/src/App/Component/Module/Manager.php index <HASH>..<HASH> 100644 --- a/src/App/Component/Module/Manager.php +++ b/src/App/Component/Module/Manager.php @@ -245,9 +245,7 @@ class Manager if (in_array($setupClass, $completedExecutions)) { continue; } - if (class_exists($setupClass)) { - $this->objectManager->get($setupClass)->execute(); - } + $this->objectManager->get($setupClass)->execute(); $completedSetupClasses[] = ['class' => $setupClass]; } } @@ -338,7 +336,7 @@ class Manager } /** - * @param string $routeName + * @param string $routeName * @param string|null $areaCode * @return \CrazyCat\Framework\App\Component\Module|null */
# throw exception when setup field of module is invalid
diff --git a/gitenberg/__init__.py b/gitenberg/__init__.py index <HASH>..<HASH> 100644 --- a/gitenberg/__init__.py +++ b/gitenberg/__init__.py @@ -11,6 +11,6 @@ from .workflow import upload_all_books, upload_list, upload_book __title__ = 'gitberg' __appname__ = 'gitberg' -__version__ = '0.1.0' +__version__ = '0.2.0' __copyright__ = 'Copyright 2012-2016 Seth Woodworth and the Free Ebook Foundation'
it seems <I> has been previously used
diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index <HASH>..<HASH> 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -294,6 +294,24 @@ records = "*" c = p.pipenv('run python -c "import tablib"') assert c.return_code == 0 + @pytest.mark.cli + @pytest.mark.install + def test_install_without_dev_section(self, pypi): + with PipenvInstance(pypi=pypi) as p: + with open(p.pipfile_path, 'w') as f: + contents = """ +[packages] +tablib = "*" + """.strip() + f.write(contents) + c = p.pipenv('install') + assert c.return_code == 0 + assert 'tablib' in p.pipfile['packages'] + assert p.pipfile.get('dev-packages', {}) == {} + assert 'tablib' in p.lockfile['default'] + assert p.lockfile['develop'] == {} + c = p.pipenv('run python -c "import tablib"') + assert c.return_code == 0 @pytest.mark.run @pytest.mark.uninstall
Add test to go through the editable check code path This would have failed without the previous commit.
diff --git a/type/Left.js b/type/Left.js index <HASH>..<HASH> 100644 --- a/type/Left.js +++ b/type/Left.js @@ -17,11 +17,11 @@ const Left = value => Object.create( ) function map() { - return Left(this.value) + return this } function flatMap() { - return Left(this.value) + return this } function leftMap(func) { @@ -35,7 +35,7 @@ function leftFlatMap(func) { } function ap() { - return Left(this.value) + return this } const prototype = { diff --git a/type/Right.js b/type/Right.js index <HASH>..<HASH> 100644 --- a/type/Right.js +++ b/type/Right.js @@ -27,11 +27,11 @@ function flatMap(func) { } function leftMap() { - return Right(this.value) + return this } function leftFlatMap() { - return Right(this.value) + return this } function ap(right) {
Simplify some of the Left and Right methods <URL>
diff --git a/raiden/network/transport/matrix/transport.py b/raiden/network/transport/matrix/transport.py index <HASH>..<HASH> 100644 --- a/raiden/network/transport/matrix/transport.py +++ b/raiden/network/transport/matrix/transport.py @@ -605,7 +605,12 @@ class MatrixTransport(Runnable): It also whitelists the address to answer invites and listen for messages. """ - if self._address_mgr.is_address_known(node_address): + is_health_information_available = ( + self._address_mgr.get_address_reachability(node_address) + is not AddressReachability.UNKNOWN + ) + + if is_health_information_available: self.log.debug( "Healthcheck already enabled", peer_address=to_checksum_address(node_address) )
bugfix: healthcheck and whitelist is not the same thing An address that is whitelist does not necessarily have the healthcheck running, this means that checking if the address is available in the address manager is not sufficient, one also has to check the current value for the availability information. If the node state is anything but UNKNWON we know the presence information was used at least once (it does not, however, mean the presence information is up-to-date).
diff --git a/src/main/java/water/parser/ParseDataset.java b/src/main/java/water/parser/ParseDataset.java index <HASH>..<HASH> 100644 --- a/src/main/java/water/parser/ParseDataset.java +++ b/src/main/java/water/parser/ParseDataset.java @@ -250,7 +250,6 @@ public final class ParseDataset extends Job { try { switch(_comp){ case ZIP: - ZipInputStream zis = new ZipInputStream(v.openStream(new UnzipProgressMonitor(_job._progress))); ZipEntry ze = zis.getNextEntry(); // There is at least one entry in zip file and it is not a directory. @@ -306,6 +305,7 @@ public final class ParseDataset extends Job { numRows += _p1._nrows[i]; _fileInfo[_idx]._nrows[i] = numRows; } + quietlyComplete(); // wake up anyone who is joining on this task! } }
Bugfix in reducing parallelism during unzip and parse. I used to call get on a guy who has a completer set and fj by default does not call complete (which sets the status and wakes up all waiting for this guy) so I added it into onCompletion call.
diff --git a/documenteer/stackdocs/stackcli.py b/documenteer/stackdocs/stackcli.py index <HASH>..<HASH> 100644 --- a/documenteer/stackdocs/stackcli.py +++ b/documenteer/stackdocs/stackcli.py @@ -4,8 +4,11 @@ __all__ = ('main',) import logging +import sys import click +from .build import build_stack_docs + # Add -h as a help shortcut option CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @@ -58,3 +61,13 @@ def help(ctx, topic, **kw): click.echo(ctx.parent.get_help()) else: click.echo(main.commands[topic].get_help(ctx)) + + +@main.command() +@click.pass_context +def build(ctx): + """Build documentation as HTML. + """ + return_code = build_stack_docs(ctx.obj['root_project_dir']) + if return_code > 0: + sys.exit(return_code)
Add stack-docs build command Uses the existing build pipeline from build-stack-docs (the earlier argparse-based CLI).
diff --git a/tests/tests.js b/tests/tests.js index <HASH>..<HASH> 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -58,6 +58,7 @@ exports.defineAutoTests = function () { var isBrowser = cordova.platformId === "browser"; var isIE = isBrowser && navigator.userAgent.indexOf("Trident") >= 0; var isIos = cordova.platformId === "ios"; + var isIot = cordova.platformId === "android" && navigator.userAgent.indexOf("iot") >= 0; // tests describe("FileTransferError", function () { @@ -1078,7 +1079,7 @@ exports.defineAutoTests = function () { // windows store and ios are too fast, win is called before we have a chance to abort // so let's get them busy - while not providing an extra load to the slow Android emulators - var arrayLength = ((isWindows && !isWindowsPhone81) || isIos) ? 3000000 : 200000; + var arrayLength = ((isWindows && !isWindowsPhone81) || isIos) ? 3000000 : isIot ? 150000 : 200000; writeFile(specContext.root, specContext.fileName, new Array(arrayLength).join("aborttest!"), fileWin, done); }, UPLOAD_TIMEOUT);
Don't crash on low memory devices It will be OOM when running file-transfer tests on baseline Android Memory class which is <I>M (It happens to be the java heap limit of those devices). This closes #<I>
diff --git a/plugin/pkg/scheduler/factory/factory.go b/plugin/pkg/scheduler/factory/factory.go index <HASH>..<HASH> 100644 --- a/plugin/pkg/scheduler/factory/factory.go +++ b/plugin/pkg/scheduler/factory/factory.go @@ -345,7 +345,7 @@ func (f *ConfigFactory) CreateFromConfig(policy schedulerapi.Policy) (*scheduler // Creates a scheduler from a set of registered fit predicate keys and priority keys. func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys sets.String, extenders []algorithm.SchedulerExtender) (*scheduler.Config, error) { - glog.V(2).Infof("creating scheduler with fit predicates '%v' and priority functions '%v", predicateKeys, priorityKeys) + glog.V(2).Infof("Creating scheduler with fit predicates '%v' and priority functions '%v", predicateKeys, priorityKeys) if f.HardPodAffinitySymmetricWeight < 0 || f.HardPodAffinitySymmetricWeight > 100 { return nil, fmt.Errorf("invalid hardPodAffinitySymmetricWeight: %d, must be in the range 0-100", f.HardPodAffinitySymmetricWeight)
Corrected a typo in scheduler factory.go.
diff --git a/src/Statement/Update.php b/src/Statement/Update.php index <HASH>..<HASH> 100644 --- a/src/Statement/Update.php +++ b/src/Statement/Update.php @@ -48,7 +48,7 @@ class Update extends AdvancedStatement */ public function set(array $pairs) { - $this->pairs = $pairs; + $this->pairs = array_merge($this->pairs, $pairs); return $this; }
Make Update::set append values, not replace. Resolves issue #<I>
diff --git a/lib/simpler_tiles/map.rb b/lib/simpler_tiles/map.rb index <HASH>..<HASH> 100644 --- a/lib/simpler_tiles/map.rb +++ b/lib/simpler_tiles/map.rb @@ -17,7 +17,7 @@ module SimplerTiles # A convienence method to use Active Record configuration and add a new # layer. - def ar_layer + def ar_layer(&blk) if !defined?(ActiveRecord) raise "ActiveRecord not available" end @@ -31,7 +31,9 @@ module SimplerTiles :password => config[:password] } - layer "PG:" + params.reject {|k,v| v.nil? }.map {|k,v| "#{k}='#{v}'"}.join(' ') + conn = "PG:" + params.reject {|k,v| v.nil? }.map {|k,v| "#{k}=#{v}"}.join(' ') + + layer(conn) {|l| blk.call(l) } end # Render the data to a blob of png data.
ar_layer yeilds now
diff --git a/yaks/lib/yaks/attributes.rb b/yaks/lib/yaks/attributes.rb index <HASH>..<HASH> 100644 --- a/yaks/lib/yaks/attributes.rb +++ b/yaks/lib/yaks/attributes.rb @@ -24,12 +24,6 @@ module Yaks alias with update - this.names.each do |attr| - define_method "with_#{attr}" do |value| - with(attr => value) - end - end - define_singleton_method(:attributes) { this } end end diff --git a/yaks/spec/unit/yaks/attributes_spec.rb b/yaks/spec/unit/yaks/attributes_spec.rb index <HASH>..<HASH> 100644 --- a/yaks/spec/unit/yaks/attributes_spec.rb +++ b/yaks/spec/unit/yaks/attributes_spec.rb @@ -168,7 +168,7 @@ WidgetContainer.new( describe '#initialize' do it 'should take hash-based args' do - expect(widget_container.new(widgets: [:bar])).to eql widget_container.new.with_widgets([:bar]) + expect(widget_container.new(widgets: [:bar])).to eql widget_container.new.with(widgets: [:bar]) end it 'should use defaults when available' do
Drop the automatic generation of with_* methods Including Attributes.new(:foo) would generate a #with_foo method. This behavior was not used, and can be written just as concisely as with(foo: ..), so it was dropped.