class Proxyneitor::CLI

Public Instance Methods

create(app, port) click to toggle source
# 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) click to toggle source
# 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() click to toggle source
# File lib/proxyneitor.rb, line 36
def install
  proxy = Proxyneitor::Base.new
  proxy.install(options[:reinstall])
  say "All done!", :green
end
list() click to toggle source
# File lib/proxyneitor.rb, line 43
def list
  say "All applications: \n\n", :green
  proxy = Proxyneitor::Base.new
  proxy.list
  say "\n\n"
end