build-cloud 0.0.18 → 0.0.19

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: 579be8b6270faf6e5d5c9c425ae4e0a26fa7287a
4
- data.tar.gz: 06f1c5e9c1aa4a8e9e785abac79d59a2adab88ad
3
+ metadata.gz: cc7f2cfe58332d3cb280dec151be0991e2aa506f
4
+ data.tar.gz: db1c91275e4b9ef9974d3cb45c44d791de3f371f
5
5
  SHA512:
6
- metadata.gz: f09d5b3317c9814f00809c5d0856a1ec5053bcba93d6025f409630cbbb275a5b0cd20e4b45d7748f5c9c3d52fd9152a01f84ecb2978981acae072fa401c8b035
7
- data.tar.gz: ae211e4faa641d435d383a23b730c075fe8a008bcf360caea2fb2a3ce93d6dab7d624db8b3bc9b30518fce8faba97438159811b9dfc1de7552e4d938b2678e8d
6
+ metadata.gz: 7291602cf9fbe70d4843522c29fea8f3f8495e41c056b5ee0fed5025570d70dc57dbf75daef844066d5f9af56e7906935a5da9eb7c9b1c97d7653fe5c4775be9
7
+ data.tar.gz: 0c680371b065004833014c0eca17277d3a8924af68c277fe5166d6f4ea8bc359d491d55491e7ece13372814403aa649fdd1a15981a1b12a1060570ec9d60b33a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Changelog
2
2
 
3
+ 2016-06-17 - version 0.0.19 - add sqs support
4
+
3
5
  2016-06-16 - version 0.0.18 - fix cache parameter group creation for elasticache
4
6
 
5
7
  2016-05-04 - version 0.0.17 - allow metrics to be enabled on an asg when it's created
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014, 2015 The Scale Factory Ltd
1
+ Copyright (c) 2014, 2015, 2016 The Scale Factory Ltd
2
2
 
3
3
  MIT License
4
4
 
data/bin/build-cloud CHANGED
@@ -29,6 +29,7 @@ require 'build-cloud/ebsvolume'
29
29
  require 'build-cloud/networkinterface'
30
30
  require 'build-cloud/internetgateway'
31
31
  require 'build-cloud/dhcpoptionsset'
32
+ require 'build-cloud/sqsqueue'
32
33
 
33
34
 
34
35
  options = {}
@@ -182,4 +183,3 @@ end
182
183
  if options[:pry]
183
184
  inf.pry
184
185
  end
185
-
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.18"
7
+ spec.version = "0.0.19"
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}
@@ -0,0 +1,46 @@
1
+ class BuildCloud::SQSQueue
2
+
3
+ include ::BuildCloud::Component
4
+
5
+ @@objects = []
6
+
7
+ def initialize ( fog_interfaces, log, options = {} )
8
+
9
+ @sqs = fog_interfaces[:sqs]
10
+ @log = log
11
+ @options = options
12
+
13
+ @log.debug( options.inspect )
14
+
15
+ required_options(:name)
16
+
17
+ end
18
+
19
+ def create
20
+
21
+ return if exists?
22
+
23
+ name = @options[:name]
24
+ @log.info( "Creating SQS queue #{@options[:name]}" )
25
+ @options.delete(:name)
26
+ @log.debug( "Options are: #{@options}" )
27
+ @sqs.create_queue(name, @options )
28
+ @log.debug("#{@sqs.list_queues.body}")
29
+
30
+ end
31
+
32
+ def read
33
+ @sqs.list_queues({'QueueNamePrefix' => "#{@options[:name]}"}).body.first.last[0]
34
+ end
35
+
36
+ alias_method :fog_object, :read
37
+
38
+ def delete
39
+
40
+ return unless exists?
41
+ @log.info( "Deleting SQS queue #{@options[:name]}" )
42
+ fog_object.destroy
43
+
44
+ end
45
+
46
+ end
data/lib/build-cloud.rb CHANGED
@@ -166,6 +166,7 @@ class BuildCloud
166
166
  :instances => BuildCloud::Instance,
167
167
  :ebs_volumes => BuildCloud::EBSVolume,
168
168
  :dhcp_options_sets => BuildCloud::DHCPOptionsSet,
169
+ :sqs_queues => BuildCloud::SQSQueue,
169
170
  }
170
171
 
171
172
  end
@@ -193,6 +194,7 @@ class BuildCloud
193
194
  :as_groups,
194
195
  :r53_record_sets,
195
196
  :s3_buckets,
197
+ :sqs_queues,
196
198
  :ebs_volumes,
197
199
  :instances,
198
200
  ]
@@ -262,7 +264,8 @@ class BuildCloud
262
264
  :iam => Fog::AWS::IAM.new( fog_options_regionless ),
263
265
  :rds => Fog::AWS::RDS.new( fog_options ),
264
266
  :elasticache => Fog::AWS::Elasticache.new( fog_options ),
265
- :r53 => Fog::DNS::AWS.new( fog_options_regionless )
267
+ :r53 => Fog::DNS::AWS.new( fog_options_regionless ),
268
+ :sqs => Fog::AWS::SQS.new( fog_options )
266
269
  }
267
270
 
268
271
  end
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.18
4
+ version: 0.0.19
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: 2016-06-16 00:00:00.000000000 Z
11
+ date: 2016-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -105,6 +105,7 @@ files:
105
105
  - lib/build-cloud/routetable.rb
106
106
  - lib/build-cloud/s3bucket.rb
107
107
  - lib/build-cloud/securitygroup.rb
108
+ - lib/build-cloud/sqsqueue.rb
108
109
  - lib/build-cloud/subnet.rb
109
110
  - lib/build-cloud/vpc.rb
110
111
  - lib/build-cloud/zone.rb