ec2-host 0.6.0 → 1.0.0

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.
@@ -1,12 +1,12 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html>
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.6
9
+ &mdash; Documentation by YARD 0.9.9
10
10
 
11
11
  </title>
12
12
 
@@ -15,9 +15,8 @@
15
15
  <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
18
+ pathId = "";
19
19
  relpath = '';
20
- framesUrl = "frames.html#!top-level-namespace.html";
21
20
  </script>
22
21
 
23
22
 
@@ -28,58 +27,56 @@
28
27
 
29
28
  </head>
30
29
  <body>
31
- <div id="header">
32
- <div id="menu">
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
33
38
 
34
39
  <a href="_index.html">Index</a> &raquo;
35
40
 
36
41
 
37
42
  <span class="title">Top Level Namespace</span>
38
43
 
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
44
  </div>
42
45
 
43
- <div id="search">
46
+ <div id="search">
44
47
 
45
48
  <a class="full_list_link" id="class_list_link"
46
49
  href="class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="file_list.html">
57
- File List
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
58
56
  </a>
59
57
 
60
58
  </div>
61
- <div class="clear"></div>
62
- </div>
59
+ <div class="clear"></div>
60
+ </div>
63
61
 
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Top Level Namespace
62
+ <div id="content"><h1>Top Level Namespace
67
63
 
68
64
 
69
65
 
70
66
  </h1>
67
+ <div class="box_info">
68
+
71
69
 
72
- <dl class="box">
73
70
 
74
71
 
75
-
76
72
 
77
-
78
73
 
79
74
 
75
+
80
76
 
81
- </dl>
82
- <div class="clear"></div>
77
+
78
+
79
+ </div>
83
80
 
84
81
  <h2>Defined Under Namespace</h2>
85
82
  <p class="children">
@@ -102,11 +99,12 @@
102
99
 
103
100
  </div>
104
101
 
105
- <div id="footer">
106
- Generated on Fri Dec 2 11:53:59 2016 by
102
+ <div id="footer">
103
+ Generated on Sat May 20 00:23:52 2017 by
107
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
- 0.8.7.6 (ruby-2.3.2).
105
+ 0.9.9 (ruby-2.4.1).
109
106
  </div>
110
107
 
108
+ </div>
111
109
  </body>
112
110
  </html>
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.executables = `git ls-files -- exe/*`.split("\n").map{ |f| File.basename(f) }
17
17
  gem.require_paths = ["lib"]
18
18
 
19
- gem.add_runtime_dependency 'aws-sdk', "< 3.0.0"
19
+ gem.add_runtime_dependency 'aws-sdk-ec2'
20
20
  gem.add_runtime_dependency 'dotenv'
21
21
  gem.add_runtime_dependency 'inifile'
22
22
 
@@ -1,5 +1,5 @@
1
1
  require 'pp'
2
- require 'aws-sdk'
2
+ require 'aws-sdk-ec2'
3
3
  require 'dotenv'
4
4
  Dotenv.load
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'net/http'
2
- require 'aws-sdk'
2
+ require 'aws-sdk-ec2'
3
3
 
4
4
  class EC2
5
5
  class Host
@@ -144,7 +144,9 @@ class EC2
144
144
  #
145
145
  # @param [Hash] condition search parameters
146
146
  def match?(condition)
147
- return false if !condition[:state] and (terminated? or shutting_down?)
147
+ if condition[:state].nil?
148
+ return false if (terminated? or shutting_down?)
149
+ end
148
150
  return false unless role_match?(condition)
149
151
  return false unless instance_match?(condition)
150
152
  true
@@ -56,11 +56,14 @@ class EC2
56
56
  #
57
57
  # RoleData.new('foo', 'a').match?(['foo', 'bar']) #=> true
58
58
  # RoleData.new('bar', 'a').match?(['foo', 'bar']) #=> true
59
+ # RoleData.new('baz', 'a').match?(['foo', 'bar']) #=> false
59
60
  #
60
61
  # RoleData.new('foo', 'a').match?(['foo', 'bar'], ['a', 'b']) #=> true
61
- # RoleData.new('foo', 'a').match?(['foo', 'bar'], ['a', 'b']) #=> true
62
- # RoleData.new('bar', 'b').match?(['foo', 'bar'], ['a', 'b']) #=> true
62
+ # RoleData.new('bar', 'a').match?(['foo', 'bar'], ['a', 'b']) #=> true
63
+ # RoleData.new('baz', 'a').match?(['foo', 'bar'], ['a', 'b']) #=> false
64
+ # RoleData.new('foo', 'b').match?(['foo', 'bar'], ['a', 'b']) #=> true
63
65
  # RoleData.new('bar', 'b').match?(['foo', 'bar'], ['a', 'b']) #=> true
66
+ # RoleData.new('baz', 'b').match?(['foo', 'bar'], ['a', 'b']) #=> false
64
67
  #
65
68
  # @param [Array] role_parts such as ["admin", "jenkins", "slave"]
66
69
  def match?(*role_parts)
@@ -1,5 +1,5 @@
1
1
  class EC2
2
2
  class Host
3
- VERSION = '0.6.0'
3
+ VERSION = '1.0.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2-host
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2018-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: aws-sdk
14
+ name: aws-sdk-ec2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "<"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0
19
+ version: '0'
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: 3.0.0
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dotenv
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  version: '0'
244
244
  requirements: []
245
245
  rubyforge_project:
246
- rubygems_version: 2.6.11
246
+ rubygems_version: 2.7.6
247
247
  signing_key:
248
248
  specification_version: 4
249
249
  summary: Search hosts on AWS EC2