Class: Nrcmd::CLI
- Inherits:
-
Thor
- Object
- Thor
- Nrcmd::CLI
- Defined in:
- lib/nrcmd/cli.rb
Constant Summary collapse
- URL =
'https://api.newrelic.com/v2'
Instance Method Summary collapse
- #configure ⇒ Object
-
#initialize(*args) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
Instance Method Details
#configure ⇒ Object
36 37 38 39 40 41 |
# File 'lib/nrcmd/cli.rb', line 36 def configure your_api_key = ask("Your NewRelic Api Key: ", :echo => false) conf = eval File.read "#{Dir.pwd}/nrcmd_config.rb" conf.merge! Hash[ :nr_api_key => your_api_key ] File.write("#{Dir.home}/.nrcmd_config.rb", PP.pp(conf, '')) end |