kitchen-ec2 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,104 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: Fletcher Nichol (<fnichol@nichol.ca>)
4
+ #
5
+ # Copyright (C) 2015, Fletcher Nichol
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ if ENV["CODECLIMATE_REPO_TOKEN"]
20
+ require "codeclimate-test-reporter"
21
+ CodeClimate::TestReporter.start
22
+ elsif ENV["COVERAGE"]
23
+ require "simplecov"
24
+ SimpleCov.profiles.define "gem" do
25
+ command_name "Specs"
26
+
27
+ add_filter ".gem/"
28
+ add_filter "/spec/"
29
+
30
+ add_group "Libraries", "/lib/"
31
+ end
32
+ SimpleCov.start "gem"
33
+ end
34
+
35
+ RSpec.configure do |config|
36
+ # rspec-expectations config goes here. You can use an alternate
37
+ # assertion/expectation library such as wrong or the stdlib/minitest
38
+ # assertions if you prefer.
39
+ config.expect_with :rspec do |expectations|
40
+ # This option will default to `true` in RSpec 4. It makes the `description`
41
+ # and `failure_message` of custom matchers include text for helper methods
42
+ # defined using `chain`, e.g.:
43
+ # be_bigger_than(2).and_smaller_than(4).description
44
+ # # => "be bigger than 2 and smaller than 4"
45
+ # ...rather than:
46
+ # # => "be bigger than 2"
47
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
48
+ end
49
+
50
+ # rspec-mocks config goes here. You can use an alternate test double
51
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
52
+ config.mock_with :rspec do |mocks|
53
+ # Prevents you from mocking or stubbing a method that does not exist on
54
+ # a real object. This is generally recommended, and will default to
55
+ # `true` in RSpec 4.
56
+ mocks.verify_partial_doubles = true
57
+ end
58
+
59
+ # These two settings work together to allow you to limit a spec run
60
+ # to individual examples or groups you care about by tagging them with
61
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
62
+ # get run.
63
+ config.filter_run :focus
64
+ config.run_all_when_everything_filtered = true
65
+
66
+ # Limits the available syntax to the non-monkey patched syntax that is
67
+ # recommended. For more details, see:
68
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
69
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
70
+ config.disable_monkey_patching!
71
+
72
+ # This setting enables warnings. It's recommended, but in some cases may
73
+ # be too noisy due to issues in dependencies.
74
+ config.warnings = true
75
+
76
+ # Many RSpec users commonly either run the entire suite or an individual
77
+ # file, and it's useful to allow more verbose output when running an
78
+ # individual spec file.
79
+ if config.files_to_run.one?
80
+ # Use the documentation formatter for detailed output,
81
+ # unless a formatter has already been configured
82
+ # (e.g. via a command-line flag).
83
+ config.default_formatter = "doc"
84
+ end
85
+
86
+ # Run specs in random order to surface order dependencies. If you find an
87
+ # order dependency and want to debug it, you can fix the order by providing
88
+ # the seed, which is printed after each run.
89
+ # --seed 1234
90
+ config.order = :random
91
+
92
+ # Seed global randomization in this process using the `--seed` CLI option.
93
+ # Setting this allows you to use `--seed` to deterministically reproduce
94
+ # test failures related to randomization by passing the same `--seed` value
95
+ # as the one that triggered the failure.
96
+ Kernel.srand config.seed
97
+
98
+ config.expose_dsl_globally = true
99
+
100
+ end
101
+
102
+ require "aws-sdk"
103
+ # https://ruby.awsblog.com/post/Tx15V81MLPR8D73/Client-Response-Stubs
104
+ Aws.config[:stub_responses] = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2015-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -16,16 +16,16 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '1.4'
27
27
  - !ruby/object:Gem::Dependency
28
- name: fog
28
+ name: excon
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,13 +39,13 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: multi_json
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
- type: :development
48
+ type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
@@ -53,35 +53,133 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: cane
56
+ name: aws-sdk-v1
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
61
+ version: 1.59.0
62
+ type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 1.59.0
69
69
  - !ruby/object:Gem::Dependency
70
- name: tailor
70
+ name: aws-sdk
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '2'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.2'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - ">="
94
+ - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '0'
96
+ version: '3.2'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: countloc
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.4'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.4'
111
+ - !ruby/object:Gem::Dependency
112
+ name: maruku
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.6'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.6'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.7'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.7'
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.8'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.8'
153
+ - !ruby/object:Gem::Dependency
154
+ name: finstyle
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '='
158
+ - !ruby/object:Gem::Version
159
+ version: 1.4.0
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '='
165
+ - !ruby/object:Gem::Version
166
+ version: 1.4.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: cane
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - '='
172
+ - !ruby/object:Gem::Version
173
+ version: 2.6.2
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - '='
179
+ - !ruby/object:Gem::Version
180
+ version: 2.6.2
181
+ - !ruby/object:Gem::Dependency
182
+ name: climate_control
85
183
  requirement: !ruby/object:Gem::Requirement
86
184
  requirements:
87
185
  - - ">="
@@ -103,8 +201,10 @@ extra_rdoc_files: []
103
201
  files:
104
202
  - ".cane"
105
203
  - ".gitignore"
106
- - ".tailor"
204
+ - ".rspec"
205
+ - ".rubocop.yml"
107
206
  - ".travis.yml"
207
+ - ".yardopts"
108
208
  - CHANGELOG.md
109
209
  - Gemfile
110
210
  - LICENSE
@@ -112,9 +212,14 @@ files:
112
212
  - Rakefile
113
213
  - data/amis.json
