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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/docs/GCE.html +45 -44
- data/docs/GCE/Host.html +79 -79
- data/docs/GCE/Host/CLI.html +63 -62
- data/docs/GCE/Host/Config.html +251 -196
- data/docs/GCE/Host/ConfigError.html +44 -43
- data/docs/GCE/Host/GCEClient.html +49 -48
- data/docs/GCE/Host/GCEClient/Error.html +44 -43
- data/docs/GCE/Host/GCEClient/NotFound.html +44 -43
- data/docs/GCE/Host/HashUtil.html +41 -41
- data/docs/GCE/Host/HostData.html +102 -101
- data/docs/GCE/Host/RoleData.html +113 -89
- data/docs/GCE/Host/StringUtil.html +47 -47
- data/docs/_index.html +28 -31
- data/docs/class_list.html +24 -31
- data/docs/css/full_list.css +32 -31
- data/docs/css/style.css +244 -91
- data/docs/file.LICENSE.html +28 -31
- data/docs/file.README.html +29 -32
- data/docs/file_list.html +29 -31
- data/docs/frames.html +7 -16
- data/docs/index.html +29 -32
- data/docs/js/app.js +106 -77
- data/docs/js/full_list.js +170 -135
- data/docs/method_list.html +401 -251
- data/docs/top-level-namespace.html +34 -36
- data/lib/gce/host/config.rb +13 -2
- data/lib/gce/host/gce_client.rb +8 -2
- data/lib/gce/host/role_data.rb +5 -2
- data/lib/gce/host/version.rb +1 -1
- metadata +1 -1
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
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
|
-
— Documentation by YARD 0.
|
9
|
+
— 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
|
-
|
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
|
32
|
-
<
|
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> »
|
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
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
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
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
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
|
-
|
82
|
-
|
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
|
-
|
106
|
-
Generated on
|
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.
|
105
|
+
0.9.9 (ruby-2.4.1).
|
109
106
|
</div>
|
110
107
|
|
108
|
+
</div>
|
111
109
|
</body>
|
112
110
|
</html>
|
data/lib/gce/host/config.rb
CHANGED
@@ -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
|
-
|
74
|
-
|
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
|
data/lib/gce/host/gce_client.rb
CHANGED
@@ -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
|
33
|
-
|
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'
|
data/lib/gce/host/role_data.rb
CHANGED
@@ -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('
|
62
|
-
# RoleData.new('
|
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)
|
data/lib/gce/host/version.rb
CHANGED