webpoke 0.0.47 → 0.0.48
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/poke +22 -0
- data/lib/Webpoke/Test.rb +4 -3
- data/lib/Webpoke/version.rb +1 -1
- data/lib/webpoke.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 288320a7b19483be79d361d2c4e7ad61dd8c8079
|
4
|
+
data.tar.gz: b52a9ec2ff83b724492c65a0c939a23abc8dd800
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41600c1b1d636e052d918c0a07963e674f3b0113de9876565d7ba2be6d04acea23e9ba6c2ae096c1f90263f25d197b00ff8e833ad2648e7163747ac2f9d696c4
|
7
|
+
data.tar.gz: 013b36846da5cf104b6e10c78d73c9b1de93578147bbb3c407cbf9ef1e04597ad019fc7557c774beadcfa6f286bd2bd9f10562fe159a0a2b5bd65813d0180a99
|
data/bin/poke
CHANGED
@@ -49,6 +49,28 @@ optparser = OptionParser.new do |opts|
|
|
49
49
|
options[:format] = format;
|
50
50
|
end
|
51
51
|
|
52
|
+
opts.on("--leeroy", "WARNING: Only use if you know your tests are going to make something explode") do
|
53
|
+
def string_in_seconds(string, secs)
|
54
|
+
secs = secs.to_f
|
55
|
+
letters = string.split('')
|
56
|
+
wait_time = secs/letters.count
|
57
|
+
letters.each do |l|
|
58
|
+
$stdout << l
|
59
|
+
sleep wait_time
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
string_in_seconds("All right, time's up!\nLet's do this...", 1.5)
|
64
|
+
sleep 1
|
65
|
+
puts ''
|
66
|
+
string_in_seconds('LEEEEEEEEEEROOOOOOOOOOOOOOOY',3)
|
67
|
+
sleep 0.5
|
68
|
+
puts ''
|
69
|
+
string_in_seconds('JEEEEEEEEEEEEEEEEENNNNNNNNKINNNNNNNNNNNNSSSSSSSSAH', 5)
|
70
|
+
puts ''
|
71
|
+
string_in_seconds('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!', 2)
|
72
|
+
end
|
73
|
+
|
52
74
|
if !ARGV[0]
|
53
75
|
puts opts.help()
|
54
76
|
exit 255
|
data/lib/Webpoke/Test.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
=end
|
4
4
|
class Webpoke::Test
|
5
5
|
|
6
|
-
mark_accessible :description, :group, :url, :method, :success, :query, :should_fail, :headers, :data, :body, :on_success, :dependant, :depends_on, :response, :parse
|
6
|
+
mark_accessible :description, :group, :url, :method, :success, :query, :should_fail, :headers, :data, :body, :on_success, :dependant, :depends_on, :response, :parse, :metadata, :run_always
|
7
7
|
|
8
8
|
def initialize(&block)
|
9
9
|
@parse = true
|
@@ -43,7 +43,7 @@ class Webpoke::Test
|
|
43
43
|
if @should_fail
|
44
44
|
return code > 399
|
45
45
|
else
|
46
|
-
return (200..
|
46
|
+
return (200..226).include?(code)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -101,7 +101,8 @@ Returns the test description
|
|
101
101
|
query: query,
|
102
102
|
headers: @headers,
|
103
103
|
data: data,
|
104
|
-
sampleOutput: @sampleOutput
|
104
|
+
sampleOutput: @sampleOutput,
|
105
|
+
metadata: @metadata
|
105
106
|
}
|
106
107
|
|
107
108
|
end
|
data/lib/Webpoke/version.rb
CHANGED
data/lib/webpoke.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpoke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.48
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Hidalgo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|