Class: Pipe2me::CLI
- Inherits:
-
Thor
- Object
- Thor
- Pipe2me::CLI
- Defined in:
- lib/pipe2me/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
- #check ⇒ Object
- #clear ⇒ Object
- #env(*args) ⇒ Object
- #setup ⇒ Object
- #start ⇒ Object
- #update ⇒ Object
- #verify ⇒ Object
- #version ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
35 |
# File 'lib/pipe2me/cli.rb', line 35 def self.exit_on_failure?; true; end |
Instance Method Details
#check ⇒ Object
82 83 84 85 86 |
# File 'lib/pipe2me/cli.rb', line 82 def check Pipe2me::Tunnel.check end |
#clear ⇒ Object
102 103 104 105 106 107 108 109 |
# File 'lib/pipe2me/cli.rb', line 102 def clear UI.error "This will remove the configuration in #{Dir.getwd}. Continue? (^C to cancel)" STDIN.gets Pipe2me::Tunnel.clear end |
#env(*args) ⇒ Object
60 61 62 63 64 65 |
# File 'lib/pipe2me/cli.rb', line 60 def env(*args) puts File.read("pipe2me.local.inc") puts File.read("pipe2me.info.inc") end |
#setup ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/pipe2me/cli.rb', line 49 def setup Pipe2me.server = [:server] server_info = Pipe2me::Tunnel.setup update puts server_info[:fqdn] end |
#start ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/pipe2me/cli.rb', line 89 def start Pipe2me::Tunnel.tunnels.each do |tunnel| UI.info "Setting up", tunnel end cmd = Pipe2me::Tunnel.command UI.info cmd Kernel.exec cmd end |
#update ⇒ Object
75 76 77 78 79 |
# File 'lib/pipe2me/cli.rb', line 75 def update Pipe2me::Tunnel.update end |