Module: PivoFlow::State
Class Method Summary collapse
- .current_branch_name ⇒ Object
- .current_story_id ⇒ Object
- .current_story_id_file_path ⇒ Object
- .story_id_tmp_path ⇒ Object
Class 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
19 20 21 22 23 |
# File 'lib/pivo_flow/state.rb', line 19 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 16 17 |
# File 'lib/pivo_flow/state.rb', line 13 def current_story_id_file_path flat_branch_name = current_branch_name.gsub('/', '--') File.join(story_id_tmp_path, flat_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 |