Class: GitReport::Supplier

Inherits:
Object
  • Object
show all
Defined in:
lib/supplier.rb

Class Method Summary collapse

Class Method Details

.commits(options) ⇒ Object

returns the commits in relation to the given option



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/supplier.rb', line 6

def self.commits options
  raise "No option given to fetch commits" unless options
  case options
  when :last_and_stored
    last_and_stored_commits
  when :stored
    stored_commits
  when :history
    # history_commits :user #slow
    history_commits :all    #fast

    # we sort out the foreign commits on the server if the user has a single user account
    # this way we can realize company accounts and already have all the data we need during import
  else
    []
  end
end