Class: FallCli::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/fallcli/cli.rb

Instance Method Summary collapse

Instance Method Details

#authorizeObject



26
27
28
# File 'lib/fallcli/cli.rb', line 26

def authorize
  Middleware.sequence_authorize.call({})
end

#browserObject



33
34
35
# File 'lib/fallcli/cli.rb', line 33

def browser
  Middleware.sequence_browser.call({})
end

#get_keysObject



51
52
53
54
55
56
57
58
59
60
# File 'lib/fallcli/cli.rb', line 51

def get_keys
  say "Please open this URL from your Browser, and login: https://www.dropbox.com/developers/apps"
  say "Click \"Create app\" button, and choose the following options:"
  say "Type: Dropbox API app"
  say "Data: Files and Datastores"
  say "Permission type: Full Dropbox"
  say "File Types: All file types"
  say "App name: FallCli#{Time.now.to_i}"
  say "Cick on the \"Create\" button, and note down the 'app key' and 'app secret'"
end

#help(meth = nil) ⇒ Object



16
17
18
19
20
21
# File 'lib/fallcli/cli.rb', line 16

def help(meth=nil)
  super
  if !meth
    say "To learn more or to contribute, please see github.com/petems/fallcli"
  end
end

#uploader_browserObject



40
41
42
# File 'lib/fallcli/cli.rb', line 40

def uploader_browser
  Middleware.sequence_upload_browser.call({})
end

#verifyObject



46
47
48
# File 'lib/fallcli/cli.rb', line 46

def verify
  Middleware.sequence_verify.call({})
end

#versionObject



63
64
65
# File 'lib/fallcli/cli.rb', line 63

def version
  say "FallCli #{FallCli::VERSION}"
end