lib/autoproj/cli/cache.rb in autoproj-2.14.0 vs lib/autoproj/cli/cache.rb in autoproj-2.15.0

- old
+ new

@@ -1,9 +1,9 @@ # frozen_string_literal: true -require 'autoproj/cli/inspection_tool' -require 'autoproj/ops/cache' +require "autoproj/cli/inspection_tool" +require "autoproj/ops/cache" module Autoproj module CLI class Cache < InspectionTool def parse_gem_compile(string) @@ -11,34 +11,34 @@ name = scanner.scan(/[^\[]+/) level = 0 artifacts = [] artifact_include = nil - artifact_name = ''.dup + artifact_name = "".dup until scanner.eos? c = scanner.getch if level == 0 - raise ArgumentError, "expected '[' but got '#{c}'" unless c == '[' + raise ArgumentError, "expected '[' but got '#{c}'" unless c == "[" level = 1 include_c = scanner.getch if %w[+ -].include?(include_c) - artifact_include = (include_c == '+') - elsif include_c == ']' + artifact_include = (include_c == "+") + elsif include_c == "]" raise ArgumentError, "empty [] found in '#{string}'" else raise ArgumentError, "expected '+' or '-' but got '#{c}' in '#{string}'" end next end - if c == ']' + if c == "]" level -= 1 if level == 0 artifacts << [artifact_include, artifact_name] - artifact_name = ''.dup + artifact_name = "".dup next end end artifact_name << c @@ -73,12 +73,12 @@ [File.expand_path(argv.first, ws.root_dir), *argv[1..-1], options] end def run(cache_dir, *package_names, - keep_going: false, - packages: true, all: true, checkout_only: false, - gems: false, gems_compile: [], gems_compile_force: false) + keep_going: false, + packages: true, all: true, checkout_only: false, + gems: false, gems_compile: [], gems_compile_force: false) initialize_and_load finalize_setup cache_op = Autoproj::Ops::Cache.new(cache_dir, ws) if packages