gce-host 0.4.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 12:11:40 2016 by
102
+ <div id="footer">
103
+ Generated on Sat May 20 00:24: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>
@@ -66,12 +66,23 @@ class GCE
66
66
  @retries ||= ENV['RETRIES'] || config.fetch('RETRIES', 5)
67
67
  end
68
68
 
69
+ def self.open_timeout_sec
70
+ @open_timeout_sec ||= ENV['OPEN_TIMEOUT_SEC'] || config.fetch('OPEN_TIMEOUT_SEC', 300)
71
+ end
72
+
73
+ # google-api-ruby-client < v0.11.0
69
74
  def self.timeout_sec
70
75
  @timeout_sec ||= ENV['TIMEOUT_SEC'] || config.fetch('TIMEOUT_SEC', 300)
71
76
  end
72
77
 
73
- def self.open_timeout_sec
74
- @open_timeout_sec ||= ENV['OPEN_TIMEOUT_SEC'] || config.fetch('OPEN_TIMEOUT_SEC', 300)
78
+ # google-api-ruby-client >= v0.11.0
79
+ def self.send_timeout_sec
80
+ @send_timeout_sec ||= ENV['SEND_TIMEOUT_SEC'] || config.fetch('SEND_TIMEOUT_SEC', 300)
81
+ end
82
+
83
+ # google-api-ruby-client >= v0.11.0
84
+ def self.read_timeout_sec
85
+ @read_timeout_sec ||= ENV['READ_TIMEOUT_SEC'] || config.fetch('READ_TIMEOUT_SEC', timeout_sec)
75
86
  end
76
87
 
77
88
  def self.roles_key
@@ -29,8 +29,14 @@ class GCE
29
29
  client.client_options.application_name = 'gce-host'
30
30
  client.client_options.application_version = GCE::Host::VERSION
31
31
  client.request_options.retries = Config.retries
32
- client.request_options.timeout_sec = Config.timeout_sec
33
- client.request_options.open_timeout_sec = Config.open_timeout_sec
32
+ if client.request_options.respond_to?(:timeout_sec)
33
+ client.request_options.timeout_sec = Config.timeout_sec
34
+ client.request_options.open_timeout_sec = Config.open_timeout_sec
35
+ else # google-api-ruby-client >= v0.11.0
36
+ client.client_options.open_timeout_sec = Config.open_timeout_sec
37
+ client.client_options.send_timeout_sec = Config.send_timeout_sec
38
+ client.client_options.read_timeout_sec = Config.read_timeout_sec
39
+ end
34
40
 
35
41
  case Config.auth_method
36
42
  when 'compute_engine'
@@ -56,11 +56,14 @@ class GCE
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 GCE
2
2
  class Host
3
- VERSION = '0.4.4'
3
+ VERSION = '0.5.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gce-host
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo