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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8054a83903c68344996f887040ba1d2a7f52a108
4
- data.tar.gz: 68f642e34925bec30903e5881c54d579ec551a7b
3
+ metadata.gz: 288320a7b19483be79d361d2c4e7ad61dd8c8079
4
+ data.tar.gz: b52a9ec2ff83b724492c65a0c939a23abc8dd800
5
5
  SHA512:
6
- metadata.gz: 3a15c10d9059d1a64d22aec2a44e8fa84e6ffa832e969edb031df9c8fa5b086f0287c930ad2e3792cef0c90456a8502d21c7d6442a3e1001e62517fb3a2d99f0
7
- data.tar.gz: 24d042990df8a6f64553450a36733e851c2b75b4d1340fb1a3cfee78584f7a0a51b4b2354db37f62984b3d4990bbccbc0e5afd0e6e536b8f70c35cf24f1de42f
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
@@ -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..202).include?(code)
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
@@ -1,3 +1,3 @@
1
1
  module Webpoke
2
- VERSION = "0.0.47"
2
+ VERSION = "0.0.48"
3
3
  end
@@ -175,7 +175,7 @@ module Webpoke
175
175
  def run (group=nil)
176
176
 
177
177
  $tests.each do |test|
178
- next if group && test.group != group
178
+ next if group && test.group != group && !test.run_always
179
179
 
180
180
  next if test.dependant?
181
181
  next if test.did_run?
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.47
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-14 00:00:00.000000000 Z
11
+ date: 2013-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty