ztk 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ztk/base.rb +70 -24
- data/lib/ztk/benchmark.rb +12 -15
- data/lib/ztk/command.rb +62 -43
- data/lib/ztk/logger.rb +8 -2
- data/lib/ztk/parallel.rb +16 -15
- data/lib/ztk/rescue_retry.rb +10 -12
- data/lib/ztk/spinner.rb +12 -5
- data/lib/ztk/ssh.rb +139 -109
- data/lib/ztk/tcp_socket_check.rb +16 -24
- data/lib/ztk/version.rb +1 -1
- data/spec/spec_helper.rb +8 -0
- data/spec/ztk/base_spec.rb +41 -0
- data/spec/ztk/benchmark_spec.rb +10 -12
- data/spec/ztk/command_spec.rb +142 -9
- data/spec/ztk/config_spec.rb +16 -16
- data/spec/ztk/logger_spec.rb +1 -1
- data/spec/ztk/rescue_retry_spec.rb +3 -3
- data/spec/ztk/spinner_spec.rb +51 -0
- data/spec/ztk/ssh_spec.rb +385 -119
- data/spec/ztk/tcp_socket_check_spec.rb +6 -6
- metadata +8 -4
@@ -128,11 +128,11 @@ describe ZTK::TCPSocketCheck do
|
|
128
128
|
|
129
129
|
describe "read check" do
|
130
130
|
|
131
|
-
it "should return false on a read check to 127.0.0.1:
|
131
|
+
it "should return false on a read check to 127.0.0.1:0" do
|
132
132
|
subject.config do |config|
|
133
133
|
config.host = "127.0.0.1"
|
134
|
-
config.port =
|
135
|
-
config.wait =
|
134
|
+
config.port = 0
|
135
|
+
config.wait = WAIT_SMALL
|
136
136
|
end
|
137
137
|
subject.wait.should == false
|
138
138
|
end
|
@@ -141,7 +141,7 @@ describe ZTK::TCPSocketCheck do
|
|
141
141
|
subject.config do |config|
|
142
142
|
config.host = "github.com"
|
143
143
|
config.port = 22
|
144
|
-
config.wait =
|
144
|
+
config.wait = WAIT_SMALL
|
145
145
|
end
|
146
146
|
subject.wait.should == true
|
147
147
|
end
|
@@ -155,7 +155,7 @@ describe ZTK::TCPSocketCheck do
|
|
155
155
|
config.host = "127.0.0.1"
|
156
156
|
config.port = 1
|
157
157
|
config.data = "GET"
|
158
|
-
config.wait =
|
158
|
+
config.wait = WAIT_SMALL
|
159
159
|
end
|
160
160
|
subject.wait.should == false
|
161
161
|
end
|
@@ -165,7 +165,7 @@ describe ZTK::TCPSocketCheck do
|
|
165
165
|
config.host = "www.google.com"
|
166
166
|
config.port = 80
|
167
167
|
config.data = "GET"
|
168
|
-
config.wait =
|
168
|
+
config.wait = WAIT_SMALL
|
169
169
|
end
|
170
170
|
subject.wait.should == true
|
171
171
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ztk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: erubis
|
@@ -188,12 +188,14 @@ files:
|
|
188
188
|
- spec/spec_helper.rb
|
189
189
|
- spec/support/test-config.rb
|
190
190
|
- spec/support/test-template.txt.erb
|
191
|
+
- spec/ztk/base_spec.rb
|
191
192
|
- spec/ztk/benchmark_spec.rb
|
192
193
|
- spec/ztk/command_spec.rb
|
193
194
|
- spec/ztk/config_spec.rb
|
194
195
|
- spec/ztk/logger_spec.rb
|
195
196
|
- spec/ztk/parallel_spec.rb
|
196
197
|
- spec/ztk/rescue_retry_spec.rb
|
198
|
+
- spec/ztk/spinner_spec.rb
|
197
199
|
- spec/ztk/ssh_spec.rb
|
198
200
|
- spec/ztk/tcp_socket_check_spec.rb
|
199
201
|
- spec/ztk/template_spec.rb
|
@@ -212,7 +214,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
212
214
|
version: '0'
|
213
215
|
segments:
|
214
216
|
- 0
|
215
|
-
hash:
|
217
|
+
hash: 394683779756367584
|
216
218
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
219
|
none: false
|
218
220
|
requirements:
|
@@ -221,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
223
|
version: '0'
|
222
224
|
segments:
|
223
225
|
- 0
|
224
|
-
hash:
|
226
|
+
hash: 394683779756367584
|
225
227
|
requirements: []
|
226
228
|
rubyforge_project:
|
227
229
|
rubygems_version: 1.8.24
|
@@ -232,12 +234,14 @@ test_files:
|
|
232
234
|
- spec/spec_helper.rb
|
233
235
|
- spec/support/test-config.rb
|
234
236
|
- spec/support/test-template.txt.erb
|
237
|
+
- spec/ztk/base_spec.rb
|
235
238
|
- spec/ztk/benchmark_spec.rb
|
236
239
|
- spec/ztk/command_spec.rb
|
237
240
|
- spec/ztk/config_spec.rb
|
238
241
|
- spec/ztk/logger_spec.rb
|
239
242
|
- spec/ztk/parallel_spec.rb
|
240
243
|
- spec/ztk/rescue_retry_spec.rb
|
244
|
+
- spec/ztk/spinner_spec.rb
|
241
245
|
- spec/ztk/ssh_spec.rb
|
242
246
|
- spec/ztk/tcp_socket_check_spec.rb
|
243
247
|
- spec/ztk/template_spec.rb
|