114
214
  - kitchen-ec2.gemspec
215
+ - lib/kitchen/driver/aws/client.rb
216
+ - lib/kitchen/driver/aws/instance_generator.rb
115
217
  - lib/kitchen/driver/ec2.rb
116
218
  - lib/kitchen/driver/ec2_version.rb
117
- - spec/create_spec.rb
219
+ - spec/kitchen/driver/ec2/client_spec.rb
220
+ - spec/kitchen/driver/ec2/instance_generator_spec.rb
221
+ - spec/kitchen/driver/ec2_spec.rb
222
+ - spec/spec_helper.rb
118
223
  homepage: http://kitchen.ci/
119
224
  licenses:
120
225
  - Apache 2.0
@@ -135,9 +240,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
240
  version: '0'
136
241
  requirements: []
137
242
  rubyforge_project:
138
- rubygems_version: 2.2.0
243
+ rubygems_version: 2.4.2
139
244
  signing_key:
140
245
  specification_version: 4
141
246
  summary: A Test Kitchen Driver for Amazon EC2
142
247
  test_files:
143
- - spec/create_spec.rb
248
+ - spec/kitchen/driver/ec2/client_spec.rb
249
+ - spec/kitchen/driver/ec2/instance_generator_spec.rb
250
+ - spec/kitchen/driver/ec2_spec.rb
251
+ - spec/spec_helper.rb
252
+ has_rdoc:
data/.tailor DELETED
@@ -1,106 +0,0 @@
1
- #------------------------------------------------------------------------------
2
- # Horizontal Whitespace
3
- #------------------------------------------------------------------------------
4
- # allow_hard_tabs True to let hard tabs be considered a single space.
5
- # Default: false
6
- #
7
- # allow_trailing_line_spaces
8
- # True to skip detecting extra spaces at the ends of
9
- # lines.
10
- # Default: false
11
- #
12
- # indentation_spaces The number of spaces to consider a proper indent.
13
- # Default: 2
14
- #
15
- # max_line_length The maximum number of characters in a line before
16
- # tailor complains.
17
- # Default: 80
18
- # spaces_after_comma Number of spaces to expect after a comma.
19
- # Default: 1
20
- #
21
- # spaces_before_comma Number of spaces to expect before a comma.
22
- # Default: 0
23
- #
24
- # spaces_after_lbrace The number of spaces to expect after an lbrace ('{').
25
- # Default: 1
26
- #
27
- # spaces_before_lbrace The number of spaces to expect before an lbrace ('{').
28
- # Default: 1
29
- #
30
- # spaces_before_rbrace The number of spaces to expect before an rbrace ('}').
31
- # Default: 1
32
- #
33
- # spaces_in_empty_braces The number of spaces to expect between braces when
34
- # there's nothing in the braces (i.e. {}).
35
- # Default: 0
36
- #
37
- # spaces_after_lbracket The number of spaces to expect after an
38
- # lbracket ('[').
39
- # Default: 0
40
- #
41
- # spaces_before_rbracket The number of spaces to expect before an
42
- # rbracket (']').
43
- # Default: 0
44
- #
45
- # spaces_after_lparen The number of spaces to expect after an
46
- # lparen ('(').
47
- # Default: 0
48
- #
49
- # spaces_before_rparen The number of spaces to expect before an
50
- # rbracket (')').
51
- # Default: 0
52
- #
53
- #------------------------------------------------------------------------------
54
- # Naming
55
- #------------------------------------------------------------------------------
56
- # allow_camel_case_methods
57
- # Setting to true skips detection of camel-case method
58
- # names (i.e. def myMethod).
59
- # Default: false
60
- #
61
- # allow_screaming_snake_case_classes
62
- # Setting to true skips detection of screaming
63
- # snake-case class names (i.e. My_Class).
64
- # Default: false
65
- #
66
- #------------------------------------------------------------------------------
67
- # Vertical Whitespace
68
- #------------------------------------------------------------------------------
69
- # max_code_lines_in_class The number of lines of code in a class to allow before
70
- # tailor will warn you.
71
- # Default: 300
72
- #
73
- # max_code_lines_in_method
74
- # The number of lines of code in a method to allow
75
- # before tailor will warn you.
76
- # Default: 30
77
- #
78
- # trailing_newlines The number of newlines that should be at the end of
79
- # the file.
80
- # Default: 1
81
- #
82
- Tailor.config do |config|
83
- config.formatters "text"
84
- config.file_set 'lib/**/*.rb' do |style|
85
- style.allow_camel_case_methods false, level: :error
86
- style.allow_hard_tabs false, level: :error
87
- style.allow_screaming_snake_case_classes false, level: :error
88
- style.allow_trailing_line_spaces false, level: :error
89
- style.allow_invalid_ruby false, level: :warn
90
- style.indentation_spaces 2, level: :error
91
- style.max_code_lines_in_class 300, level: :error
92
- style.max_code_lines_in_method 30, level: :error
93
- style.max_line_length 100, level: :error
94
- style.spaces_after_comma 1, level: :off
95
- style.spaces_after_lbrace 1, level: :error
96
- style.spaces_after_lbracket 0, level: :error
97
- style.spaces_after_lparen 0, level: :error
98
- style.spaces_before_comma 0, level: :error
99
- style.spaces_before_lbrace 1, level: :off
100
- style.spaces_before_rbrace 1, level: :error
101
- style.spaces_before_rbracket 0, level: :error
102
- style.spaces_before_rparen 0, level: :error
103
- style.spaces_in_empty_braces 0, level: :error
104
- style.trailing_newlines 1, level: :error
105
- end
106
- end