Class: Verat::Feature
- Inherits:
-
Object
- Object
- Verat::Feature
- Defined in:
- lib/verat/feature.rb
Class Method Summary collapse
Class Method Details
.finish(feature, options) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/verat/feature.rb', line 14 def self.finish(feature, ) puts "Finishing feature: #{feature}" repo = Git.open(Dir.pwd) branch = "feature/#{feature}" if repo.current_branch() != 'develop' and repo.is_branch?(branch) repo.checkout('develop') # Temporary fix until git adds options to the merge method system("git merge --no-ff #{branch}") else # Temporary fix until git adds options to the merge method system("git merge --no-ff #{branch}") end if ['delete'] then repo.branch("#{branch}").delete puts "Deleting branch: #{branch}" end puts "Finished succesfuly. Current branch: develop" end |
.start(feature) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/verat/feature.rb', line 5 def self.start(feature) puts "Creating branch: feature/#{feature}" repo = Git.open(Dir.pwd) repo.branch("feature/#{feature}").checkout puts "Branch created succesfuly. Current branch: feature/#{feature}" end |