lib/spoom/cli/bump.rb in spoom-1.2.0 vs lib/spoom/cli/bump.rb in spoom-1.2.1

- old
+ new

@@ -52,10 +52,11 @@ to = options[:to] force = options[:force] dry = options[:dry] only = options[:only] cmd = options[:suggest_bump_command] + directory = File.expand_path(directory) exec_path = File.expand_path(self.exec_path) unless Sorbet::Sigils.valid_strictness?(from) say_error("Invalid strictness `#{from}` for option `--from`") exit(1) @@ -71,14 +72,12 @@ exit(1) end say("Checking files...") - directory = File.expand_path(directory) - files_to_bump = Sorbet::Sigils.files_with_sigil_strictness(directory, from) - - files_from_config = context.srb_files.map { |file| File.expand_path(file) } - files_to_bump.select! { |file| files_from_config.include?(file) } + files_to_bump = context.srb_files_with_strictness(from, include_rbis: false) + .map { |file| File.expand_path(file, context.absolute_path) } + .select { |file| file.start_with?(directory) } if only list = File.read(only).lines.map { |file| File.expand_path(file.strip) } files_to_bump.select! { |file| list.include?(File.expand_path(file)) } end