Class: Shaman::Deploy
Instance Method Summary collapse
- #deploy ⇒ Object
-
#initialize(args, options) ⇒ Deploy
constructor
A new instance of Deploy.
Methods included from Helpers
Constructor Details
#initialize(args, options) ⇒ Deploy
Returns a new instance of Deploy.
5 6 7 8 9 10 |
# File 'lib/shaman/deploy.rb', line 5 def initialize(args, ) error!('Must specify environment') if args.count != 1 @environment = args.first = end |
Instance Method Details
#deploy ⇒ Object
12 13 14 15 16 |
# File 'lib/shaman/deploy.rb', line 12 def deploy prompt.ok "Connecting to #{LABS_URL}/api/v1/releases" response = HTTP.post("#{LABS_URL}/api/v1/releases", form: ) response.code == 200 ? prompt.ok(response.body.to_s) : prompt.error(response.body.to_s) end |