webspicy 0.20.7 → 0.20.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sandr +14 -0
- data/bin/search +2 -0
- data/lib/webspicy/configuration.rb +1 -1
- data/lib/webspicy/tester.rb +2 -2
- data/lib/webspicy/tester/file_checker.rb +1 -1
- data/lib/webspicy/tester/reporter.rb +1 -1
- data/lib/webspicy/tester/reporter/success_or_not.rb +14 -0
- data/lib/webspicy/tester/reporter/summary.rb +5 -1
- data/lib/webspicy/version.rb +1 -1
- metadata +11 -7
- data/lib/webspicy/tester/reporter/error_count.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f14b3463098780f10139ffd28362d60eaa61e4b9e77d16a91e8ac597847ca1b
|
4
|
+
data.tar.gz: 73571e1c2bd2764e4de2af708fa94d396ae943029ab11300ce9e14345c3479db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e6281472272c61b01898ff513b721a3203a6c21ad314c0932d069fab01529d060030db1d0a0d6bb445bf306a62618227aee1fd6dfaea08f0073247f338b9582
|
7
|
+
data.tar.gz: 7136d69f3f9b5de2a1fb72a37377bc01262311c9f4e6bbf52e2062452368a5b81ace3f11b9173c88ac85f46ea3c2765582633b8cb22a43d85def530fb378c471
|
data/bin/sandr
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'path'
|
3
|
+
|
4
|
+
def sandr(file)
|
5
|
+
file.write file.read.gsub(ARGV[0], ARGV[1])
|
6
|
+
end
|
7
|
+
|
8
|
+
Path.dir.parent.glob("lib/**/*.rb") do |file|
|
9
|
+
sandr(file)
|
10
|
+
end
|
11
|
+
|
12
|
+
Path.dir.parent.glob("spec/**/*.rb") do |file|
|
13
|
+
sandr(file)
|
14
|
+
end
|
data/bin/search
ADDED
@@ -447,7 +447,7 @@ module Webspicy
|
|
447
447
|
@reporter << Tester::Reporter::Documentation.new
|
448
448
|
@reporter << Tester::Reporter::Exceptions.new
|
449
449
|
@reporter << Tester::Reporter::Summary.new
|
450
|
-
@reporter << Tester::Reporter::
|
450
|
+
@reporter << Tester::Reporter::SuccessOrNot.new
|
451
451
|
end
|
452
452
|
attr_accessor :reporter
|
453
453
|
|
data/lib/webspicy/tester.rb
CHANGED
@@ -38,12 +38,12 @@ module Webspicy
|
|
38
38
|
rescue FailFast
|
39
39
|
end
|
40
40
|
reporter.report
|
41
|
-
reporter.find(Reporter::
|
41
|
+
reporter.find(Reporter::SuccessOrNot).report
|
42
42
|
end
|
43
43
|
|
44
44
|
def call!
|
45
45
|
res = call
|
46
|
-
abort("KO") unless
|
46
|
+
abort("KO") unless reporter.find(Reporter::SuccessOrNot).success?
|
47
47
|
end
|
48
48
|
|
49
49
|
def find_and_call(method, url, mutation)
|
@@ -80,7 +80,6 @@ module Webspicy
|
|
80
80
|
end # class Reporter
|
81
81
|
end # class Tester
|
82
82
|
end # module Webspicy
|
83
|
-
require_relative 'reporter/error_count'
|
84
83
|
require_relative 'reporter/progress'
|
85
84
|
require_relative 'reporter/summary'
|
86
85
|
require_relative 'reporter/documentation'
|
@@ -88,3 +87,4 @@ require_relative 'reporter/exceptions'
|
|
88
87
|
require_relative 'reporter/composite'
|
89
88
|
require_relative 'reporter/file_progress'
|
90
89
|
require_relative 'reporter/file_summary'
|
90
|
+
require_relative 'reporter/success_or_not'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Webspicy
|
2
|
+
class Tester
|
3
|
+
class Reporter
|
4
|
+
class SuccessOrNot < Summary
|
5
|
+
|
6
|
+
def report
|
7
|
+
total_error_count
|
8
|
+
end
|
9
|
+
|
10
|
+
end # class SuccessOrNot
|
11
|
+
ErrorCount = SuccessOrNot # for backward compatibility
|
12
|
+
end # class Reporter
|
13
|
+
end # class Tester
|
14
|
+
end # module Webspicy
|
@@ -54,8 +54,12 @@ module Webspicy
|
|
54
54
|
io.flush
|
55
55
|
end
|
56
56
|
|
57
|
+
def total_error_count
|
58
|
+
@spec_file_errors_count + @errors_count + @failures_count
|
59
|
+
end
|
60
|
+
|
57
61
|
def success?
|
58
|
-
|
62
|
+
total_error_count == 0
|
59
63
|
end
|
60
64
|
|
61
65
|
end # class Summary
|
data/lib/webspicy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webspicy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernard Lambeau
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -201,6 +201,8 @@ dependencies:
|
|
201
201
|
description: Webspicy helps testing web services as software operation black boxes
|
202
202
|
email: blambeau@gmail.com
|
203
203
|
executables:
|
204
|
+
- sandr
|
205
|
+
- search
|
204
206
|
- webspicy
|
205
207
|
extensions: []
|
206
208
|
extra_rdoc_files: []
|
@@ -208,6 +210,8 @@ files:
|
|
208
210
|
- Gemfile
|
209
211
|
- README.md
|
210
212
|
- Rakefile
|
213
|
+
- bin/sandr
|
214
|
+
- bin/search
|
211
215
|
- bin/webspicy
|
212
216
|
- doc/1-black-box-scene.md
|
213
217
|
- doc/2-black-box-testing.md
|
@@ -256,11 +260,11 @@ files:
|
|
256
260
|
- lib/webspicy/tester/reporter.rb
|
257
261
|
- lib/webspicy/tester/reporter/composite.rb
|
258
262
|
- lib/webspicy/tester/reporter/documentation.rb
|
259
|
-
- lib/webspicy/tester/reporter/error_count.rb
|
260
263
|
- lib/webspicy/tester/reporter/exceptions.rb
|
261
264
|
- lib/webspicy/tester/reporter/file_progress.rb
|
262
265
|
- lib/webspicy/tester/reporter/file_summary.rb
|
263
266
|
- lib/webspicy/tester/reporter/progress.rb
|
267
|
+
- lib/webspicy/tester/reporter/success_or_not.rb
|
264
268
|
- lib/webspicy/tester/reporter/summary.rb
|
265
269
|
- lib/webspicy/tester/result.rb
|
266
270
|
- lib/webspicy/tester/result/assert_met.rb
|
@@ -322,7 +326,7 @@ homepage: http://github.com/enspirit/webspicy
|
|
322
326
|
licenses:
|
323
327
|
- MIT
|
324
328
|
metadata: {}
|
325
|
-
post_install_message:
|
329
|
+
post_install_message:
|
326
330
|
rdoc_options: []
|
327
331
|
require_paths:
|
328
332
|
- lib
|
@@ -337,8 +341,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
337
341
|
- !ruby/object:Gem::Version
|
338
342
|
version: '0'
|
339
343
|
requirements: []
|
340
|
-
rubygems_version: 3.0.
|
341
|
-
signing_key:
|
344
|
+
rubygems_version: 3.0.1
|
345
|
+
signing_key:
|
342
346
|
specification_version: 4
|
343
347
|
summary: Webspicy helps testing web services as software operation black boxes!
|
344
348
|
test_files: []
|
@@ -1,29 +0,0 @@
|
|
1
|
-
module Webspicy
|
2
|
-
class Tester
|
3
|
-
class Reporter
|
4
|
-
class ErrorCount < Reporter
|
5
|
-
|
6
|
-
def initialize(*args, &bl)
|
7
|
-
super
|
8
|
-
@errors = Hash.new{|h,k| 0 }
|
9
|
-
end
|
10
|
-
attr_reader :errors
|
11
|
-
|
12
|
-
[
|
13
|
-
:spec_file_error,
|
14
|
-
:check_error,
|
15
|
-
:check_failure
|
16
|
-
].each do |meth|
|
17
|
-
define_method(meth) do |*args, &bl|
|
18
|
-
@errors[meth] += 1
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def report
|
23
|
-
@errors.values.inject(0){|memo,x| memo+x }
|
24
|
-
end
|
25
|
-
|
26
|
-
end # class ErrorCount
|
27
|
-
end # class Reporter
|
28
|
-
end # class Tester
|
29
|
-
end # module Webspicy
|