nat-monitor 1.0.1 → 1.0.2

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: 536dfbc820599ad1fe2c10cfeffb86da7dcac84a
4
- data.tar.gz: 045f897aec8ddd8bb83a58a540dbabab4812458f
3
+ metadata.gz: e433bc70c9c964b8a88dd334a3eb3e794cf70f94
4
+ data.tar.gz: 00742a476e7aa122b5f4bbb2800cb83174ed545a
5
5
  SHA512:
6
- metadata.gz: f0726a3d02e59a92ac2775d0da561eb95490037ce89e3aeb33d99aff93f3fc5337ec4ec5148d86ed2fc23e19886e7962d2115f70de88f82cdf5934c6949c9229
7
- data.tar.gz: 601a1532fc1707059f20bde496e5329694884d6cfa18a68ce64415d0a395b38234baaf8265d710a5cf78ce53eb164cdfd89af74ad350d659c9d35fc087f43eef
6
+ metadata.gz: aa52a65a6d3610bffd425fb10d7532d0c2f9a2c0210a526b5e31f658e3c9286f30b47fffe691d0615b98a9250ee1a6c00e10ea03b0939555ff2de032fc1e5f5e
7
+ data.tar.gz: 8dd686cb05a4944c43c5107d1f80a4cc4ce370b817a7d5e66757c165c8862d43417d5ee653635a8c99c7069a74451489d65c8ec14b7724f221302db68c7a4c5d
data/lib/nat-monitor.rb CHANGED
@@ -93,8 +93,15 @@ module EtTools
93
93
 
94
94
  def connection
95
95
  @connection ||= begin
96
- Fog::Compute::AWS.new(aws_access_key_id: 'AWS_ACCESS_KEY_ID',
97
- aws_secret_access_key: 'AWS_SECRET_ACCESS_KEY')
96
+ if @conf['aws_access_key_id']
97
+ options = { aws_access_key_id: @conf['aws_access_key_id'],
98
+ aws_secret_access_key: @conf['aws_secret_access_key'] }
99
+ else
100
+ options = { use_iam_profile: true }
101
+ end
102
+
103
+ options[:endpoint] = @conf['aws_url'] if @conf['aws_url']
104
+ Fog::Compute::AWS.new(options)
98
105
  end
99
106
  end
100
107
 
@@ -1,5 +1,5 @@
1
1
  module EtTools
2
2
  class NatMonitor
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
5
5
  end
data/nat-monitor.gemspec CHANGED
@@ -18,8 +18,12 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(/^(test|spec|features)\//)
19
19
  spec.require_paths = ['lib']
20
20
 
21
+ spec.add_development_dependency 'rspec'
22
+ spec.add_development_dependency 'simplecov'
23
+ spec.add_development_dependency 'byebug'
21
24
  spec.add_development_dependency 'bundler', '~> 1.7'
22
25
  spec.add_development_dependency 'rake', '~> 10.0'
23
26
 
27
+ spec.add_runtime_dependency 'net-ping'
24
28
  spec.add_runtime_dependency 'fog', '~> 1.23'
25
29
  end
@@ -11,6 +11,8 @@ describe EtTools::NatMonitor do
11
11
  'i-00000003' => '1.1.1.3' }
12
12
 
13
13
  @yaml_conf = { 'route_table_id' => @route_table_id,
14
+ 'aws_access_key_id' => 'AWS_ACCESS_KEY_ID',
15
+ 'aws_secret_access_key' => 'AWS_SECRET_ACCESS_KEY',
14
16
  'nodes' => (
15
17
  { @my_instance_id => '1.1.1.1' }
16
18
  ).merge(@other_nodes) }
@@ -35,6 +37,8 @@ describe EtTools::NatMonitor do
35
37
  @nat_monitor.instance_variable_set(
36
38
  :@conf,
37
39
  ({ 'route_table_id' => @route_table_id,
40
+ 'aws_access_key_id' => 'AWS_ACCESS_KEY_ID',
41
+ 'aws_secret_access_key' => 'AWS_SECRET_ACCESS_KEY',
38
42
  'nodes' => @other_nodes })
39
43
  )
40
44
  allow(@nat_monitor).to receive(:route_exists?).with(any_args)
metadata CHANGED
@@ -1,15 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nat-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Herot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-06 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: simplecov
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: byebug
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
13
55
  - !ruby/object:Gem::Dependency
14
56
  name: bundler
15
57
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +80,20 @@ dependencies:
38
80
  - - "~>"
39
81
  - !ruby/object:Gem::Version
40
82
  version: '10.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: net-ping
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
41
97
  - !ruby/object:Gem::Dependency
42
98
  name: fog
43
99
  requirement: !ruby/object:Gem::Requirement