Module: PivoFlow::State

Extended by:
State
Included in:
Cli, Pivotal, State
Defined in:
lib/pivo_flow/state.rb

Instance Method Summary collapse

Instance Method Details

#current_branch_nameObject



5
6
7
# File 'lib/pivo_flow/state.rb', line 5

def current_branch_name
  Grit::Repo.new(Dir.pwd).head.name
end

#current_story_idObject



17
18
19
20
21
# File 'lib/pivo_flow/state.rb', line 17

def current_story_id
  return nil unless File.exist?(current_story_id_file_path)

  File.read(current_story_id_file_path)
end

#current_story_id_file_pathObject



13
14
15
# File 'lib/pivo_flow/state.rb', line 13

def current_story_id_file_path
  File.join(story_id_tmp_path, current_branch_name)
end

#story_id_tmp_pathObject



9
10
11
# File 'lib/pivo_flow/state.rb', line 9

def story_id_tmp_path
  "#{Dir.pwd}/tmp/.pivo_flow/stories"
end