build-cloud 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/LICENSE.txt +1 -1
- data/bin/build-cloud +1 -1
- data/build-cloud.gemspec +1 -1
- data/lib/build-cloud/sqsqueue.rb +46 -0
- data/lib/build-cloud.rb +4 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc7f2cfe58332d3cb280dec151be0991e2aa506f
|
4
|
+
data.tar.gz: db1c91275e4b9ef9974d3cb45c44d791de3f371f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7291602cf9fbe70d4843522c29fea8f3f8495e41c056b5ee0fed5025570d70dc57dbf75daef844066d5f9af56e7906935a5da9eb7c9b1c97d7653fe5c4775be9
|
7
|
+
data.tar.gz: 0c680371b065004833014c0eca17277d3a8924af68c277fe5166d6f4ea8bc359d491d55491e7ece13372814403aa649fdd1a15981a1b12a1060570ec9d60b33a
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
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.
|
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.
|
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-
|
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
|