Module: PivoFlow::State
Instance Method Summary collapse
- #current_branch_name ⇒ Object
- #current_story_id ⇒ Object
- #current_story_id_file_path ⇒ Object
- #story_id_tmp_path ⇒ Object
Instance Method Details
#current_branch_name ⇒ Object
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_id ⇒ Object
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_path ⇒ Object
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_path ⇒ Object
9 10 11 |
# File 'lib/pivo_flow/state.rb', line 9 def story_id_tmp_path "#{Dir.pwd}/tmp/.pivo_flow/stories" end |