serverspec-aws 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 048c4c9ec48ce1fd3f9fd0ba7623591b2b416c84
4
+ data.tar.gz: ff0368032de0c5ca1c8f9bedf23a01a7600f5e97
5
+ SHA512:
6
+ metadata.gz: 46aa4476acec10733c00bebc43d0aae6208f11dbc808ef643034100449498461bf6b24592ba11f71cfbc58656fec7c7c3c4cbe2331ddce6e620f54ed583e4c70
7
+ data.tar.gz: d57e307f9b8a105b871aea054081930371117151615013ea282f1fdd1fddb41bbac0c87093a34ac2d8ce703f61cdcf7dfa84a59f810e3eb686a9391d46106840
data/LICENSE.md ADDED
@@ -0,0 +1,11 @@
1
+ # serverspec-aws license
2
+
3
+ Copyright (c) 2015, Ștefan Rusu All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+ * Neither the name of Ștefan Rusu nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10
+
11
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ȘTEFAN RUSU BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ ## About [![build status](https://secure.travis-ci.org/SaltwaterC/serverspec-aws.png?branch=master)](https://travis-ci.org/SaltwaterC/serverspec-aws)
2
+
3
+ Serverspec resources for AWS using AWS SDK for Ruby v2.
4
+
5
+ ## Documentation
6
+
7
+ The documentation is available as [GitHub page](http://saltwaterc.github.io/serverspec-aws/).
8
+
9
+ ## Usage
10
+
11
+ There aren't examples per se, but you can take a peek at the spec directory. The integration tests against itself also shows the usage mode. However, in real world use cases, the stubbing of the AWS SDK is (obviously) not necesary, hence you don't need to pass the instance argument for the resource classes which was implemented as a testing feature. Also, the spec_helper doesn't need to enable the stub_responses for real world use cases.
@@ -0,0 +1,35 @@
1
+ # encoding: utf-8
2
+
3
+ # The Serverspec module contains all the Serverspec resources
4
+ module Serverspec
5
+ # The Type module contains the Serverspec types
6
+ module Type
7
+ # The AWS module contains all the AWS API resources
8
+ module AWS
9
+ # The Serverspec::Type::AWS::VERSION constant actually sets this library
10
+ # version in the format: major.minor.patch.build
11
+ VERSION = '0.1.0'.freeze
12
+
13
+ # Check if the initialization argument of an AWS resource class is present
14
+ # @param arg_name [String] - The name of the init argument
15
+ # @param class_name [String] - The name of the AWS resource class
16
+ # @param arg [String] - The arg passed to the class constructor
17
+ # @raise [RuntimeError] if arg.nil?
18
+ def check_init_arg(arg_name, class_name, arg)
19
+ raise "Must specify #{arg_name} for #{class_name}" if arg.nil?
20
+ end
21
+
22
+ # Check the length for operations that should return only one resource
23
+ # @param item_name [String] - The name of the item to check
24
+ # @param item [Array] - The actual item for checking the length
25
+ # @raise [RuntimeError] if item.length == 0
26
+ # @raise [RuntimeError] if item.length > 1
27
+ def check_length(item_name, item)
28
+ raise "No #{item_name} with the specified name were "\
29
+ 'returned' if item.empty?
30
+ raise "Multiple #{item_name} with the same name "\
31
+ 'were returned' if item.length > 1
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,6 @@
1
+ # encoding: utf-8
2
+
3
+ require 'aws-sdk'
4
+ require 'serverspec'
5
+ require 'require_all'
6
+ require_rel 'resources'
metadata ADDED
@@ -0,0 +1,190 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: serverspec-aws
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - "Ștefan"
8
+ - Rusu
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2016-03-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: aws-sdk
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '2'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '2'
28
+ - !ruby/object:Gem::Dependency
29
+ name: serverspec
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '2'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '2'
42
+ - !ruby/object:Gem::Dependency
43
+ name: require_all
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '1'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '1'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0.31'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.31'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rspec
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '3'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '3'
84
+ - !ruby/object:Gem::Dependency
85
+ name: yard
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '0.8'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0.8'
98
+ - !ruby/object:Gem::Dependency
99
+ name: guard-rspec
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '4'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '4'
112
+ - !ruby/object:Gem::Dependency
113
+ name: guard-rubocop
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '1'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '1'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rake
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '10.4'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '10.4'
140
+ - !ruby/object:Gem::Dependency
141
+ name: jeweler
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '2'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '2'
154
+ description: Serverspec resources for testing the AWS infrastructure
155
+ email: saltwaterc@gmail.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files:
159
+ - LICENSE.md
160
+ - README.md
161
+ files:
162
+ - LICENSE.md
163
+ - README.md
164
+ - lib/resources/common.rb
165
+ - lib/serverspec-aws.rb
166
+ homepage: https://github.com/SaltwaterC/serverspec-aws
167
+ licenses:
168
+ - BSD-3-Clause
169
+ metadata: {}
170
+ post_install_message:
171
+ rdoc_options: []
172
+ require_paths:
173
+ - lib
174
+ required_ruby_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: '0'
179
+ required_rubygems_version: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
184
+ requirements: []
185
+ rubyforge_project:
186
+ rubygems_version: 2.5.2
187
+ signing_key:
188
+ specification_version: 4
189
+ summary: Serverspec for AWS
190
+ test_files: []