ops_tasks 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed9eb4674e8381476681e2b8af47bcc0ddc15523
4
- data.tar.gz: 3b3e0b370677acbfdaa89d41ebb6d4318819d395
3
+ metadata.gz: 5aa650488646eed721ef0c1898c2dc51c0f91438
4
+ data.tar.gz: a8c42dc2aa985f2af9a25ab646125de9d2820d87
5
5
  SHA512:
6
- metadata.gz: cf6e8a3e3f81fa628b3d69c0a0cd2255279a98a9d89c062ee6ff830000aba66321908f1ad1f57feb8b67d6231649fb9fe70468cb0d673172ea2aa211dcd40abc
7
- data.tar.gz: 74acdc0706c9245b84448da3ce1ae34b5fc2c010a88d498308c20d23aad87c9cbbc6f2c9ab740f66e073c426825ae4e63eb556729e23390a54c363ad166c4d8f
6
+ metadata.gz: a90d9cb495cea9a065a925124ac095a6c39806346b8f17a468082fca8eab020d43aad82bf4ca2f8997e51a1040f045dd99454efb057c2c2a138ef9d4d47bd009
7
+ data.tar.gz: 165dfb8ac2f3ff8161de56daf88549c212f8ddc900dccf76e385c8d094b7ff4512133bc698b1cbbd1a446f2a0cee30fcd7d22264ec9645de431933da7ae259af
@@ -1,3 +1,3 @@
1
1
  module OpsTasks
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -45,13 +45,20 @@ namespace :production do
45
45
  end
46
46
 
47
47
  task :deploy => :environment do |t, args|
48
- server_type = ask("server type: ")
48
+ servers = ENV.keys.select{|k| k.match(/_stack/) && !k.match(/FIGARO/)}.map{|k| k.match(/(.+)_stack_id/)[1]}
49
+ say("\nSelect a server...")
50
+ choose do |menu|
51
+ servers.each do |server|
52
+ menu.choice server do @server_type = server end
53
+ end
54
+ menu.choice "quit" do exit end
55
+ end
49
56
  @deployment = OpsTasks::Deployment.new(
50
- layer_id: ENV["#{server_type}_layer_id"],
51
- stack_id: ENV["#{server_type}_stack_id"],
52
- recipe: ENV["#{server_type}_deploy_recipe"],
53
- project: ENV["#{server_type}_project_name"],
54
- room: ENV["#{server_type}_slack_channel"]
57
+ layer_id: ENV["#{@server_type}_layer_id"],
58
+ stack_id: ENV["#{@server_type}_stack_id"],
59
+ recipe: ENV["#{@server_type}_deploy_recipe"],
60
+ project: ENV["#{@server_type}_project_name"],
61
+ room: ENV["#{@server_type}_slack_channel"]
55
62
  )
56
63
  deploy_id = @deployment.deploy
57
64
  @deployment.wait_for_completion(deploy_id)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Prokesch