ami_spec 1.1.0 → 1.2.0

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
  SHA256:
3
- metadata.gz: 4504c60fd0ce24f40be03e192159fcc9c8509cddbc2642cb0c8c50e351a7c7fa
4
- data.tar.gz: 8fc38e659fb6436b8ad37467564445de49c92940991d3f8b820d1b2f6927355a
3
+ metadata.gz: 6bf865c78d589bc86d5e434dcb49d3ae8dcf301b1c07181d6a9d2f569ccd284e
4
+ data.tar.gz: ace2b925ce79810075177b8e90113b84fc15f574be9c0cd782aa0ec90536c643
5
5
  SHA512:
6
- metadata.gz: 1a86bbfccdfbbe323eea7cea45bc9450d41626d3a40ed456a41b4228ef4eb1b211e23268a024dbecd81ebb768a06f00ac19e99f31387ce14e6b32635c99886cf
7
- data.tar.gz: 65effb5f2d0a7053c645c79b9ffa0c42ca93c4ee4183cdfbc7ab909263affb431d54ba0ea7f0dcb339bc5f3b81466ed765393d644886910b499e6a8df501c673
6
+ metadata.gz: 4263f8621665309d2de4859291b286a9bd3b5d5545ac47df20a1bbb56c589ae93585b55418121545afffdbf592c45a7594d171d403d1e94adde1bb0fe7357e73
7
+ data.tar.gz: 8327271a25293d9cb08f1b9ae0e56983a39ac8d673acb1e7186183faf99d561c827a372251ba70e10100f80c287a6bf2a2578604e829611842bd76bbffaeec45
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 1.9.3-p551
1
+ 2.5.1
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.1.8
5
- - 2.2.4
3
+ - 2.2.6
4
+ - 2.4.4
5
+ - 2.5.1
6
+ - 2.6.1
6
7
  script: bundle exec rake spec
data/ami_spec.gemspec CHANGED
@@ -17,11 +17,13 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ['lib']
19
19
 
20
- gem.add_dependency 'aws-sdk', '~> 2'
21
- gem.add_dependency 'rake'
22
- gem.add_dependency 'serverspec'
20
+ gem.add_dependency 'aws-sdk-ec2', '~> 1'
21
+ gem.add_development_dependency 'rake'
22
+ gem.add_dependency 'serverspec', '~> 2'
23
23
  gem.add_dependency 'specinfra', '>= 2.45'
24
- gem.add_dependency 'trollop'
24
+ gem.add_dependency 'optimist', '~> 3'
25
25
  gem.add_dependency 'hashie'
26
- gem.add_dependency 'net-ssh', '< 3.0'
26
+ gem.add_dependency 'net-ssh', '~> 5'
27
+
28
+ gem.required_ruby_version = '>= 2.2.6'
27
29
  end
data/bin/ami_spec CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'trollop'
4
3
  require 'ami_spec'
5
4
 
6
5
  AmiSpec.invoke
data/lib/ami_spec.rb CHANGED
@@ -4,7 +4,7 @@ require 'ami_spec/server_spec'
4
4
  require 'ami_spec/server_spec_options'
5
5
  require 'ami_spec/wait_for_ssh'
6
6
  require 'ami_spec/wait_for_rc'
7
- require 'trollop'
7
+ require 'optimist'
8
8
 
9
9
  module AmiSpec
10
10
  class InstanceConnectionTimeout < StandardError; end
@@ -83,7 +83,7 @@ module AmiSpec
83
83
  private_class_method :stop_instances
84
84
 
85
85
  def self.invoke
86
- options = Trollop::options do
86
+ options = Optimist::options do
87
87
  opt :role, "The role to test, this should map to a directory in the spec folder", type: :string
88
88
  opt :ami, "The ami ID to run tests against", type: :string
89
89
  opt :role_ami_file, "A file containing comma separated roles and amis. i.e.\nweb_server,ami-id.",
@@ -96,7 +96,7 @@ module AmiSpec
96
96
  opt :aws_region, "The AWS region, defaults to AWS_DEFAULT_REGION environment variable", type: :string
97
97
  opt :aws_instance_type, "The ec2 instance type, defaults to t2.micro", type: :string, default: 't2.micro'
98
98
  opt :aws_security_groups, "Security groups to associate to the launched instances. May be specified multiple times",
99
- type: :strings, default: nil
99
+ type: :string, default: nil, multi: true
100
100
  opt :aws_public_ip, "Launch instances with a public IP"
101
101
  opt :ssh_retries, "The number of times we should try sshing to the ec2 instance before giving up. Defaults to 30",
102
102
  type: :int, default: 30
@@ -1,4 +1,4 @@
1
- require 'aws-sdk'
1
+ require 'aws-sdk-ec2'
2
2
  require 'forwardable'
3
3
  require 'base64'
4
4
 
@@ -28,7 +28,11 @@ module AmiSpec
28
28
  end
29
29
 
30
30
  $LOAD_PATH.unshift(@spec) unless $LOAD_PATH.include?(@spec)
31
- require File.join(@spec, 'spec_helper')
31
+ begin
32
+ require File.join(@spec, 'spec_helper')
33
+ rescue LoadError
34
+ puts 'Spec Helper does not exist. Skipping!'
35
+ end
32
36
 
33
37
  set :backend, :ssh
34
38
  set :host, @ip
@@ -1,3 +1,3 @@
1
1
  module AmiSpec
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ami_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Robinson
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-03 00:00:00.000000000 Z
12
+ date: 2019-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: aws-sdk
15
+ name: aws-sdk-ec2
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '2'
20
+ version: '1'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '2'
27
+ version: '1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -32,7 +32,7 @@ dependencies:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
- type: :runtime
35
+ type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
@@ -43,16 +43,16 @@ dependencies:
43
43
  name: serverspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ">="
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '0'
48
+ version: '2'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: '2'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: specinfra
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -68,19 +68,19 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  version: '2.45'
70
70
  - !ruby/object:Gem::Dependency
71
- name: trollop
71
+ name: optimist
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">="
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '0'
76
+ version: '3'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ">="
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '0'
83
+ version: '3'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: hashie
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -99,16 +99,16 @@ dependencies:
99
99
  name: net-ssh
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - "<"
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '3.0'
104
+ version: '5'
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - "<"
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '3.0'
111
+ version: '5'
112
112
  description: Acceptance testing your AMIs
113
113
  email: []
114
114
  executables:
@@ -158,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - ">="
160
160
  - !ruby/object:Gem::Version
161
- version: '0'
161
+ version: 2.2.6
162
162
  required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ">="