build-cloud 0.0.10 → 0.0.11

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: b46efc757b6cc4e2d30df4b845e6472719f680e2
4
- data.tar.gz: 713e03740e84b1f99bf58d1c2adba9bf0c9ad6b0
3
+ metadata.gz: 5ce7d885b72b7593b17233987dc7c3324654df41
4
+ data.tar.gz: 7efd51bc6a75e8a0f3261ea841a4a5137f9acdbd
5
5
  SHA512:
6
- metadata.gz: cc19de13443897e1d5aaa15f9d7e03696298b82821f420cea175e543eb954788186e97f893460df6d8f4920c3bc71574b09fa3227117138cef5f805e54c4a56a
7
- data.tar.gz: 9707da8ae27fc6bb54a4d05ed8bbab7a9a6965193d8c508f237fb85446893917eccc7dc1c79c94c19e242f9d210a3852ca321e8a063586758cb09c71c43ee06c
6
+ metadata.gz: 35cb9ddcce62def01bf5d1f1dbd4f1c34a07f1135e78aaa334449471e96ebc2f754465f385725716cb10b421feb2205a39e9b6c316dbcff1b1f100c06c89f7ac
7
+ data.tar.gz: ecedfa232cedb594acd795d2f0ed12a45159743689cdeea9c7ec8620e78254131a3fd8a3c89e1a4cd21f0d6ec1cd8062a89ff93fa43da0e4f603891b3071a93c
data/build-cloud.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "build-cloud"
7
- spec.version = "0.0.10"
7
+ spec.version = "0.0.11"
8
8
  spec.authors = ["The Scale Factory"]
9
9
  spec.email = ["info@scalefactory.com"]
10
10
  spec.summary = %q{Tools for building resources in AWS}
data/lib/build-cloud.rb CHANGED
@@ -245,26 +245,23 @@ class BuildCloud
245
245
 
246
246
  @mock and Fog.mock!
247
247
 
248
- fog_options = {
248
+ fog_options_regionless = {
249
249
  :aws_access_key_id => @config[:aws_access_key_id] ||= ENV['AWS_ACCESS_KEY'],
250
250
  :aws_secret_access_key => @config[:aws_secret_access_key] ||= ENV['AWS_SECRET_KEY'],
251
- :region => @config[:aws_region],
252
251
  }
253
252
 
253
+ fog_options = fog_options_regionless.merge( { :region => @config[:aws_region] } )
254
+
254
255
  @fog_interfaces = {
255
256
 
256
257
  :compute => Fog::Compute::AWS.new( fog_options ),
257
258
  :s3 => Fog::Storage::AWS.new( fog_options ),
258
259
  :as => Fog::AWS::AutoScaling.new( fog_options ),
259
260
  :elb => Fog::AWS::ELB.new( fog_options ),
260
- :iam => Fog::AWS::IAM.new( fog_options ),
261
+ :iam => Fog::AWS::IAM.new( fog_options_regionless ),
261
262
  :rds => Fog::AWS::RDS.new( fog_options ),
262
263
  :elasticache => Fog::AWS::Elasticache.new( fog_options ),
263
- :r53 => Fog::DNS::AWS.new(
264
- :aws_access_key_id => @config[:aws_access_key_id] ||= ENV['AWS_ACCESS_KEY'],
265
- :aws_secret_access_key => @config[:aws_secret_access_key] ||= ENV['AWS_SECRET_KEY'],
266
- )
267
-
264
+ :r53 => Fog::DNS::AWS.new( fog_options_regionless )
268
265
  }
269
266
 
270
267
  end
@@ -36,6 +36,8 @@ class BuildCloud::IAMRole
36
36
 
37
37
  @log.debug( role.inspect )
38
38
 
39
+ @iam.create_instance_profile( @options[:rolename] )
40
+
39
41
  policies.each do |policy|
40
42
 
41
43
  @log.debug( "Adding policy #{policy}" )
@@ -45,11 +47,10 @@ class BuildCloud::IAMRole
45
47
  @iam.put_role_policy( @options[:rolename], policy[:policy_name],
46
48
  policy_document )
47
49
 
48
- @iam.create_instance_profile( @options[:rolename] )
49
- @iam.add_role_to_instance_profile( @options[:rolename], @options[:rolename] )
50
-
51
50
  end
52
51
 
52
+ @iam.add_role_to_instance_profile( @options[:rolename], @options[:rolename] )
53
+
53
54
  end
54
55
 
55
56
  def read
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Scale Factory
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-14 00:00:00.000000000 Z
11
+ date: 2015-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler