Module: Metior::Adapter::Grit
- Includes:
- Metior::Adapter
- Defined in:
- lib/metior/adapter/grit.rb,
lib/metior/adapter/grit/actor.rb,
lib/metior/adapter/grit/commit.rb,
lib/metior/adapter/grit/repository.rb
Overview
The Metior implementation for Git using Grit
Defined Under Namespace
Classes: Actor, Commit, Repository
Instance Method Summary (collapse)
-
- (Object) load_file_stats
Loads the file stats for this commit from the repository.
Methods included from Metior::Adapter
#adapter, included, #support!, #supports?, #vcs
Instance Method Details
- (Object) load_file_stats
Loads the file stats for this commit from the repository
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/metior/adapter/grit/commit.rb', line 40 def load_file_stats @added_files = [] @modified_files = [] @deleted_files = [] @repo.raw_commit(@id).diffs.each do |diff| if diff.new_file @added_files << diff.b_path elsif diff.deleted_file @deleted_files << diff.b_path elsif diff.renamed_file @added_files << diff.b_path @deleted_files << diff.a_path else @modified_files << diff.b_path end end end |