Class: Proxyneitor::CLI
- Inherits:
-
Thor
- Object
- Thor
- Proxyneitor::CLI
- Defined in:
- lib/proxyneitor.rb
Instance Method Summary collapse
Instance Method Details
#create(app, port) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/proxyneitor.rb', line 10 def create(app, port) proxy = Proxyneitor::Base.new(app) proxy.create(port) say "All done!", :green say "NOTE: you have to add #{app}.dev to your /etc/hosts file", :yellow end |
#delete(app) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/proxyneitor.rb', line 20 def delete(app) answer = ask "Are you sure of removing app folder?", :limited_to => ['y', 'n'] if answer =~ /(y|Y)/ proxy = Proxyneitor::Base.new(app) proxy.remove say "All done!", :green else say "No deletes for today", :red end end |
#install ⇒ Object
36 37 38 39 40 |
# File 'lib/proxyneitor.rb', line 36 def install proxy = Proxyneitor::Base.new proxy.install([:reinstall]) say "All done!", :green end |
#list ⇒ Object
43 44 45 46 47 48 |
# File 'lib/proxyneitor.rb', line 43 def list say "All applications: \n\n", :green proxy = Proxyneitor::Base.new proxy.list say "\n\n" end |