mirror of
https://github.com/tomgi/git_stats.git
synced 2024-11-18 01:20:42 +01:00
1cc3198955
The current statistics refer to the complete git repository. With this commit it is possible to generate statistics on a given tree.
33 lines
866 B
Ruby
33 lines
866 B
Ruby
# -*- encoding : utf-8 -*-
|
|
FactoryGirl.define do
|
|
initialize_with { new(attributes) }
|
|
|
|
factory :repo, class: GitStats::GitData::Repo do
|
|
path "repo_path"
|
|
factory :test_repo do
|
|
path 'spec/integration/test_repo'
|
|
end
|
|
factory :test_repo_tree do
|
|
path 'spec/integration/test_repo_tree'
|
|
end
|
|
end
|
|
|
|
factory :author, class: GitStats::GitData::Author do
|
|
sequence(:name) { |i| "author#{i}" }
|
|
sequence(:email) { |i| "author#{i}@gmail.com" }
|
|
association :repo, strategy: :build
|
|
end
|
|
|
|
factory :commit, class: GitStats::GitData::Commit do
|
|
sequence(:sha) { |i| i }
|
|
sequence(:stamp) { |i| i }
|
|
sequence(:date) { |i| Date.new(i) }
|
|
association :repo, strategy: :build
|
|
association :author, strategy: :build
|
|
end
|
|
|
|
factory :tree, class: GitStats::GitData::Tree do
|
|
association :repo, strategy: :build
|
|
end
|
|
|
|
end
|