Class: GitSpec::Status
- Inherits:
-
Object
- Object
- GitSpec::Status
- Defined in:
- lib/git_spec/status.rb
Class Method Summary collapse
Instance Method Summary collapse
- #changed_files ⇒ Object
-
#initialize(logger = GitSpec.logger) ⇒ Status
constructor
A new instance of Status.
Constructor Details
Class Method Details
.changed_files ⇒ Object
26 27 28 |
# File 'lib/git_spec/status.rb', line 26 def self.changed_files new.changed_files end |
Instance Method Details
#changed_files ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/git_spec/status.rb', line 7 def changed_files changed_files = (filenames).each_with_object([]) do |filename, changed| file = File.new(filename) excluded, excluded_reason = file.excluded? if excluded @logger.debug "Excluding #{file.spec_path} with reason: #{excluded_reason}" else changed << file @logger.debug "Including #{file.spec_path}" end end changed_files.uniq{|f| f.spec_path} rescue => e # TODO: Log helpful info when this happens raise end |