Class: Speccloak::FileFinder
- Inherits:
-
Object
- Object
- Speccloak::FileFinder
- Defined in:
- lib/speccloak/file_finder.rb
Instance Method Summary collapse
- #changed_files ⇒ Object
-
#initialize(cmd_runner, base) ⇒ FileFinder
constructor
A new instance of FileFinder.
Constructor Details
#initialize(cmd_runner, base) ⇒ FileFinder
Returns a new instance of FileFinder.
5 6 7 8 |
# File 'lib/speccloak/file_finder.rb', line 5 def initialize(cmd_runner, base) @cmd_runner = cmd_runner @base = base end |
Instance Method Details
#changed_files ⇒ Object
10 11 12 13 14 |
# File 'lib/speccloak/file_finder.rb', line 10 def changed_files tracked = @cmd_runner.call("git diff --name-only #{@base}").split("\n") untracked = @cmd_runner.call("git ls-files --others --exclude-standard").split("\n") (tracked + untracked).uniq end |