diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/sap.ui.integration/src/sap/ui/integration/widgets/Card.js b/src/sap.ui.integration/src/sap/ui/integration/widgets/Card.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.integration/src/sap/ui/integration/widgets/Card.js +++ b/src/sap.ui.integration/src/sap/ui/integration/widgets/Card.js @@ -1070,6 +1070,7 @@ sap.ui.define([ /** * Resolves the destination and returns its URL. + * @public * @param {string} sKey The destination's key used in the configuration. * @returns {Promise} A promise which resolves with the URL of the destination. */
[INTERNAL] Integration Cards: Fix documentation for resolveDestination The method resolveDestination is public and is included in the card facade, but the @public tag was missing. Change-Id: I9faef<I>e8be4b<I>f<I>a6c<I>b<I>d<I>a<I>a
diff --git a/neurom/analysis/morphtree.py b/neurom/analysis/morphtree.py index <HASH>..<HASH> 100644 --- a/neurom/analysis/morphtree.py +++ b/neurom/analysis/morphtree.py @@ -87,8 +87,6 @@ def find_tree_type(tree): tree.type = tree_types[int(np.median(types))] - return tree - def get_tree_type(tree): @@ -99,7 +97,7 @@ def get_tree_type(tree): """ if not hasattr(tree, 'type'): - tree = find_tree_type(tree) + find_tree_type(tree) return tree.type diff --git a/neurom/analysis/tests/test_morphtree.py b/neurom/analysis/tests/test_morphtree.py index <HASH>..<HASH> 100644 --- a/neurom/analysis/tests/test_morphtree.py +++ b/neurom/analysis/tests/test_morphtree.py @@ -126,7 +126,7 @@ def test_get_tree_type(): del test_tree.type # tree.type should be computed here. nt.ok_(get_tree_type(test_tree) == tree_types[en_tree]) - test_tree = find_tree_type(test_tree) + find_tree_type(test_tree) # tree.type should already exists here, from previous action. nt.ok_(get_tree_type(test_tree) == tree_types[en_tree])
Minor change in morphtree find_tree_type to make consistent with make_tree. Change-Id: I9d0f<I>d3b4a0eebac7c8dbb<I>e<I>e<I>a<I>ada
diff --git a/seed_control_interface/settings.py b/seed_control_interface/settings.py index <HASH>..<HASH> 100644 --- a/seed_control_interface/settings.py +++ b/seed_control_interface/settings.py @@ -170,4 +170,4 @@ EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER', '') EMAIL_PORT = int(os.environ.get('EMAIL_PORT', '25')) EMAIL_SUBJECT_PREFIX = os.environ.get('EMAIL_SUBJECT_PREFIX', '[Django]') -MESSAGES_PER_IDENTITY = 100 +MESSAGES_PER_IDENTITY = 30
Reduce the number of messages displayed on the identity page
diff --git a/src/common.js b/src/common.js index <HASH>..<HASH> 100644 --- a/src/common.js +++ b/src/common.js @@ -31,8 +31,8 @@ function normalizeShortSig (root, transform = identity) { return types; } -function normalizeLongSig (submit, success, failure) { - const submitCreator = typeof submit === 'string' ? creatorFactory(submit, identity) : submit; +function normalizeLongSig (submit, success, failure, transform = identity) { + const submitCreator = typeof submit === 'string' ? creatorFactory(submit, transform) : submit; return [submitCreator, success, failure]; }
Allows a transform function to be passed to onSubmitActions on the Long Signature form I don't think it breaks any existing code, since it defaults to "identity", but let me know if there are any problems, or you don't agree with this.
diff --git a/examples/glyphs/trail.py b/examples/glyphs/trail.py index <HASH>..<HASH> 100644 --- a/examples/glyphs/trail.py +++ b/examples/glyphs/trail.py @@ -44,8 +44,8 @@ def distance(p1, p2): def prep_data(dataset): df = dataset.copy() - latlon = zip(df.lat, df.lon) - dist = np.array([0] + [ distance(latlon[i+1], latlon[i]) for i, _ in enumerate(latlon[:-1]) ]) + latlon = list(zip(df.lat, df.lon)) + dist = np.array([0] + [ distance(latlon[i+1], latlon[i]) for i in range(len((latlon[:-1]))) ]) df["dist"] = np.cumsum(dist)
Fix py3 compatibility in glyphs/trail
diff --git a/test/backend-receiver.test.js b/test/backend-receiver.test.js index <HASH>..<HASH> 100644 --- a/test/backend-receiver.test.js +++ b/test/backend-receiver.test.js @@ -29,7 +29,7 @@ function sendPacketTo(packet, port) { return clientSocket; }) .next(function(clientSocket) { - clientSocket.close(); + clientSocket.destroy(); }); }
Call Socket#destory instaead of undefined destructor Socket#close
diff --git a/src/IteratorPipeline/Pipeline.php b/src/IteratorPipeline/Pipeline.php index <HASH>..<HASH> 100644 --- a/src/IteratorPipeline/Pipeline.php +++ b/src/IteratorPipeline/Pipeline.php @@ -98,7 +98,7 @@ class Pipeline implements \IteratorAggregate */ final public static function with(iterable $iterable): self { - return new static($iterable); + return $iterable instanceof static ? $iterable : new static($iterable); } /** diff --git a/tests/IteratorPipeline/PipelineTest.php b/tests/IteratorPipeline/PipelineTest.php index <HASH>..<HASH> 100644 --- a/tests/IteratorPipeline/PipelineTest.php +++ b/tests/IteratorPipeline/PipelineTest.php @@ -119,6 +119,15 @@ class PipelineTest extends TestCase $this->assertAttributeSame($values, 'iterable', $pipeline); } + public function testWithSelf() + { + $input = new Pipeline([]); + $pipeline = Pipeline::with($input); + + $this->assertInstanceOf(Pipeline::class, $pipeline); + $this->assertSame($input, $pipeline); + } + public function testBuild() { $builder = Pipeline::build();
Passing a Pipeline to `with` returns the input (nop).
diff --git a/src/Lister.php b/src/Lister.php index <HASH>..<HASH> 100644 --- a/src/Lister.php +++ b/src/Lister.php @@ -11,6 +11,9 @@ class Lister extends View public function renderView() { + if (!$this->template) { + throw new Exception(['Lister requires you to specify template explicitly']); + } $this->t_row = $this->template->cloneRegion('row'); //$this->t_totals = isset($this->template['totals']) ? $this->template->cloneRegion('totals') : null;
Add a check in Lister to make sure it has workable template
diff --git a/lib/commands/validate_schema.rb b/lib/commands/validate_schema.rb index <HASH>..<HASH> 100644 --- a/lib/commands/validate_schema.rb +++ b/lib/commands/validate_schema.rb @@ -80,7 +80,13 @@ module Commands # Builds a JSON Reference + message like "/path/to/file#/path/to/data". def map_schema_errors(file, errors) - errors.map { |e| "#{file}#{e.schema.pointer}: #{e.message}" } + errors.map { |e| + if e.is_a?(JsonSchema::ValidationError) + "#{file}#{e.pointer}: failed #{e.schema.pointer}: #{e.message}" + else + "#{file}#{e.schema.pointer}: #{e.message}" + end + } end def parse(file)
Better validation errors that include two JSON Pointers (data + schema)
diff --git a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php +++ b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php @@ -19,7 +19,7 @@ namespace Symfony\Component\Security\Core\Role; class RoleHierarchy implements RoleHierarchyInterface { private $hierarchy; - private $map; + protected $map; /** * Constructor. @@ -56,7 +56,7 @@ class RoleHierarchy implements RoleHierarchyInterface return $reachableRoles; } - private function buildRoleMap() + protected function buildRoleMap() { $this->map = array(); foreach ($this->hierarchy as $main => $roles) {
Change of scope When overriding the Symfony RoleHierarchy it would be great to be able to get access to the buildRoleMap-method and map-variable for more advanced usage.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup(name='fantasy_football_auction', packages=['fantasy_football_auction'], - version='0.9.1', + version='0.9.2', description='Python library simulating a fantasy football auction. Intended to be used for AI, but you should be ' 'able to use this for other purposes as well. This task assumes that each draftable player has a ' 'specific value (for example, looking at the ratings from FantasyPros).',
fix bug where str didn't work right for auction
diff --git a/lib/utils.js b/lib/utils.js index <HASH>..<HASH> 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -3,6 +3,11 @@ var path = require('path'); function getAssetsFileOptions(folder, compilation) { var fileOptions = []; compilation.chunks.forEach(function(chunk) { + //re-upload only changed files + if(!chunk.rendered) { + return; + } + chunk.files.forEach(function(filePath) { fileOptions.push({ folder: path.join(folder, path.dirname(filePath)),
Added performance improvements for multiple chunks.
diff --git a/grunt/config/shell.js b/grunt/config/shell.js index <HASH>..<HASH> 100644 --- a/grunt/config/shell.js +++ b/grunt/config/shell.js @@ -11,6 +11,7 @@ module.exports = function (grunt) { } return { + // See [How to release a new version: Prerequisites](https://github.com/ExactTarget/fuelux/wiki/How-to-release-a-new-version#prerequisites-1) for information on generating release notes. // Install with: gem install github_changelog_generator // 'github_changelog_generator --no-author --between-tags 3.11.4,3.11.5 --compare-link -t ' notes: {
Adds link to wiki about release notes step and the required Ruby Gem installaiton.
diff --git a/src/python/tmclient/cli.py b/src/python/tmclient/cli.py index <HASH>..<HASH> 100644 --- a/src/python/tmclient/cli.py +++ b/src/python/tmclient/cli.py @@ -602,7 +602,8 @@ microscope_file_upload_parser.add_argument( ) ) microscope_file_upload_parser.add_argument( - '--retries', type=int, metavar='NUM', default=5, + '--retries', action='store', dest='retry', + type=int, metavar='NUM', default=5, help=('Retry failed uploads up to NUM times.' ' If this option is omitted, `tm_client`' ' will retry failed uploads up to %(default)s times.'),
Fix "TypeError: unsupported operands for `+=`"
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -232,7 +232,7 @@ abstract class Kernel implements KernelInterface public function getBundle($name, $first = true) { if (!isset($this->bundleMap[$name])) { - throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your %s.php file?', $name, get_class($this))); + throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, get_class($this))); } if (true === $first) {
=Minor chnage: replaced function by method
diff --git a/tests/e2e/pkg/tester/tester.go b/tests/e2e/pkg/tester/tester.go index <HASH>..<HASH> 100644 --- a/tests/e2e/pkg/tester/tester.go +++ b/tests/e2e/pkg/tester/tester.go @@ -68,7 +68,7 @@ func (t *Tester) addHostArgument() error { return fmt.Errorf("kubeconfig did not contain server") } - klog.Info("Adding --host=%s", server) + klog.Infof("Adding --host=%s", server) t.TestArgs += " --host=" + server return nil } @@ -98,7 +98,7 @@ func (t *Tester) execute() error { return err } - return t.Execute() + return t.Test() } func NewDefaultTester() *Tester {
kubetest2: Call Test, not Execute Execute will reparse the flags; we want to reuse the test execution but not the flag setup.
diff --git a/src/Service/Api.php b/src/Service/Api.php index <HASH>..<HASH> 100644 --- a/src/Service/Api.php +++ b/src/Service/Api.php @@ -44,6 +44,9 @@ class Api /** @var Environment[] */ protected static $environmentsCache = []; + /** @var bool */ + protected static $environmentsCacheRefreshed = false; + /** @var array */ protected static $notFound = []; @@ -316,6 +319,7 @@ class Api } $this->cache->save($cacheKey, $toCache, $this->config->get('api.environments_ttl')); + self::$environmentsCacheRefreshed = true; } else { $environments = []; $endpoint = $project->getUri(); @@ -350,9 +354,20 @@ class Api } $environments = $this->getEnvironments($project, $refresh); + + // Retry if the environment was not found in the cache. + if (!isset($environments[$id]) + && $refresh === null + && !self::$environmentsCacheRefreshed) { + $environments = $this->getEnvironments($project, true); + } + + // Look for the environment by ID. if (isset($environments[$id])) { return $environments[$id]; } + + // Look for the environment by machine name. if ($tryMachineName) { foreach ($environments as $environment) { if ($environment->machine_name === $id) {
Ensure a fresh cache in getEnvironment() before determining nonexistence of an environment
diff --git a/src/PhpFileConfiguration.php b/src/PhpFileConfiguration.php index <HASH>..<HASH> 100644 --- a/src/PhpFileConfiguration.php +++ b/src/PhpFileConfiguration.php @@ -73,7 +73,7 @@ final class PhpFileConfiguration implements ConfigurationInterface // ensure the file returns an array. if (! is_array($contents)) { throw new \UnexpectedValueException( - vsprintf('PHP configuration file must return an array, %s returned (see %s)', [ + vsprintf('PHP configuration file must return an array, %s returned (%s)', [ gettype($contents), realpath($this->path), ]) @@ -94,7 +94,7 @@ final class PhpFileConfiguration implements ConfigurationInterface if (! $result->isValid()) { throw new \UnexpectedValueException( - vsprintf('%s (see %s)', [ + vsprintf('%s (%s)', [ $result->message()->source('configuration array'), realpath($this->path), ])
wording in exception message of php file configuration
diff --git a/lib/lanes/logger.rb b/lib/lanes/logger.rb index <HASH>..<HASH> 100644 --- a/lib/lanes/logger.rb +++ b/lib/lanes/logger.rb @@ -26,22 +26,7 @@ module Lanes class << self def logger - @logger ||= ( - if defined?(::Rails) - Rails.logger - else - if Lanes.env.production? - dest = if FileTest.writable?("log/production.log") - "log/production.log" - else - STDOUT - end - ::Logger.new(dest) - else - ::Logger.new MultiDestinationLogger.new - end - end - ) + @logger ||= _create_logger end def logger=( logger ) @@ -64,10 +49,35 @@ module Lanes logger.debug '⚡ '*40 end + private + + def _create_logger + if defined?(::Rails) + Rails.logger + else + if Lanes.env.production? + dest = if FileTest.writable?("log/production.log") + "log/production.log" + else + STDOUT + end + logger = ::Logger.new(dest) + logger.level = ::Logger::WARN + logger + else + logger = ::Logger.new MultiDestinationLogger.new + logger.level = ::Logger::DEBUG + logger + end + end + end + + end Lanes.config.get(:environment) do | env | self.logger=nil # it'll be re-opened on next write end + end
set level on logger when creating it
diff --git a/test/prey_conf_spec.js b/test/prey_conf_spec.js index <HASH>..<HASH> 100644 --- a/test/prey_conf_spec.js +++ b/test/prey_conf_spec.js @@ -31,9 +31,9 @@ describe('prey_conf_spec', function(){ endpoints.should.be.equal('control-panel'); }); - it('host should be set to control.preyproject.com', function(){ + it('host should be set to solid.preyproject.com', function(){ var host = get_value('host'); - host.should.be.equal('control.preyproject.com'); + host.should.be.equal('solid.preyproject.com'); }); it('protocol should be set to https', function(){
Fix the test relative to `solid`
diff --git a/packages/idyll-docs/components/top-nav.js b/packages/idyll-docs/components/top-nav.js index <HASH>..<HASH> 100644 --- a/packages/idyll-docs/components/top-nav.js +++ b/packages/idyll-docs/components/top-nav.js @@ -138,15 +138,16 @@ export default ({ selected }) => { } .expanded { height: auto; - padding-bottom: 10px; } .link { - padding-top: 15px; + margin-top: 15px; + margin-bottom: 10px; } .logo-container { font-size: 24px; margin: 0; + width: 50px; } .nav-logo { // top: 1px;
minor css update to docs
diff --git a/src/Event/IndexViewListener.php b/src/Event/IndexViewListener.php index <HASH>..<HASH> 100644 --- a/src/Event/IndexViewListener.php +++ b/src/Event/IndexViewListener.php @@ -1,12 +1,12 @@ <?php namespace CsvMigrations\Event; -use App\View\AppView; use Cake\Event\Event; use Cake\Event\EventManager; use Cake\Network\Request; use Cake\ORM\Query; use Cake\ORM\ResultSet; +use Cake\View\View; use CsvMigrations\ConfigurationTrait; use CsvMigrations\Event\BaseViewListener; @@ -212,7 +212,7 @@ class IndexViewListener extends BaseViewListener return; } - $appView = new AppView(); + $appView = new View(); $plugin = $event->subject()->request->plugin; $controller = $event->subject()->request->controller; $displayField = $event->subject()->{$event->subject()->name}->displayField();
Use cake View instance to remove app coupling (task #<I>)
diff --git a/src/bosh-softlayer-cpi/action/create_vm.go b/src/bosh-softlayer-cpi/action/create_vm.go index <HASH>..<HASH> 100644 --- a/src/bosh-softlayer-cpi/action/create_vm.go +++ b/src/bosh-softlayer-cpi/action/create_vm.go @@ -318,6 +318,10 @@ func (cv CreateVM) getNetworkComponents(networks Networks) (*datatypes.Virtual_G } } + if privateNetworkComponent == nil { + return publicNetworkComponent, privateNetworkComponent, bosherr.Error("A private network is required. Please check vlanIds") + } + return publicNetworkComponent, privateNetworkComponent, nil }
Inspect privateNetworkComponent existing.
diff --git a/i3pystatus/weather/wunderground.py b/i3pystatus/weather/wunderground.py index <HASH>..<HASH> 100644 --- a/i3pystatus/weather/wunderground.py +++ b/i3pystatus/weather/wunderground.py @@ -68,7 +68,7 @@ class Wunderground(WeatherBackend): colorize=True, hints={'markup': 'pango'}, backend=wunderground.Wunderground( - api_key='dbafe887d56ba4ad', + api_key='api_key_goes_here', location_code='pws:MAT645', units='imperial', forecast=True,
I'm an idiot and put my API key in the Weather Underground example (#<I>) Just got a usage alert when my laptop wasn't even on. n<I>b mistake! I've disabled the API key, and this removes it from the example in the documentation.
diff --git a/lib/components/viewers/stop-schedule-table.js b/lib/components/viewers/stop-schedule-table.js index <HASH>..<HASH> 100644 --- a/lib/components/viewers/stop-schedule-table.js +++ b/lib/components/viewers/stop-schedule-table.js @@ -6,6 +6,7 @@ import styled from 'styled-components' import { isBlank } from '../../util/ui' import { excludeLastStop, + getRouteIdForPattern, getSecondsUntilDeparture, getStopTimesByPattern, stopTimeComparator @@ -75,6 +76,16 @@ class StopScheduleTable extends Component { // Merge stop times, so that we can sort them across all route patterns. let mergedStopTimes = [] Object.values(stopTimesByPattern).forEach(({ pattern, route, times }) => { + // TODO: refactor the IF block below (copied fromn StopViewer). + // Only add pattern if route is found. + // FIXME: there is currently a bug with the alernative transit index + // where routes are not associated with the stop if the only stoptimes + // for the stop are drop off only. See https://github.com/ibi-group/trimet-mod-otp/issues/217 + if (!route) { + console.warn(`Cannot render stop times for missing route ID: ${getRouteIdForPattern(pattern)}`) + return + } + const filteredTimes = times .filter(excludeLastStop) .map(stopTime => {
refactor(StopScheduleTable): Do not render times for pattern without route object.
diff --git a/fabric_gce_tools/__init__.py b/fabric_gce_tools/__init__.py index <HASH>..<HASH> 100644 --- a/fabric_gce_tools/__init__.py +++ b/fabric_gce_tools/__init__.py @@ -120,8 +120,8 @@ def _get_roles(data): if not role in roles: roles[role] = [] - address = i["networkInterfaces"][0]["accessConfigs"][0]["natIP"] - if not address in roles[role]: + address = i.get("networkInterfaces", [{}])[0].get("accessConfigs", [{}])[0].get("natIP", None) + if address and not address in roles[role]: roles[role].append(address) return roles diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ from setuptools import setup, find_packages setup( name="fabric-gce-tools", - version="0.4", + version="0.5", description="Fabric integration with Google Compute Engine (GCE)", author="Eran Sandler", author_email="eran@sandler.co.il",
another minor fix for handling terminated instances still alive on the instances list
diff --git a/outbound.js b/outbound.js index <HASH>..<HASH> 100644 --- a/outbound.js +++ b/outbound.js @@ -151,6 +151,8 @@ exports.send_trans_email = function (transaction, next) { this.loginfo("Adding missing Date header"); transaction.add_header('Date', new Date().toString()); } + + transaction.add_header('Received', 'via haraka outbound.js at ' + new Date().toString()); // First get each domain var recips = {}; @@ -884,7 +886,7 @@ HMailItem.prototype.bounce_respond = function (retval, msg) { } var from = new Address ('<>'); - var recip = new Address (hmail.todo.mail_from.user, hmail.todo.mail_from.host); + var recip = new Address (this.todo.mail_from.user, this.todo.mail_from.host); var dom = recip.host; populate_bounce_message(from, recip, err, this, function (err, data_lines) { if (err) {
Add Received headers to outbound mail. Fix for bounce processing.
diff --git a/lib/synvert/cli.rb b/lib/synvert/cli.rb index <HASH>..<HASH> 100644 --- a/lib/synvert/cli.rb +++ b/lib/synvert/cli.rb @@ -27,12 +27,12 @@ module Synvert case @options[:command] when 'list' - load_rewriters + read_rewriters list_available_rewriters when 'open' open_rewriter when 'query' - load_rewriters + read_rewriters query_available_rewriters when 'show' show_rewriter @@ -44,7 +44,7 @@ module Synvert execute_snippet else # run - load_rewriters + read_rewriters run_snippet end true @@ -129,21 +129,9 @@ module Synvert end end - # Load all rewriters. - def load_rewriters + # read all rewriters. + def read_rewriters Dir.glob(File.join(default_snippets_home, 'lib/**/*.rb')).each { |file| require file } - - @options[:custom_snippet_paths].each do |snippet_path| - if /^http/.match?(snippet_path) - uri = URI.parse snippet_path - eval(uri.read) - else - require snippet_path - end - end - rescue StandardError - FileUtils.rm_rf default_snippets_home - retry end # List and print all available rewriters.
rename load_rewriters to read_rewriters
diff --git a/src/utility/expandRuleAntecedent.js b/src/utility/expandRuleAntecedent.js index <HASH>..<HASH> 100644 --- a/src/utility/expandRuleAntecedent.js +++ b/src/utility/expandRuleAntecedent.js @@ -33,10 +33,11 @@ module.exports = function expandRuleAntecedent(result, literals, thetaPath, prog return l .substitute(crrArg.theta); }); - let newClause = remappedClauseFront + let newRule = remappedClauseFront .concat(crrArg.clause) .concat(remappedClauseBack); - expandRuleAntecedent(result, newClause, thetaPath.concat([crrArg.theta]), program); + // check and expand the new antecedent again + expandRuleAntecedent(result, newRule, thetaPath.concat([crrArg.theta]), program); }); if (!isLeaf) { break;
add comments and rename variables in expandRuleAntecedent
diff --git a/save.go b/save.go index <HASH>..<HASH> 100644 --- a/save.go +++ b/save.go @@ -7,6 +7,7 @@ import ( "go/build" "os/exec" "path" + "regexp" "strings" ) @@ -72,15 +73,17 @@ func runSave(cmd *Command, args []string) { // Keep edits to vcs.go separate from the stock version. var headCmds = map[string]string{ - "git": "rev-parse head", - "hg": "id", - // TODO: Bzr + "git": "rev-parse head", // 2bebebd91805dbb931317f7a4057e4e8de9d9781 + "hg": "id", // 19114a3ee7d5 tip + "bzr": "log -r-1 --line", // 50: Dimiter Naydenov 2014-02-12 [merge] ec2: Added (Un)AssignPrivateIPAddresses APIs } +var revisionSeparator = regexp.MustCompile(`[ :]+`) + func (v *vcsCmd) head(dir, repo string) (string, error) { var output, err = v.runOutput(dir, headCmds[v.cmd], "dir", dir, "repo", repo) if err != nil { return "", err } - return string(output), nil + return revisionSeparator.Split(string(output), -1)[0], nil }
Support bzr, and strip hg trailing trash
diff --git a/src/ServiceManager.php b/src/ServiceManager.php index <HASH>..<HASH> 100644 --- a/src/ServiceManager.php +++ b/src/ServiceManager.php @@ -564,30 +564,18 @@ class ServiceManager implements ServiceLocatorInterface } /** - * Recursively resolve an alias name to a service name - * - * @param string $alias - * @return string - */ - private function resolveAlias($alias) - { - $name = $alias; - - do { - $canBeResolved = isset($this->aliases[$name]); - $name = $canBeResolved ? $this->aliases[$name] : $name; - } while ($canBeResolved); - - return $name; - } - - /** * Resolve all aliases to their canonical service names. */ private function resolveAliases(array $aliases) { foreach ($aliases as $alias => $service) { - $this->resolvedAliases[$alias] = $this->resolveAlias($alias); + $name = $alias; + + while (isset($this->aliases[$name])) { + $name = $this->aliases[$name]; + } + + $this->resolvedAliases[$alias] = $name; } }
Performance tweak: inlined `resolveAlias`
diff --git a/fastods/src/main/java/com/github/jferard/fastods/TableRowImpl.java b/fastods/src/main/java/com/github/jferard/fastods/TableRowImpl.java index <HASH>..<HASH> 100644 --- a/fastods/src/main/java/com/github/jferard/fastods/TableRowImpl.java +++ b/fastods/src/main/java/com/github/jferard/fastods/TableRowImpl.java @@ -116,7 +116,7 @@ public class TableRowImpl implements TableRow { nullFieldCounter++; continue; } - this.appendRepeatedCell(util, appendable, nullFieldCounter); + this.insertBlankCells(util, appendable, nullFieldCounter); nullFieldCounter = 0; cell.appendXMLToTableRow(util, appendable); } @@ -137,8 +137,8 @@ public class TableRowImpl implements TableRow { appendable.append(">"); } - private void appendRepeatedCell(final XMLUtil util, final Appendable appendable, - final int nullFieldCounter) throws IOException { + private void insertBlankCells(final XMLUtil util, final Appendable appendable, + final int nullFieldCounter) throws IOException { if (nullFieldCounter <= 0) { return; }
Rename appendRepeatedCells to insertBlankCells (see #<I>)
diff --git a/lib/cli.js b/lib/cli.js index <HASH>..<HASH> 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -4,6 +4,7 @@ var fs = require('fs') , which = require('which') , parseArgs = require('minimist') , semver = require('semver') + , path = require('path') var PHANTOM_VERSION = "^1.9.0" @@ -110,7 +111,7 @@ cli.prototype.parse = function(argv, next) { this.errors.push(err) } } else { - options.css = fs.readFileSync(__dirname + '/../dist/mermaid.css') + options.css = fs.readFileSync(path.join(__dirname, '..', 'dist', 'mermaid.css')) } this.checkPhantom = createCheckPhantom(options.phantomPath)
Usage of path.join for adding styles as per suggestions from @fardog
diff --git a/src/java/com/github/rjeschke/txtmark/HTML.java b/src/java/com/github/rjeschke/txtmark/HTML.java index <HASH>..<HASH> 100644 --- a/src/java/com/github/rjeschke/txtmark/HTML.java +++ b/src/java/com/github/rjeschke/txtmark/HTML.java @@ -114,7 +114,8 @@ class HTML HTMLElement.frame, HTMLElement.frameset, HTMLElement.iframe, - HTMLElement.script + HTMLElement.script, + HTMLElement.object, }; /** Character to entity encoding map. */
Added object to unsafe HTML elements.
diff --git a/spec/models/role_spec.rb b/spec/models/role_spec.rb index <HASH>..<HASH> 100644 --- a/spec/models/role_spec.rb +++ b/spec/models/role_spec.rb @@ -4,6 +4,7 @@ require "spec_helper" describe Releaf::Role do it { should serialize(:permissions).as(Array) } + it { should have_many(:admins).dependent(:restrict_with_exception) } describe 'validations' do it { should validate_presence_of(:name) }
Add test for Releaf::Role#admins associations
diff --git a/widgets/Html/helpers/handleDOM.js b/widgets/Html/helpers/handleDOM.js index <HASH>..<HASH> 100644 --- a/widgets/Html/helpers/handleDOM.js +++ b/widgets/Html/helpers/handleDOM.js @@ -171,6 +171,6 @@ export const handleYouTube = (container) => { * Stops the player when a native app event is triggered when a webview gets hidden or when the * user navigated to some other page. */ - event.addCallback('openLink', () => { stopPlayer(youtubeIframes); }); + event.addCallback('routeDidChange', () => { stopPlayer(youtubeIframes); }); event.addCallback('viewDidDisappear', () => { stopPlayer(youtubeIframes); }); };
DTY-<I>: Youtube video plays in cart without reason - use routeDidChange event
diff --git a/code/javascript/core/scripts/selenium-testrunner.js b/code/javascript/core/scripts/selenium-testrunner.js index <HASH>..<HASH> 100644 --- a/code/javascript/core/scripts/selenium-testrunner.js +++ b/code/javascript/core/scripts/selenium-testrunner.js @@ -160,7 +160,7 @@ Object.extend(SeleniumFrame.prototype, { var styleLink = d.createElement("link"); styleLink.rel = "stylesheet"; styleLink.type = "text/css"; - styleLink.href = window.location.pathname.replace(/[^\/]+$/, "selenium-test.css"); + styleLink.href = window.location.pathname.replace(/[^\/\\]+$/, "selenium-test.css"); head.appendChild(styleLink); },
Look for the last slash or backslash; fixes broken css when running IE or HTA from c:" r<I>
diff --git a/src/main/java/org/jboss/netty/handler/codec/replay/ReplayingDecoder.java b/src/main/java/org/jboss/netty/handler/codec/replay/ReplayingDecoder.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jboss/netty/handler/codec/replay/ReplayingDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/replay/ReplayingDecoder.java @@ -324,7 +324,21 @@ public abstract class ReplayingDecoder<T extends Enum<T>> state = newState; return oldState; } - + + /** + * Returns the actual number of readable bytes in the cumulative buffer + * of this decoder. You do not need to rely on this value to write a + * decoder. Use it only when necessary. + */ + protected int actualReadableBytes() { + ChannelBuffer buf = cumulation.get(); + if (buf == null) { + return 0; + } + + return buf.readableBytes(); + } + /** * Decodes the received packets so far into a frame. *
Fixed issue: NETTY-<I> Subsitute ReplayingDecoder with FrameDecoder without losing stored buffer * Added ReplayingDecoder.actualReadableBytes()
diff --git a/src/rinoh/style.py b/src/rinoh/style.py index <HASH>..<HASH> 100644 --- a/src/rinoh/style.py +++ b/src/rinoh/style.py @@ -476,6 +476,7 @@ class Styled(DocumentElement, metaclass=StyledMeta): self.style_class.__name__, style.__class__.__name__)) self.style = style + self.classes = [] def __eq__(self, other): return type(self) == type(other) and self.__dict__ == other.__dict__ @@ -582,11 +583,23 @@ class Styled(DocumentElement, metaclass=StyledMeta): else: return container.document.stylesheet.find_style(self, container) + @property + def has_class(self): + return HasClass(self) + def before_placing(self, container): if self.parent: self.parent.before_placing(container) +class HasClass(object): + def __init__(self, styled): + self.styled = styled + + def __eq__(self, class_name): + return class_name in self.styled.classes + + class InvalidStyledMatcher(Exception): """The :class:`StyledMatcher` includes selectors which reference selectors which are not defined."""
Provide Styled.has_class for use in selectors Styled.like(has_class='myclass') checks whether 'myclass' is one of the classes set for the styled. This can be used to style elements based on classes set on docutils elements.
diff --git a/lib/DataSift/User.php b/lib/DataSift/User.php index <HASH>..<HASH> 100644 --- a/lib/DataSift/User.php +++ b/lib/DataSift/User.php @@ -186,9 +186,9 @@ class DataSift_User * @throws DataSift_Exception_InvalidData * @see DataSift_StreamConsumer */ - public function getConsumer($type = DataSift_StreamConsumer::TYPE_HTTP, $hash, $onInteraction = false, $onStopped = false) + public function getConsumer($type = DataSift_StreamConsumer::TYPE_HTTP, $hash, $onInteraction = false, $onStopped = false, $onDeleted = false) { - return DataSift_StreamConsumer::factory($this, $type, new DataSift_Definition($this, false, $hash), $onInteraction, $onStopped); + return DataSift_StreamConsumer::factory($this, $type, new DataSift_Definition($this, false, $hash), $onInteraction, $onStopped, $onDeleted); } /**
Added onDeleted support for User::getConsumer.
diff --git a/lib/Alchemy/Phrasea/Core/Configuration.php b/lib/Alchemy/Phrasea/Core/Configuration.php index <HASH>..<HASH> 100644 --- a/lib/Alchemy/Phrasea/Core/Configuration.php +++ b/lib/Alchemy/Phrasea/Core/Configuration.php @@ -244,7 +244,15 @@ class Configuration public function initialize() { - return $this->specifications->initialize(); + $this->specifications->initialize(); + $this->setEnvironnement('prod'); + + return $this; + } + + public function delete() + { + return $this->specifications->delete(); } public function setConfigurations($configurations)
Add Configuration::delete method
diff --git a/app/modules/mobilizations/blocks/reducers.js b/app/modules/mobilizations/blocks/reducers.js index <HASH>..<HASH> 100644 --- a/app/modules/mobilizations/blocks/reducers.js +++ b/app/modules/mobilizations/blocks/reducers.js @@ -97,7 +97,3 @@ export default function BlockReducers(state = initialState, action) { return state } } - -export function isBlocksLoaded(globalState) { - return globalState.blocks.loaded -} diff --git a/app/modules/mobilizations/blocks/selectors.js b/app/modules/mobilizations/blocks/selectors.js index <HASH>..<HASH> 100644 --- a/app/modules/mobilizations/blocks/selectors.js +++ b/app/modules/mobilizations/blocks/selectors.js @@ -1,3 +1,5 @@ export const getWidgets = ({ widgets, block }) => widgets.data.filter( widget => widget.block_id === block.id ) + +export const isLoaded = state => state.blocks.loaded
Move method that checks if blocks are loaded from reducers file to selectors #<I>
diff --git a/src/collectors/nginx/nginx.py b/src/collectors/nginx/nginx.py index <HASH>..<HASH> 100644 --- a/src/collectors/nginx/nginx.py +++ b/src/collectors/nginx/nginx.py @@ -35,7 +35,7 @@ For commercial nginx+: following content: <pre> server { - listen *:8080; + listen 127.0.0.1:8080; root /usr/share/nginx/html;
Change example nginx config to bind to loopback only
diff --git a/lxc/storage_volume.go b/lxc/storage_volume.go index <HASH>..<HASH> 100644 --- a/lxc/storage_volume.go +++ b/lxc/storage_volume.go @@ -125,6 +125,9 @@ Unless specified through a prefix, all volume operations affect "custom" (user c storageVolumeUnsetCmd := cmdStorageVolumeUnset{global: c.global, storage: c.storage, storageVolume: c, storageVolumeSet: &storageVolumeSetCmd} cmd.AddCommand(storageVolumeUnsetCmd.Command()) + // Workaround for subcommand usage errors. See: https://github.com/spf13/cobra/issues/706 + cmd.Args = cobra.NoArgs + cmd.Run = func(cmd *cobra.Command, args []string) { cmd.Usage() } return cmd }
lxc/storage/volume: workaround for subcommand errors
diff --git a/publishable/lang/zh_CN/voyager.php b/publishable/lang/zh_CN/voyager.php index <HASH>..<HASH> 100644 --- a/publishable/lang/zh_CN/voyager.php +++ b/publishable/lang/zh_CN/voyager.php @@ -19,6 +19,9 @@ return [ 'auto_increment' => '自增', 'browse' => '浏览', 'builder' => '构建器', + 'bulk_delete' => '删除选中', + 'bulk_delete_confirm' => '是的, 删除这些', + 'bulk_delete_nothing' => '没有选择要删除的内容', 'cancel' => '取消', 'choose_type' => '选择类型', 'click_here' => '点击这里',
Add Chinese translation Add Chinese translation about bulk buttons
diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index <HASH>..<HASH> 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -168,6 +168,28 @@ EOF; } /** + * Deletes the header with the passed name. Subsequent requests + * will not have the deleted header in its request. + * + * Example: + * ```php + * <?php + * $I->haveHttpHeader('X-Requested-With', 'Codeception'); + * $I->sendGET('test-headers.php'); + * // ... + * $I->deleteHeader('X-Requested-With'); + * $I->sendPOST('some-other-page.php'); + * ?> + * ``` + * + * @param string $name the name of the header to delete. + */ + public function deleteHeader($name) + { + $this->connectionModule->deleteHeader($name); + } + + /** * Checks over the given HTTP header and (optionally) * its value, asserting that are there *
Added missing deleteHeader method to REST module (#<I>) Fixes #<I>
diff --git a/server/src/main/java/io/atomix/copycat/server/state/AbstractAppender.java b/server/src/main/java/io/atomix/copycat/server/state/AbstractAppender.java index <HASH>..<HASH> 100644 --- a/server/src/main/java/io/atomix/copycat/server/state/AbstractAppender.java +++ b/server/src/main/java/io/atomix/copycat/server/state/AbstractAppender.java @@ -231,7 +231,7 @@ abstract class AbstractAppender implements AutoCloseable { .withIndex(member.getSnapshotIndex()) .withOffset(member.getSnapshotOffset()) .withData(buffer.flip()) - .withComplete(reader.hasRemaining()) + .withComplete(!reader.hasRemaining()) .build(); } }
Use SnapshotReader.hasRemaining() to determine whether bytes remain in the snapshot during replication.
diff --git a/src/__mocks__/mongooseCommon.js b/src/__mocks__/mongooseCommon.js index <HASH>..<HASH> 100644 --- a/src/__mocks__/mongooseCommon.js +++ b/src/__mocks__/mongooseCommon.js @@ -14,7 +14,7 @@ mongoose.connect = async () => { const mongoUri = await mongoServer.getConnectionString(); - originalConnect.bind(mongoose)(mongoUri); + originalConnect.bind(mongoose)(mongoUri, { useMongoClient: true }); mongoose.connection.on('error', e => { if (e.message.code === 'ETIMEDOUT') {
test: Fix deprecation warning with mongoose `open()` method
diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index <HASH>..<HASH> 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -247,8 +247,8 @@ func NewTabletServer(config tabletenv.TabletConfig, topoServer *topo.Server, ali }) stats.Publish("TabletStateName", stats.StringFunc(tsv.GetState)) - // This is the same information as the above two stats, but exported with TabletStateName as a label for Prometheus - // which doesn't support exporting strings as stat values. + // TabletServerState exports the same information as the above two stats (TabletState / TabletStateName), + // but exported with TabletStateName as a label for Prometheus, which doesn't support exporting strings as stat values. stats.NewGaugesFuncWithMultiLabels("TabletServerState", "Tablet server state labeled by state name", []string{"name"}, func() map[string]int64 { tsv.mu.Lock() state := tsv.state
Update comment to adhere to style guide.
diff --git a/code/libraries/koowa/components/com_koowa/database/behavior/sluggable.php b/code/libraries/koowa/components/com_koowa/database/behavior/sluggable.php index <HASH>..<HASH> 100644 --- a/code/libraries/koowa/components/com_koowa/database/behavior/sluggable.php +++ b/code/libraries/koowa/components/com_koowa/database/behavior/sluggable.php @@ -52,10 +52,10 @@ class ComKoowaDatabaseBehaviorSluggable extends KDatabaseBehaviorSluggable */ protected function _canonicalizeSlug() { - parent::_canonicalizeSlug(); - if (trim(str_replace($this->_separator, '', $this->slug)) == '') { - $this->slug = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->slug = JFactory::getDate()->format('Y-m-d-H-i-s'); } + + parent::_canonicalizeSlug(); } }
re #<I>: Slugs were not always made unique
diff --git a/src/i18n/Data/Intl/IntlLocales.php b/src/i18n/Data/Intl/IntlLocales.php index <HASH>..<HASH> 100644 --- a/src/i18n/Data/Intl/IntlLocales.php +++ b/src/i18n/Data/Intl/IntlLocales.php @@ -793,7 +793,7 @@ class IntlLocales implements Locales, Resettable 'pl' => 'pl_PL', 'pon' => 'pon_FM', 'ps' => 'ps_AF', - 'pt' => 'pt_BR', + 'pt' => 'pt_PT', 'qu' => 'qu_PE', 'rm' => 'rm_CH', 'rn' => 'rn_BI',
ENHANCEMENT Promote portugese (portugal) as primary locale Fixes #<I>
diff --git a/app/models/system.rb b/app/models/system.rb index <HASH>..<HASH> 100644 --- a/app/models/system.rb +++ b/app/models/system.rb @@ -85,17 +85,17 @@ class System < ActiveRecord::Base def readable? User.allowed_to?([:read_systems, :update_systems, :delete_systems], :organizations, nil, self.organization) || - User.allowed_to?([:read_systems, :update_systems, :delete_systems], :environment, self.environment.id, self.organization) + User.allowed_to?([:read_systems, :update_systems, :delete_systems], :environments, self.environment.id, self.organization) end def editable? User.allowed_to?(*[[:read_systems], :organizations, nil, self.organization.id]) || - User.allowed_to?(*[[:read_systems], :environment, self.environment.id, self.organization]) + User.allowed_to?(*[[:read_systems], :environments, self.environment.id, self.organization]) end def deletable? User.allowed_to?(*[[:delete_systems], :organizations, nil, self.organization.id]) || - User.allowed_to?(*[[:delete_systems], :environment, self.environment.id, self.organization]) + User.allowed_to?(*[[:delete_systems], :environments, self.environment.id, self.organization]) end
Bug fix - resource should be in plural when checking permissions
diff --git a/scrape/scrape.py b/scrape/scrape.py index <HASH>..<HASH> 100755 --- a/scrape/scrape.py +++ b/scrape/scrape.py @@ -67,6 +67,7 @@ BASEDIR = "awacs" IGNORED_SERVICE_ALIASES = { "Amazon Kinesis Analytics V2": "kinesisanalytics", "Amazon Pinpoint Email Service": "ses", + "AWS IoT Greengrass V2": "greengrass", "AWS Marketplace Catalog": "aws-marketplace", "AWS Marketplace Entitlement Service": "aws-marketplace", "AWS Marketplace Image Building Service": "aws-marketplace", @@ -143,7 +144,7 @@ async def collect_existing_actions() -> Dict[str, Set[str]]: async def collect_service_info() -> List[httpx.Response]: - max_connections = 5 + max_connections = 2 async with httpx.AsyncClient( http2=True, limits=httpx.Limits(max_connections=max_connections),
Fix scrape script breakage - Map "AWS IoT Greengrass V2" to "greengrass" - Reduce max connections to prevent server busy captcha prompt
diff --git a/penaltymodel_mip/tests/test_generation.py b/penaltymodel_mip/tests/test_generation.py index <HASH>..<HASH> 100644 --- a/penaltymodel_mip/tests/test_generation.py +++ b/penaltymodel_mip/tests/test_generation.py @@ -345,11 +345,10 @@ class TestGeneration(unittest.TestCase): nodes = ['a', 'b'] graph = nx.complete_graph(nodes + ['aux0']) configurations = {(+1, +1): -3, - (+1, -1): -6, - (-1, +1): 0, - (-1, -1): -1} + (+1, -1): -3, + (-1, -1): -3} - bqm, gap = mip.generate_bqm(graph, configurations, nodes) + bqm, gap = mip.generate_bqm(graph, configurations, nodes, min_classical_gap=0) self.check_bqm_graph(bqm, graph) def test_silly(self):
Test seems to show that using auxiliary works when all configs have the same energy states and that not all possible configs are shown
diff --git a/aws/request/retryer.go b/aws/request/retryer.go index <HASH>..<HASH> 100644 --- a/aws/request/retryer.go +++ b/aws/request/retryer.go @@ -38,6 +38,7 @@ var throttleCodes = map[string]struct{}{ "RequestThrottled": {}, "LimitExceededException": {}, // Deleting 10+ DynamoDb tables at once "TooManyRequestsException": {}, // Lambda functions + "PriorRequestNotComplete": {}, // Route53 } // credsExpiredCodes is a collection of error codes which signify the credentials
Add PriorRequestNotComplete to throttle codes so it can be retried automatically (#<I>) Fix #<I>
diff --git a/gos/tasks.py b/gos/tasks.py index <HASH>..<HASH> 100644 --- a/gos/tasks.py +++ b/gos/tasks.py @@ -44,4 +44,6 @@ class TaskLoader(object): def load_tasks_from_dir(self, dir_path): if not os.path.exists(dir_path): - raise GOSTaskException + raise GOSTaskException() + if os.path.isfile(dir_path): + raise GOSTaskException() diff --git a/tests/test_tasks.py b/tests/test_tasks.py index <HASH>..<HASH> 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -111,6 +111,10 @@ class TaskLoaderTestCase(unittest.TestCase): with self.assertRaises(GOSTaskException): TaskLoader().load_tasks_from_dir(non_existing_dir) + def test_load_from_dir_file_supplied(self): + tmp_file = tempfile.NamedTemporaryFile(mode="wt") + with self.assertRaises(GOSTaskException): + TaskLoader().load_tasks_from_dir(tmp_file.name) if __name__ == '__main__': unittest.main()
GOS-<I> dir loading logic prohibits to load from file path
diff --git a/src/VCard.php b/src/VCard.php index <HASH>..<HASH> 100644 --- a/src/VCard.php +++ b/src/VCard.php @@ -480,6 +480,9 @@ class VCard // decode value + lowercase the string $value = strtolower($this->decode($value)); + // urlize this part + $value = Transliterator::urlize($value); + // overwrite filename or add to filename using a prefix in between $this->filename = ($overwrite) ? $value : $this->filename . $separator . $value;
SetFilename: use Transliterator
diff --git a/sos/plugins/openshift.py b/sos/plugins/openshift.py index <HASH>..<HASH> 100644 --- a/sos/plugins/openshift.py +++ b/sos/plugins/openshift.py @@ -138,14 +138,14 @@ class Openshift(Plugin, RedHatPlugin): plugin_dir = '/etc/openshift/plugins.d/' self.do_file_sub(plugin_dir + 'openshift-origin-dns-dynect.conf', r"(DYNECT_PASSWORD\s*=\s*)(.*)", - r"********") + r"\1********") # Fog cloud: FOG_RACKSPACE_API_KEY="apikey" self.do_file_sub(plugin_dir + 'openshift-origin-dns-fog.conf', r"(FOG_RACKSPACE_API_KEY\s*=\s*)(.*)", - r"********") + r"\1********") # ISC bind: BIND_KEYVALUE="rndc key" self.do_file_sub(plugin_dir + 'openshift-origin-dns-nsupdate.conf', r"(BIND_KEYVALUE\s*=\s*)(.*)", - r"********") + r"\1********") # vim: et ts=4 sw=4
[openshift] Obfuscate only DNS plugin credential values Obfuscate only the value, not the entire directive and value pair.
diff --git a/lib/nack/server.rb b/lib/nack/server.rb index <HASH>..<HASH> 100644 --- a/lib/nack/server.rb +++ b/lib/nack/server.rb @@ -91,6 +91,7 @@ module Nack if ppid != Process.ppid debug "Process is orphaned" + return end next unless readable
Break from event loop if process is orphaned
diff --git a/direct.go b/direct.go index <HASH>..<HASH> 100644 --- a/direct.go +++ b/direct.go @@ -390,7 +390,8 @@ func (db *RedisDB) Unlink(k string) bool { // TTL is the left over time to live. As set via EXPIRE, PEXPIRE, EXPIREAT, // PEXPIREAT. -// 0 if not set. +// Note: this direct function returns 0 if there is no TTL set, unlike redis, +// which returns -1. func (m *Miniredis) TTL(k string) time.Duration { return m.DB(m.selectedDB).TTL(k) }
update a comment There was an issue with confusion about this a while ago.
diff --git a/libraries/lithium/net/socket/Curl.php b/libraries/lithium/net/socket/Curl.php index <HASH>..<HASH> 100644 --- a/libraries/lithium/net/socket/Curl.php +++ b/libraries/lithium/net/socket/Curl.php @@ -34,6 +34,11 @@ class Curl extends \lithium\net\Socket { */ public $options = array(); + public function __construct(array $config = array()) { + $defaults = array('ignoreExpect' => true); + parent::__construct($config + $defaults); + } + /** * Opens a curl connection and initializes the internal resource handle. * @@ -182,6 +187,9 @@ class Curl extends \lithium\net\Socket { $options += $defaults; $this->set(CURLOPT_URL, $message->to('url')); + if ($this->_config['ignoreExpect']) { + $message->headers('Expect', ' '); + } if (isset($message->headers)) { $this->set(CURLOPT_HTTPHEADER, $message->headers()); }
Adding flag to `Curl` socket adapter to fix requests which return with HTTP <I> Continue.
diff --git a/lib/Reporter.js b/lib/Reporter.js index <HASH>..<HASH> 100644 --- a/lib/Reporter.js +++ b/lib/Reporter.js @@ -65,10 +65,7 @@ Reporter.prototype._end = function(data){ Reporter.prototype.clearLine = function() { if (!this._lastLine) return; - var spaces = ' '; - for(i in this._lastLine.length){ - spaces += ' '; - } + var spaces = str.repeat(' ', this._lastLine.length); process.stdout.write('\r' + spaces + '\r'); }; diff --git a/test/unit/testReporter.js b/test/unit/testReporter.js index <HASH>..<HASH> 100644 --- a/test/unit/testReporter.js +++ b/test/unit/testReporter.js @@ -13,5 +13,5 @@ var assert = require('assert'); reporter._progress = 5; var progress = reporter.getProgress(); - assert('5/10 50%', progress) + assert.equal('5/10 50.0%', progress) })(); \ No newline at end of file
Fixed test and used repeater for clear line
diff --git a/angr/manager.py b/angr/manager.py index <HASH>..<HASH> 100644 --- a/angr/manager.py +++ b/angr/manager.py @@ -600,7 +600,7 @@ class SimulationManager(ana.Storable): pg.stashes[stash] = new_active i = 0 - while n is not None and i < n: + while n is None or i < n: i += 1 l.debug("Round %d: stepping %s", i, pg)
Re-fix condition... closes #<I>
diff --git a/h2o-core/src/test/java/water/rapids/RapidsTest.java b/h2o-core/src/test/java/water/rapids/RapidsTest.java index <HASH>..<HASH> 100644 --- a/h2o-core/src/test/java/water/rapids/RapidsTest.java +++ b/h2o-core/src/test/java/water/rapids/RapidsTest.java @@ -272,7 +272,7 @@ public class RapidsTest extends TestUtil { r = new Frame(r); DKV.put(r); System.out.println(r); - String x = String.format("(merge %s %s #1 #0 )",l._key,r._key); + String x = String.format("(merge %s %s #1 #0 [] [] \"auto\")",l._key,r._key); Val res = Exec.exec(x); f = res.getFrame(); System.out.println(f);
Another rapids merge addition of new arguments with Eric
diff --git a/src/Config_Command.php b/src/Config_Command.php index <HASH>..<HASH> 100644 --- a/src/Config_Command.php +++ b/src/Config_Command.php @@ -217,8 +217,9 @@ class Config_Command extends WP_CLI_Command { * +------------------+------------------------------------------------------------------+----------+ * * @when before_wp_load + * @subcommand list */ - public function list( $_, $assoc_args ) { + public function list_( $_, $assoc_args ) { $path = Utils\locate_wp_config(); if ( ! $path ) { WP_CLI::error( "'wp-config.php' not found." );
Rename method list, as it is a reserved keyword
diff --git a/internal/upgrade/upgrade_supported.go b/internal/upgrade/upgrade_supported.go index <HASH>..<HASH> 100644 --- a/internal/upgrade/upgrade_supported.go +++ b/internal/upgrade/upgrade_supported.go @@ -120,9 +120,6 @@ func readTarGZ(url string, dir string) (string, error) { } tr := tar.NewReader(gr) - if err != nil { - return "", err - } // Iterate through the files in the archive. for { @@ -143,14 +140,25 @@ func readTarGZ(url string, dir string) (string, error) { if err != nil { return "", err } - io.Copy(of, tr) + + _, err = io.Copy(of, tr) + if err != nil { + os.Remove(of.Name()) + return "", err + } + err = of.Close() if err != nil { os.Remove(of.Name()) return "", err } - os.Chmod(of.Name(), os.FileMode(hdr.Mode)) + err = os.Chmod(of.Name(), os.FileMode(hdr.Mode)) + if err != nil { + os.Remove(of.Name()) + return "", err + } + return of.Name(), nil } }
Must verify success of from-network copy during upgrade (ref #<I>)
diff --git a/src/Symfony/Component/Workflow/Event/GuardEvent.php b/src/Symfony/Component/Workflow/Event/GuardEvent.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Workflow/Event/GuardEvent.php +++ b/src/Symfony/Component/Workflow/Event/GuardEvent.php @@ -27,7 +27,7 @@ class GuardEvent extends Event /** * {@inheritdoc} */ - public function __construct($subject, Marking $marking, Transition $transition, $workflowName = 'unnamed') + public function __construct($subject, Marking $marking, Transition $transition, $workflowName = null) { parent::__construct($subject, $marking, $transition, $workflowName);
Remove deprecated usage null is also deprecated but must be conserved for BC purpose. Also it will will not let the develop think string is ok.
diff --git a/test/test_filter.py b/test/test_filter.py index <HASH>..<HASH> 100644 --- a/test/test_filter.py +++ b/test/test_filter.py @@ -420,23 +420,6 @@ class FakeDbConnection(object): self.open = False -class FakeTaxonomyFilter(object): - """ - A class which fakes results from TaxonomyFilter. - """ - def __init__(self, gi, taxonomy): - self._gi = gi - self._taxonomy = taxonomy - self._lineage = ['Merkel cell polyomavirus', 'Polyomavirus', - 'dsDNA viruses', 'Vira'] - - def getRightResult(): - pass - - def getWrongResult(): - pass - - class TaxonomyFilterTest(TestCase): """ Tests for L{dark.filter.TaxonomyFilter} class.
removed unused test classes from test_filter.py
diff --git a/soap-node.js b/soap-node.js index <HASH>..<HASH> 100644 --- a/soap-node.js +++ b/soap-node.js @@ -15,9 +15,9 @@ module.exports = function (RED) { node.on('input', function (msg) { var server = (msg.server)?{wsdl:msg.server, auth:0}:node.server; var lastFiveChar = server.wsdl.substr(server.wsdl.length-5); - if(lastFiveChar !== '?wsdl'){ + if(server.wsdl.indexOf("://")>0 && lastFiveChar !== '?wsdl'){ server.wsdl += '?wsdl'; - }; + } soap.createClient(server.wsdl, msg.options||{}, function (err, client) { if (err) { node.status({fill: "red", shape: "dot", text: "WSDL Config Error: " + err}); @@ -65,4 +65,4 @@ module.exports = function (RED) { } } RED.nodes.registerType("soap request", SoapCall); -}; \ No newline at end of file +};
do not suffix url with ?wsdl for local filesystem
diff --git a/chacha20_test.go b/chacha20_test.go index <HASH>..<HASH> 100644 --- a/chacha20_test.go +++ b/chacha20_test.go @@ -5,8 +5,12 @@ import ( "encoding/hex" "fmt" "testing" + "crypto/cipher" ) +// assert that a pointer to Cipher actually meets the cipher.Stream interface +var _ cipher.Stream = &Cipher{} + // stolen from http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-00#section-7 var testVectors = [][]string{ []string{
Lock down the commitment to cipher.Stream.
diff --git a/pycronofy/request_handler.py b/pycronofy/request_handler.py index <HASH>..<HASH> 100644 --- a/pycronofy/request_handler.py +++ b/pycronofy/request_handler.py @@ -1,5 +1,6 @@ import requests import pycronofy +from pycronofy import settings from pycronofy.exceptions import PyCronofyRequestError class RequestHandler(object): @@ -60,10 +61,10 @@ class RequestHandler(object): if not params: params = {} if endpoint and not url: - url = '%s/%s/%s' % (pycronofy.settings.API_BASE_URL, pycronofy.settings.API_VERSION, endpoint) + url = '%s/%s/%s' % (settings.API_BASE_URL, settings.API_VERSION, endpoint) response = requests.__getattribute__(request_method)( url=url, - hooks=pycronofy.settings.REQUEST_HOOK, + hooks=settings.REQUEST_HOOK, headers={ 'Authorization': self.auth.get_authorization(), 'User-Agent': self.user_agent,
Import settings separately from pycronofy.
diff --git a/src/NamelessCoder/Gizzle/Payload.php b/src/NamelessCoder/Gizzle/Payload.php index <HASH>..<HASH> 100644 --- a/src/NamelessCoder/Gizzle/Payload.php +++ b/src/NamelessCoder/Gizzle/Payload.php @@ -219,7 +219,7 @@ class Payload extends JsonDataMapper { $base = '/' . implode('/', $segments) . '/' . $segment . '/'; $expectedFile = $base . $this->settingsFile; $expectedFile = FALSE === file_exists($expectedFile) ? $base . 'Settings.yml' : $expectedFile; - $file = TRUE === file_exists($file) ? $file : NULL; + $file = TRUE === file_exists($expectedFile) ? $expectedFile : NULL; } return (array) (TRUE === file_exists($file) ? Yaml::parse($file) : array()); }
[BUGFIX] Incorrect resolving of expected settings file
diff --git a/lib/timber-image-helper.php b/lib/timber-image-helper.php index <HASH>..<HASH> 100644 --- a/lib/timber-image-helper.php +++ b/lib/timber-image-helper.php @@ -19,7 +19,6 @@ class TimberImageHelper { const BASE_CONTENT = 2; public static function init() { - //self::load_dependencies(); self::add_constants(); self::add_actions(); self::add_filters(); @@ -109,19 +108,6 @@ class TimberImageHelper { } } - - /** - * load the dependencies of TimberImageOperations - * @return void - */ - static function load_dependencies() { - require_once('image/timber-image-operation.php'); - require_once('image/timber-image-operation-pngtojpg.php'); - require_once('image/timber-image-operation-retina.php'); - require_once('image/timber-image-operation-letterbox.php'); - require_once('image/timber-image-operation-resize.php'); - } - /** * adds a 'relative' key to wp_upload_dir() result. * It will contain the relative url to upload dir. @@ -134,7 +120,7 @@ class TimberImageHelper { } ); } -//-- end of public methots --// +//-- end of public methods --//
Don't manually load TimberImageHelper dependencies
diff --git a/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java b/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java index <HASH>..<HASH> 100644 --- a/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java +++ b/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java @@ -1364,8 +1364,10 @@ abstract class AbstractOperationContext implements OperationContext { } } } catch (Exception e) { - report(MessageSeverity.ERROR, - ControllerLogger.ROOT_LOGGER.stepHandlerFailedRollback(handler, operation.asString(), address, e)); + final String failedRollbackMessage = + MGMT_OP_LOGGER.stepHandlerFailedRollback(handler, operation.asString(), address, e); + MGMT_OP_LOGGER.errorf(e, failedRollbackMessage); + report(MessageSeverity.ERROR, failedRollbackMessage); } }
[WFCORE-<I>] Wildfly does not log stack trace of an exception
diff --git a/app/models/xmlrpc/moveable_type_api.rb b/app/models/xmlrpc/moveable_type_api.rb index <HASH>..<HASH> 100644 --- a/app/models/xmlrpc/moveable_type_api.rb +++ b/app/models/xmlrpc/moveable_type_api.rb @@ -83,15 +83,13 @@ class MoveableTypeApi tb end - # I'm not sure if anything even needs to be done here - # since we're not generating static html. - # Maybe we could empty the cache to regenerate the article? def publishPost(postid, username, password) raise "Invalid login" unless valid_login?(username, password) - true + article = Article.find(postid) + article.published = 1 + article.save end - private def valid_login?(user,pass)
added support for publishPost MT api call. This will fix issues with w.blogar. closing #<I>. (Vince Hodges) git-svn-id: <URL>
diff --git a/src/Symfony/Component/Lock/Store/RedisStore.php b/src/Symfony/Component/Lock/Store/RedisStore.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Lock/Store/RedisStore.php +++ b/src/Symfony/Component/Lock/Store/RedisStore.php @@ -130,8 +130,11 @@ class RedisStore implements StoreInterface return $this->redis->_instance($this->redis->_target($resource))->eval($script, array_merge(array($resource), $args), 1); } - // Have to be a \Predis\Client - return call_user_func_array(array($this->redis, 'eval'), array_merge(array($script, 1, $resource), $args)); + if ($this->redis instanceof \Predis\Client) { + return call_user_func_array(array($this->redis, 'eval'), array_merge(array($script, 1, $resource), $args)); + } + + throw new InvalidArgumentException(sprintf('%s() expects been initialized with a Redis, RedisArray, RedisCluster or Predis\Client, %s given', __METHOD__, is_object($this->redis) ? get_class($this->redis) : gettype($this->redis))); } /**
Don't call blindly the redis client
diff --git a/threetaps/__init__.py b/threetaps/__init__.py index <HASH>..<HASH> 100644 --- a/threetaps/__init__.py +++ b/threetaps/__init__.py @@ -15,8 +15,7 @@ Basic usage: """ __title__ = 'threetaps' -__version__ = '0.0.1' -__build__ = 0x000001 +__version__ = '0.1dev' __author__ = 'Michael Kolodny' __license__ = 'MIT' __copyright__ = 'Copyright 2013 Michael Kolodny'
change version to <I>dev
diff --git a/anyconfig/compat.py b/anyconfig/compat.py index <HASH>..<HASH> 100644 --- a/anyconfig/compat.py +++ b/anyconfig/compat.py @@ -89,7 +89,7 @@ if IS_PYTHON_3: STR_TYPES = (str, ) else: import ConfigParser as configparser # flake8: noqa - from UserDict import UserDict # flake8: noqa + from UserDict import UserDict # flake8: noqa try: from cStringIO import StringIO # flake8: noqa except ImportError:
fix: ensure enough spaces before inline comment
diff --git a/jsonapi/fixtures_test.go b/jsonapi/fixtures_test.go index <HASH>..<HASH> 100644 --- a/jsonapi/fixtures_test.go +++ b/jsonapi/fixtures_test.go @@ -356,12 +356,12 @@ func (s *SQLNullPost) SetID(ID string) error { } type RenamedPostWithEmbedding struct { + Embedded SQLNullPost ID string `jsonapi:"-"` Another string `jsonapi:"name=another"` Field string `jsonapi:"name=foo"` Other string `jsonapi:"name=bar-bar"` Ignored string `jsonapi:"-"` - Embedded SQLNullPost } func (p *RenamedPostWithEmbedding) SetID(ID string) error { diff --git a/jsonapi/unmarshal.go b/jsonapi/unmarshal.go index <HASH>..<HASH> 100644 --- a/jsonapi/unmarshal.go +++ b/jsonapi/unmarshal.go @@ -320,7 +320,9 @@ func getFieldByTagName(val reflect.Value, fieldName string) (field reflect.Value _, isEmbedded := val.Field(x).Addr().Interface().(UnmarshalIdentifier) if isEmbedded { field, found = getFieldByTagName(val.Field(x), fieldName) - return + if found { + return + } } }
fix too early return when unmarshal embedded structs the search needs to go on if the field from the json was not found in the embedded struct and there are other fields. Now there is a check for that.
diff --git a/tests/Form/SelectTest.php b/tests/Form/SelectTest.php index <HASH>..<HASH> 100644 --- a/tests/Form/SelectTest.php +++ b/tests/Form/SelectTest.php @@ -54,7 +54,7 @@ OUT; } /** - * @dataProvider testElementSelectedStateCheckDataProvider + * @dataProvider elementSelectedStateCheckDataProvider */ public function testElementSelectedStateCheck($selectName, $optionValue, $optionText) { @@ -70,7 +70,7 @@ OUT; $this->assertTrue($option->isSelected()); } - public function testElementSelectedStateCheckDataProvider() + public function elementSelectedStateCheckDataProvider() { return array( array('select_number', '30', 'thirty'),
Corrected data provider name Having data provider methods starting with "test" will make PHPUnit consider them as tests. This has the following effects: - method is called more then once, depending on the code it might cause issues - PHPUnit in strict mode will complain that the data provider method does not do any assertions
diff --git a/lib/session.js b/lib/session.js index <HASH>..<HASH> 100644 --- a/lib/session.js +++ b/lib/session.js @@ -484,8 +484,8 @@ Link.prototype.flowReceived = function(flowFrame) { if (flowFrame.handle !== null) { this.available = flowFrame.available; this.deliveryCount = flowFrame.deliveryCount; - this.linkCredit = flowFrame.linkCredit - this.totalCredits; - this.totalCredits = flowFrame.linkCredit; + this.linkCredit = flowFrame.linkCredit; + this.totalCredits += flowFrame.linkCredit; debug('Adding Credits ('+this.linkCredit+','+this.session._sessionParams.remoteIncomingWindow+')'); } this.emit(Link.CreditChange, this);
Fix credit for sending messages. EventHub seems to believe different things for sending and receiving link-credit, will follow up.
diff --git a/lib/add.js b/lib/add.js index <HASH>..<HASH> 100644 --- a/lib/add.js +++ b/lib/add.js @@ -12,8 +12,6 @@ exports.run = function(config, info) { var user = jsonfile.readFileSync(config.apiFile); - console.log(user.token, config.host.url + '/add'); - request.post(config.host.url + '/add', { 'form': { 'user': user.token,
Don't print out stuff on add
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,13 @@ from distutils.core import setup setup( - name = 'usonic', - packages = ['usonic'], - version = '0.0.1', - description = 'An ultrasonic distance measurement module using HC-SR04', - author = 'Macpaul Lin', - author_email = 'macpaul@gmail.com', - url = 'https://github.com/macpaul/usonic', - download_url = 'https://github.com/macpaul/usonic/tarball/0.0.1', - keywords = ['ultrasonic', 'raspberry', 'distance'], - classifiers = [], + name = 'usonic', + packages = ['usonic'], + version = '0.0.1', + description = 'An ultrasonic distance measurement module using HC-SR04', + author = 'Macpaul Lin', + author_email = 'macpaul@gmail.com', + url = 'https://github.com/macpaul/usonic', + download_url = 'https://github.com/macpaul/usonic/tarball/0.0.1', + keywords = ['ultrasonic', 'raspberry', 'distance'], + classifiers = [], )
setup.py: fix coding style Replace tab by 4 spaces.
diff --git a/src/python_bayeux/__init__.py b/src/python_bayeux/__init__.py index <HASH>..<HASH> 100644 --- a/src/python_bayeux/__init__.py +++ b/src/python_bayeux/__init__.py @@ -252,9 +252,10 @@ class BayeuxClient(object): if channel not in self.subscription_callbacks: self.subscription_callbacks[channel] = [] + self.subscription_queue.put(subscription_queue_message) + self.subscription_callbacks[channel].append(callback) - self.subscription_queue.put(subscription_queue_message) def _subscribe_greenlet(self): channel = None
Duh, only subscribe once even if we register more callbacks
diff --git a/src/Smalot/Magento/Customer/CustomerGroup.php b/src/Smalot/Magento/Customer/CustomerGroup.php index <HASH>..<HASH> 100644 --- a/src/Smalot/Magento/Customer/CustomerGroup.php +++ b/src/Smalot/Magento/Customer/CustomerGroup.php @@ -33,6 +33,6 @@ class CustomerGroup extends MagentoModuleAbstract */ public function getGroupList() { - return $this->__createAction('customer_group.ist', func_get_args()); + return $this->__createAction('customer_group.list', func_get_args()); } }
fix typo in getGroupList fix typo in getGroupList
diff --git a/lib/Doctrine/ORM/Query/Lexer.php b/lib/Doctrine/ORM/Query/Lexer.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/ORM/Query/Lexer.php +++ b/lib/Doctrine/ORM/Query/Lexer.php @@ -152,12 +152,15 @@ class Lexer extends \Doctrine\Common\Lexer return self::T_STRING; } else if (ctype_alpha($value[0]) || $value[0] === '_') { $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value); + if (defined($name)) { $type = constant($name); + if ($type > 100) { return $type; } } + return self::T_IDENTIFIER; } else if ($value[0] === '?' || $value[0] === ':') { return self::T_INPUT_PARAMETER; @@ -172,7 +175,7 @@ class Lexer extends \Doctrine\Common\Lexer case '<': return self::T_LOWER_THAN; case '+': return self::T_PLUS; case '-': return self::T_MINUS; - case '*': return self::Ts_MULTIPLY; + case '*': return self::T_MULTIPLY; case '/': return self::T_DIVIDE; case '!': return self::T_NEGATE; case '{': return self::T_OPEN_CURLY_BRACE;
Reverted extensibility of Lexer. This is not ideal.
diff --git a/src/LazyStrings.php b/src/LazyStrings.php index <HASH>..<HASH> 100644 --- a/src/LazyStrings.php +++ b/src/LazyStrings.php @@ -164,7 +164,7 @@ class LazyStrings foreach ($csvFile as $csvRow) { if ($csvRow) { $lineId = $this->str->strip($csvFile[0]); - $strings[$lineId] = $csvRow; + $strings[$lineId] = $csvFile[1]; } } }
Force to always use first and second column values. Closes #6
diff --git a/classes/import.php b/classes/import.php index <HASH>..<HASH> 100644 --- a/classes/import.php +++ b/classes/import.php @@ -159,7 +159,7 @@ class Import $chunk->slotname = $xx['slotname']; $chunk->save(); - $images = $db->query( Database::SELECT, "select item_rid from relationship_partner inner join asset on item_rid = asset.id inner join asset_v on active_vid = asset_v.id where relationship_id in (select relationship_id from relationship_partner where item_tablename = 'tag' and item_rid = " . $xx['target_tag_rid'] . ") and item_tablename = 'asset' order by visiblefrom_timestamp desc" ); + $images = $db->query( Database::SELECT, "select item_rid from relationship_partner inner join asset on item_rid = asset.id inner join asset_v on active_vid = asset_v.id where relationship_id in (select relationship_id from relationship_partner where item_tablename = 'tag' and item_rid = " . $xx['target_tag_rid'] . ") and item_tablename = 'asset' and asset.deleted is null order by visiblefrom_timestamp desc" ); $first = true; foreach( $images as $image )
Added deleted check to importing slideshow images
diff --git a/dev/merge_spark_pr.py b/dev/merge_spark_pr.py index <HASH>..<HASH> 100755 --- a/dev/merge_spark_pr.py +++ b/dev/merge_spark_pr.py @@ -133,6 +133,8 @@ def merge_pr(pr_num, target_ref, title, body, pr_repo_desc): primary_author = raw_input( "Enter primary author in the format of \"name <email>\" [%s]: " % distinct_authors[0]) + if primary_author == "": + primary_author = distinct_authors[0] commits = run_cmd(['git', 'log', 'HEAD..%s' % pr_branch_name, '--pretty=format:%h [%an] %s']).split("\n\n")
[SPARK-<I>] [BUILD] Use default primary author if unspecified Fixes feature introduced in #<I> to use the default value if nothing is specified in command line cc liancheng rxin pwendell
diff --git a/tests/test_integration.py b/tests/test_integration.py index <HASH>..<HASH> 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -98,3 +98,22 @@ class TestSplitTD(BaseTestPycolator): self.assertEqual(el.attrib['{%s}decoy' % target_contents['ns']], 'false') for el in decoy_contents[feat]: self.assertEqual(el.attrib['{%s}decoy' % decoy_contents['ns']], 'true') + + +class TestMerge(BaseTestPycolator): + command = 'merge' + infilename = 'splittd_target_out.xml' + + def setUp(self): + super().setUp() + self.multifiles = [os.path.join(self.fixdir, 'splittd_decoy_out.xml')] + self.resultfn = os.path.join(self.workdir, self.infilename, + '_merged.xml') + + def test_merge(self): + options = ['--multifiles'] + options.extend(self.multifiles) + self.run_pycolator(self.command, options) + expected = self.read_percolator_out(os.path.join(self.fixdir, + 'percolator_out.xml')) + result = self.read_percolator_out(self.resultfn)
Made a start on integration test for merge
diff --git a/src/DependencyInjection/Compiler/PropelEventPass.php b/src/DependencyInjection/Compiler/PropelEventPass.php index <HASH>..<HASH> 100644 --- a/src/DependencyInjection/Compiler/PropelEventPass.php +++ b/src/DependencyInjection/Compiler/PropelEventPass.php @@ -29,7 +29,7 @@ class PropelEventPass implements CompilerPassInterface $isClass = !empty($tag['class']); if ($isListener) { - $priority = (int) @$tag['priority']; + $priority = array_key_exists('priority', $tag) ? (int)$tag['priority'] : 0; if ($isClass) { $classDefinition->addMethodCall('addListener', array(
Update PropelEventPass.php Suppressing of error by operator "@" will produce hidden warning in logs, would be faster to use array_key_exists instead "@"
diff --git a/src/resources/views/character/includes/menu.blade.php b/src/resources/views/character/includes/menu.blade.php index <HASH>..<HASH> 100644 --- a/src/resources/views/character/includes/menu.blade.php +++ b/src/resources/views/character/includes/menu.blade.php @@ -4,9 +4,9 @@ @foreach($menu as $menu_entry) - <li role="presentation" class="@if ($viewname == $menu_entry['highlight_view']) active @endif"> + <li role="presentation" class="nav-item"> - <a href="{{ route($menu_entry['route'], $summary->character_id) }}"> + <a href="{{ route($menu_entry['route'], $summary->character_id) }}" class="nav-link @if ($viewname == $menu_entry['highlight_view']) active @endif"> @if (array_key_exists('label', $menu_entry)) @if(array_key_exists('plural', $menu_entry)) {{ trans_choice($menu_entry['label'], 2) }}
feat(deps): upgrade character menu
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,10 @@ var Individual = require("individual") var cuid = require("cuid") +var globalDocument = require("global/document") var DOMDelegator = require("./dom-delegator.js") -var delegatorCache = Individual("__DOM_DELEGATOR_CACHE@8", { +var delegatorCache = Individual("__DOM_DELEGATOR_CACHE@9", { delegators: {} }) var commonEvents = [ @@ -26,14 +27,13 @@ module.exports = Delegator function Delegator(opts) { opts = opts || {} - var document = opts.document + var document = opts.document || globalDocument - var cacheKey = document ? - document["__DOM_DELEGATOR_CACHE_TOKEN@8"] : "global" + var cacheKey = document["__DOM_DELEGATOR_CACHE_TOKEN@9"] if (!cacheKey) { cacheKey = - document["__DOM_DELEGATOR_CACHE_TOKEN@8"] = cuid() + document["__DOM_DELEGATOR_CACHE_TOKEN@9"] = cuid() } var delegator = delegatorCache.delegators[cacheKey]
changed the cache to be based on documents
diff --git a/src/lang/object.js b/src/lang/object.js index <HASH>..<HASH> 100644 --- a/src/lang/object.js +++ b/src/lang/object.js @@ -61,33 +61,6 @@ if (!Object.defineProperty) { }; } -/** - * Can be used to mix modules, to combine abilities - * @name mixin - * @memberOf external:Object# - * @function - * @param {Object} obj the object you want to throw in the mix - */ -Object.defineProperty(Object.prototype, "mixin", { - value: function (obj) { - var i, - self = this; - - // iterate over the mixin properties - for (i in obj) { - // if the current property belongs to the mixin - if (obj.hasOwnProperty(i)) { - // add the property to the mix - self[i] = obj[i]; - } - } - // return the mixed object - return self; - }, - enumerable : false, - configurable : false -}); - if (typeof Object.create !== "function") { /** * Prototypal Inheritance Create Helper
[#<I>] Remove Object.prototype.mixin, as it creates a compatibility issue with other libraries (notably socket.io) - This method is not used anywhere in melonJS core. - keep melonJS lightweight! [#<I>]
diff --git a/lib/index_shotgun/analyzer.rb b/lib/index_shotgun/analyzer.rb index <HASH>..<HASH> 100644 --- a/lib/index_shotgun/analyzer.rb +++ b/lib/index_shotgun/analyzer.rb @@ -10,7 +10,10 @@ module IndexShotgun # Search duplicate index # @return [String] result message def perform - tables = ActiveRecord::Base.connection.tables + tables = + ActiveSupport::Deprecation.silence do + ActiveRecord::Base.connection.tables + end tables.reject! { |table| EXCLUDE_TABLES.include?(table) } duplicate_indexes =
[Resolve] DEPRECATION WARNING: #tables currently returns both tables and views. This behavior is deprecated and will be changed with Rails <I> to only return tables. Use #data_sources instead. (called from block in perform at /Users/sue<I>/dev/workspace/github.com/sue<I>/index_shotgun/lib/index_shotgun/analyzer.rb:<I>) I want to get only tables here
diff --git a/abilian/web/forms/widgets.py b/abilian/web/forms/widgets.py index <HASH>..<HASH> 100644 --- a/abilian/web/forms/widgets.py +++ b/abilian/web/forms/widgets.py @@ -1394,7 +1394,7 @@ class Select2Ajax(object): s2_params = {} s2_params.update(self.s2_params) s2_params['ajax'] = {'url': unicode(field.ajax_source)} - s2_params['placeholder'] = field.label.text + s2_params['placeholder'] = unicode(field.label.text) if not field.flags.required: s2_params['allowClear'] = True
fix TB when placeholder is a lazy_gettext object
diff --git a/app.py b/app.py index <HASH>..<HASH> 100644 --- a/app.py +++ b/app.py @@ -1,13 +1,21 @@ import os, sys import datetime +import logging +from functools import wraps from random import choice, seed, getstate, setstate from ConfigParser import ConfigParser +# Importing flask from flask import Flask, render_template, request, Response, make_response -from functools import wraps -import logging +# Sqlalchemy imports +from sqlalchemy import create_engine +from sqlalchemy import Column, Integer, String, DateTime, Boolean, Text +from sqlalchemy import or_ +from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy.orm import sessionmaker + configfilepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.txt') @@ -131,11 +139,6 @@ def get_people(people): # Define database class #---------------------------------------------- -from sqlalchemy import create_engine -from sqlalchemy import Column, Integer, String, DateTime, Boolean, Text -from sqlalchemy import or_ -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.orm import sessionmaker Base = declarative_base() class Participant(Base):
Just a little inconsequential cleanup.
diff --git a/lib/composable_operations/composed_operation.rb b/lib/composable_operations/composed_operation.rb index <HASH>..<HASH> 100644 --- a/lib/composable_operations/composed_operation.rb +++ b/lib/composable_operations/composed_operation.rb @@ -9,7 +9,7 @@ module ComposableOperations end def create(context, input = nil) - new input, Hash[Hash(@_options).map do |key, value| + new *Array(input), Hash[Array(@_options).map do |key, value| [key, value.kind_of?(Proc) ? context.instance_exec(&value) : value] end] end
Fixes ComposedOperation option parsing
diff --git a/lib/ast.js b/lib/ast.js index <HASH>..<HASH> 100644 --- a/lib/ast.js +++ b/lib/ast.js @@ -32,25 +32,28 @@ Interpolation.prototype.render = function* (context) { let resolvePromise = null; let rejectPromise = null; + let end = false; const readableListener = () => resolvePromise(); const errorListener = err => rejectPromise(err); src.on('readable', readableListener); - src.on('end', readableListener); + src.on('end', () => { end = true; readableListener(); }); src.on('error', errorListener); - while (true) { + while (!end) { yield new Promise((resolve, reject) => { resolvePromise = resolve; rejectPromise = reject; }); - const chunk = src.read(); + while (!end) { + const chunk = src.read(); - if (chunk === null) break; + if (chunk === null) break; - if (this.verbatim) yield chunk; - else yield* escape(chunk); + if (this.verbatim) yield chunk; + else yield* escape(chunk); + } } src.removeListener('error', errorListener);
Update stream reading to what I currently believe is correct
diff --git a/js/types/bars.js b/js/types/bars.js index <HASH>..<HASH> 100644 --- a/js/types/bars.js +++ b/js/types/bars.js @@ -169,6 +169,7 @@ Flotr.addType('bars', { context.save(); context.translate(options.offsetLeft, options.offsetTop); + this.translate(context, options.horizontal); context.clearRect( geometry.left - lineWidth, geometry.top - lineWidth,
Added translate to clear horizontal hits.