dumbwaiter 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/dumbwaiter.gemspec +2 -0
- data/lib/dumbwaiter/app.rb +4 -4
- data/lib/dumbwaiter/deployment.rb +2 -2
- data/lib/dumbwaiter/instance.rb +2 -2
- data/lib/dumbwaiter/layer.rb +3 -3
- data/lib/dumbwaiter/stack.rb +4 -4
- data/lib/dumbwaiter/user_profile.rb +2 -2
- data/lib/dumbwaiter/version.rb +1 -1
- data/spec/lib/dumbwaiter/cli_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +31 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f07abe08ad61040b43326ec526ee5a6930f616f5
|
4
|
+
data.tar.gz: c86f8c85c6bd815c388e960f8bf58953599a1c60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dc9e781df21d92dd5600581849b9d9ea56a254755221b5c1de0f08b47fdf753b7b645571c75dce4664049b6789ff04013a05d7b38e6c03eab20ce8e798891d7
|
7
|
+
data.tar.gz: b77aa184723aae99096c4cdb30c0ed7e4cb1cf6498734c118a82dda7c00cdfe4e5a2bae3097ed510f6144fe81c720c4e3ee9dd31ab0db37b92cd7f27258974cb
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1
|
1
|
+
2.2.1
|
data/dumbwaiter.gemspec
CHANGED
@@ -25,5 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
26
26
|
spec.add_development_dependency "gem-release"
|
27
27
|
spec.add_development_dependency "rspec"
|
28
|
+
spec.add_development_dependency "rspec-its"
|
29
|
+
spec.add_development_dependency "rspec-collection_matchers"
|
28
30
|
spec.add_development_dependency "faker"
|
29
31
|
end
|
data/lib/dumbwaiter/app.rb
CHANGED
@@ -5,23 +5,23 @@ class Dumbwaiter::App
|
|
5
5
|
|
6
6
|
attr_reader :stack, :opsworks_app, :opsworks
|
7
7
|
|
8
|
-
def self.all(stack, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
8
|
+
def self.all(stack, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
9
9
|
opsworks.describe_apps(stack_id: stack.id).apps.map { |app| new(stack, app, opsworks) }
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.find(stack, app_name, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
12
|
+
def self.find(stack, app_name, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
13
13
|
app = all(stack, opsworks).detect { |app| app.name == app_name }
|
14
14
|
raise NotFound.new("No app found with name #{app_name}") if app.nil?
|
15
15
|
app
|
16
16
|
end
|
17
17
|
|
18
|
-
def self.find_by_id(stack, app_id, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
18
|
+
def self.find_by_id(stack, app_id, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
19
19
|
app = all(stack, opsworks).detect { |app| app.id == app_id }
|
20
20
|
raise NotFound.new("No app found with id #{app_id}") if app.nil?
|
21
21
|
app
|
22
22
|
end
|
23
23
|
|
24
|
-
def initialize(stack, opsworks_app, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
24
|
+
def initialize(stack, opsworks_app, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
25
25
|
@stack = stack
|
26
26
|
@opsworks_app = opsworks_app
|
27
27
|
@opsworks = opsworks
|
@@ -4,11 +4,11 @@ require "dumbwaiter/user_profile"
|
|
4
4
|
class Dumbwaiter::Deployment
|
5
5
|
attr_reader :stack, :opsworks_deployment, :opsworks
|
6
6
|
|
7
|
-
def self.all(stack, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
7
|
+
def self.all(stack, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
8
8
|
opsworks.describe_deployments(stack_id: stack.id).deployments.map { |d| new(stack, d, opsworks) }
|
9
9
|
end
|
10
10
|
|
11
|
-
def initialize(stack, opsworks_deployment, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
11
|
+
def initialize(stack, opsworks_deployment, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
12
12
|
@stack = stack
|
13
13
|
@opsworks_deployment = opsworks_deployment
|
14
14
|
@opsworks = opsworks
|
data/lib/dumbwaiter/instance.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
class Dumbwaiter::Instance
|
2
2
|
attr_reader :layer, :opsworks_instance, :opsworks
|
3
3
|
|
4
|
-
def self.all(layer, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
4
|
+
def self.all(layer, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
5
5
|
instances = opsworks.describe_instances(layer_id: layer.id).instances
|
6
6
|
instances.map { |instance| new(layer, instance, opsworks) }
|
7
7
|
end
|
8
8
|
|
9
|
-
def initialize(layer, opsworks_instance, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
9
|
+
def initialize(layer, opsworks_instance, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
10
10
|
@layer = layer
|
11
11
|
@opsworks_instance = opsworks_instance
|
12
12
|
@opsworks = opsworks
|
data/lib/dumbwaiter/layer.rb
CHANGED
@@ -5,17 +5,17 @@ class Dumbwaiter::Layer
|
|
5
5
|
|
6
6
|
class NotFound < Exception; end
|
7
7
|
|
8
|
-
def self.all(stack, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
8
|
+
def self.all(stack, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
9
9
|
opsworks.describe_layers(stack_id: stack.id).layers.map { |layer| new(stack, layer, opsworks) }
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.find(stack, layer_name, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
12
|
+
def self.find(stack, layer_name, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
13
13
|
layer = all(stack, opsworks).detect { |layer| layer.shortname == layer_name }
|
14
14
|
raise NotFound.new("No layer found with name #{layer_name}") if layer.nil?
|
15
15
|
layer
|
16
16
|
end
|
17
17
|
|
18
|
-
def initialize(stack, opsworks_layer, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
18
|
+
def initialize(stack, opsworks_layer, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
19
19
|
@stack = stack
|
20
20
|
@opsworks_layer = opsworks_layer
|
21
21
|
@opsworks = opsworks
|
data/lib/dumbwaiter/stack.rb
CHANGED
@@ -7,23 +7,23 @@ class Dumbwaiter::Stack
|
|
7
7
|
|
8
8
|
class NotFound < Exception; end
|
9
9
|
|
10
|
-
def self.all(opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
10
|
+
def self.all(opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
11
11
|
opsworks.describe_stacks.stacks.map { |stack| new(stack, opsworks) }
|
12
12
|
end
|
13
13
|
|
14
|
-
def self.find(stack_name, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
14
|
+
def self.find(stack_name, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
15
15
|
stack = all(opsworks).detect { |stack| stack.name == stack_name }
|
16
16
|
raise NotFound.new("No stack found with name #{stack_name}") if stack.nil?
|
17
17
|
stack
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.find_by_id(stack_id, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
20
|
+
def self.find_by_id(stack_id, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
21
21
|
stack = all(opsworks).detect { |stack| stack.id == stack_id }
|
22
22
|
raise NotFound.new("No stack found with id #{stack_id}") if stack.nil?
|
23
23
|
stack
|
24
24
|
end
|
25
25
|
|
26
|
-
def initialize(opsworks_stack, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
26
|
+
def initialize(opsworks_stack, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
27
27
|
@opsworks = opsworks
|
28
28
|
@opsworks_stack = opsworks_stack
|
29
29
|
end
|
@@ -5,7 +5,7 @@ class Dumbwaiter::UserProfile
|
|
5
5
|
@cache ||= {}
|
6
6
|
end
|
7
7
|
|
8
|
-
def self.find(iam_user_arn, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
8
|
+
def self.find(iam_user_arn, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
9
9
|
return nil if iam_user_arn.nil?
|
10
10
|
unless cache.has_key?(iam_user_arn)
|
11
11
|
cache[iam_user_arn] = opsworks.describe_user_profiles(iam_user_arns: [iam_user_arn]).user_profiles.detect { |p| p.iam_user_arn == iam_user_arn }
|
@@ -13,7 +13,7 @@ class Dumbwaiter::UserProfile
|
|
13
13
|
cache[iam_user_arn]
|
14
14
|
end
|
15
15
|
|
16
|
-
def initialize(opsworks_user_profile, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
|
16
|
+
def initialize(opsworks_user_profile, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
|
17
17
|
@opsworks_user_profile = opsworks_user_profile
|
18
18
|
@opsworks = opsworks
|
19
19
|
end
|
data/lib/dumbwaiter/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -3,6 +3,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
require "dumbwaiter"
|
5
5
|
require "dumbwaiter/mock"
|
6
|
+
require "rspec/its"
|
7
|
+
require 'rspec/collection_matchers'
|
6
8
|
|
7
9
|
Aws.config = {access_key_id: "tacos", secret_access_key: "secret chocolate"}
|
8
10
|
I18n.enforce_available_locales = false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dumbwaiter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doc Ritezel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -94,6 +94,34 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec-its
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec-collection_matchers
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: faker
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
196
|
version: '0'
|
169
197
|
requirements: []
|
170
198
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
199
|
+
rubygems_version: 2.4.5
|
172
200
|
signing_key:
|
173
201
|
specification_version: 4
|
174
202
|
summary: Monitor, deploy and maintain your Opsworks application stacks
|