Module: GitStory

Defined in:
lib/git_story.rb,
lib/git_story/version.rb

Constant Summary collapse

VERSION =
"0.2.2"

Instance Method Summary collapse

Instance Method Details

#commit_state_factoryObject



19
20
21
22
23
24
25
# File 'lib/git_story.rb', line 19

def commit_state_factory()
  renderer = PutsRenderer.new
  tracker_connector = TyphoeusTrackerConnector.new(tracker_project_ids, ENV['TRACKER_TOKEN'])
  state_mapper = TrackerFetchedMapper.new(renderer, tracker_connector)
  commit_processor = SplitAndMatchProcessor.new(state_mapper)
  ManualGitCommitLister.new(commit_processor)
end

#state(since, until_commit) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/git_story.rb', line 11

def state(since, until_commit)
  if ENV["TRACKER_TOKEN"].to_s.size == 0
    puts "Please, set TRACKER_TOKEN" 
    abort
  end
  commit_state_factory.list(since, until_commit)
end

#tracker_project_idsObject



27
28
29
# File 'lib/git_story.rb', line 27

def tracker_project_ids
  (ENV['TRACKER_PROJECT_ID'] || '').split(",")
end