Class: DangerMigrations::Private::GitFilesystem
- Inherits:
-
T::Struct
- Object
- T::Struct
- DangerMigrations::Private::GitFilesystem
- Extended by:
- T::Sig
- Defined in:
- lib/danger-migrations/private/git.rb
Instance Method Summary collapse
- #added_files ⇒ Object
- #convert_to_filesystem(path) ⇒ Object
- #deleted_files ⇒ Object
- #diff(filename_on_disk) ⇒ Object
- #modified_files ⇒ Object
- #renamed_files ⇒ Object
Instance Method Details
#added_files ⇒ Object
39 40 41 |
# File 'lib/danger-migrations/private/git.rb', line 39 def added_files convert_from_filesystem(@git.added_files.to_a) end |
#convert_to_filesystem(path) ⇒ Object
49 50 51 |
# File 'lib/danger-migrations/private/git.rb', line 49 def convert_to_filesystem(path) Pathname(@root).join(path).to_s end |
#deleted_files ⇒ Object
34 35 36 |
# File 'lib/danger-migrations/private/git.rb', line 34 def deleted_files convert_from_filesystem(@git.deleted_files.to_a) end |
#diff(filename_on_disk) ⇒ Object
44 45 46 |
# File 'lib/danger-migrations/private/git.rb', line 44 def diff(filename_on_disk) @git.diff[filename_on_disk] end |
#modified_files ⇒ Object
29 30 31 |
# File 'lib/danger-migrations/private/git.rb', line 29 def modified_files convert_from_filesystem(@git.modified_files.to_a) end |
#renamed_files ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/danger-migrations/private/git.rb', line 19 def renamed_files @git.renamed_files.map do |f| { after: convert_file_from_filesystem(f[:after]), before: convert_file_from_filesystem(f[:before]), } end end |