Class: Bummr::CLI
- Inherits:
-
Thor
- Object
- Thor
- Bummr::CLI
- Defined in:
- lib/bummr/cli.rb
Instance Method Summary collapse
- #bisect ⇒ Object
- #check(fullcheck = true) ⇒ Object
- #remove_commit(sha) ⇒ Object
- #test ⇒ Object
- #update ⇒ Object
Methods included from Prompt
Methods included from Log
Instance Method Details
#bisect ⇒ Object
71 72 73 74 75 76 77 78 |
# File 'lib/bummr/cli.rb', line 71 def bisect check(false) if yes? "Would you like to bisect in order to find which gem is causing " + "your build to break? (y/n)" Bummr::Bisecter.instance.bisect end end |
#check(fullcheck = true) ⇒ Object
12 13 14 |
# File 'lib/bummr/cli.rb', line 12 def check(fullcheck=true) Bummr::Check.instance.check(fullcheck) end |
#remove_commit(sha) ⇒ Object
81 82 83 |
# File 'lib/bummr/cli.rb', line 81 def remove_commit(sha) Bummr::Remover.instance.remove_commit(sha) end |
#test ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/bummr/cli.rb', line 54 def test check(false) if yes? "Do you want to test the build now? (y/n)" system "bundle install" puts "Testing the build!".color(:green) if system(TEST_COMMAND) == false bisect else puts "Passed the build!".color(:green) puts "See log/bummr.log for details".color(:yellow) end end end |
#update ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/bummr/cli.rb', line 28 def update system("bundle install") display_info if yes? "Are you ready to use Bummr? (y/n)" check log("Bummr update initiated #{Time.now}") outdated_gems = Bummr::Outdated.instance.outdated_gems( all_gems: [:all], group: [:group], gem: [:gem] ) if outdated_gems.empty? puts "No outdated gems to update".color(:green) else Bummr::Updater.new(outdated_gems).update_gems git.rebase_interactive(BASE_BRANCH) test end else puts "Thank you!".color(:green) end end |