Class: Sly::Installer
- Inherits:
-
Object
- Object
- Sly::Installer
- Defined in:
- lib/sly/installer.rb
Class Method Summary collapse
Class Method Details
.process(username, password) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/sly/installer.rb', line 5 def self.process(username, password) connector = Sly::Connector.new({email: username, api_key: password}) results = connector.authenticate! if success_call?(results) create_file(username, password) $stdout.write "Thanks! Your details are currently stored in ~/.slyrc to authorise your interactions using the Sprint.ly CLI\n" else raise "The details provided were incorrect, please check your details and try again." end end |
.validate_install! ⇒ Object
17 18 19 20 21 |
# File 'lib/sly/installer.rb', line 17 def self.validate_install! unless File.exist?(ENV["HOME"]+"/.slyrc") raise "You have not setup Sly on your machine yet, please run the sly install command first." end end |