webspicy 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -5
- data/examples/restful/webspicy/config.rb +1 -0
- data/examples/restful/webspicy/{todo/deleteTodo.yml → formaldef/todo/_one/delete.yml} +3 -0
- data/examples/restful/webspicy/{todo/getTodoSingleServiceFormat.yml → formaldef/todo/_one/get.simpler.yml} +0 -0
- data/examples/restful/webspicy/{todo/getTodo.yml → formaldef/todo/_one/get.yml} +0 -0
- data/examples/restful/webspicy/{todo/patchTodo.yml → formaldef/todo/_one/patch.yml} +0 -0
- data/examples/restful/webspicy/{todo/putTodo.yml → formaldef/todo/_one/put.yml} +0 -0
- data/examples/restful/webspicy/{todo/getTodos.yml → formaldef/todo/get.yml} +0 -0
- data/examples/restful/webspicy/{todo → formaldef/todo}/options.yml +0 -0
- data/examples/restful/webspicy/{todo/postCsv.yml → formaldef/todo/post.csv.yml} +0 -0
- data/examples/restful/webspicy/{todo/postFile.yml → formaldef/todo/post.file.yml} +0 -0
- data/examples/restful/webspicy/{todo/postTodos.yml → formaldef/todo/post.yml} +0 -0
- data/examples/restful/webspicy/{todo → formaldef/todo}/todos.csv +0 -0
- data/examples/restful/webspicy/support/todo_not_removed.rb +21 -0
- data/examples/restful/webspicy/support/todo_removed.rb +5 -3
- data/examples/website/specification/get-http.yml +20 -24
- data/examples/website/specification/get-https.yml +20 -24
- data/lib/webspicy.rb +4 -3
- data/lib/webspicy/checker.rb +5 -20
- data/lib/webspicy/configuration.rb +9 -0
- data/lib/webspicy/configuration/scope.rb +0 -8
- data/lib/webspicy/formaldoc.fio +8 -6
- data/lib/webspicy/mocker/config.ru +5 -0
- data/lib/webspicy/rspec/checker.rb +2 -0
- data/lib/webspicy/rspec/checker/rspec_checker.rb +24 -0
- data/lib/webspicy/rspec/support/rspec_runnable.rb +27 -0
- data/lib/webspicy/rspec/tester.rb +4 -0
- data/lib/webspicy/{tester → rspec/tester}/rspec_asserter.rb +24 -11
- data/lib/webspicy/{tester → rspec/tester}/rspec_matchers.rb +10 -0
- data/lib/webspicy/rspec/tester/rspec_tester.rb +63 -0
- data/lib/webspicy/specification.rb +10 -10
- data/lib/webspicy/specification/errcondition.rb +16 -0
- data/lib/webspicy/specification/precondition/robust_to_invalid_input.rb +1 -1
- data/lib/webspicy/specification/service.rb +27 -19
- data/lib/webspicy/specification/test_case.rb +3 -9
- data/lib/webspicy/support.rb +1 -0
- data/lib/webspicy/support/data_object.rb +25 -0
- data/lib/webspicy/tester.rb +4 -78
- data/lib/webspicy/tester/asserter.rb +9 -4
- data/lib/webspicy/tester/assertions.rb +8 -9
- data/lib/webspicy/tester/failure.rb +6 -0
- data/lib/webspicy/tester/invocation.rb +8 -156
- data/lib/webspicy/version.rb +1 -1
- data/spec/unit/configuration/scope/test_each_service.rb +2 -2
- data/spec/unit/configuration/scope/test_each_specification.rb +7 -7
- data/spec/unit/test_configuration.rb +1 -1
- data/spec/unit/tester/test_asserter.rb +198 -3
- data/spec/unit/tester/test_assertions.rb +8 -6
- metadata +33 -25
- data/LICENSE.md +0 -22
- data/examples/restful/Gemfile.lock +0 -105
@@ -96,14 +96,16 @@ module Webspicy
|
|
96
96
|
{ id: 1, bar: "bar" },
|
97
97
|
{ id: 2, bar: "baz" }
|
98
98
|
] }
|
99
|
-
|
100
|
-
expect(idFD(
|
101
|
-
expect(idFD(
|
99
|
+
element = element_with_id(target, 'foo', 1)
|
100
|
+
expect(idFD(element, bar: "bar")).to be(true)
|
101
|
+
expect(idFD(element, bar: "baz")).to be(false)
|
102
|
+
expect(idFD(element, baz: "boz")).to be(false)
|
102
103
|
|
103
104
|
target = { foo: { id: 1, bar: "bar" } }
|
104
|
-
|
105
|
-
expect(idFD(
|
106
|
-
expect(idFD(
|
105
|
+
element = element_with_id(target, 'foo', 1)
|
106
|
+
expect(idFD(element, bar: "bar")).to be(true)
|
107
|
+
expect(idFD(element, bar: "baz")).to be(false)
|
108
|
+
expect(idFD(element, baz: "boz")).to be(false)
|
107
109
|
end
|
108
110
|
|
109
111
|
it 'has a pathFD assertion' do
|
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.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernard Lambeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '13'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '13'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sinatra
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.10'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
54
|
+
version: '3.10'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec_junit_formatter
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,28 +86,28 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.10.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.10.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: http
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '4'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '4'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: path
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,32 +206,31 @@ extensions: []
|
|
206
206
|
extra_rdoc_files: []
|
207
207
|
files:
|
208
208
|
- Gemfile
|
209
|
-
- LICENSE.md
|
210
209
|
- README.md
|
211
210
|
- Rakefile
|
212
211
|
- bin/webspicy
|
213
212
|
- examples/restful/Gemfile
|
214
|
-
- examples/restful/Gemfile.lock
|
215
213
|
- examples/restful/Rakefile
|
216
214
|
- examples/restful/app.rb
|
217
215
|
- examples/restful/webspicy/config.rb
|
216
|
+
- examples/restful/webspicy/formaldef/todo/_one/delete.yml
|
217
|
+
- examples/restful/webspicy/formaldef/todo/_one/get.simpler.yml
|
218
|
+
- examples/restful/webspicy/formaldef/todo/_one/get.yml
|
219
|
+
- examples/restful/webspicy/formaldef/todo/_one/patch.yml
|
220
|
+
- examples/restful/webspicy/formaldef/todo/_one/put.yml
|
221
|
+
- examples/restful/webspicy/formaldef/todo/get.yml
|
222
|
+
- examples/restful/webspicy/formaldef/todo/options.yml
|
223
|
+
- examples/restful/webspicy/formaldef/todo/post.csv.yml
|
224
|
+
- examples/restful/webspicy/formaldef/todo/post.file.yml
|
225
|
+
- examples/restful/webspicy/formaldef/todo/post.yml
|
226
|
+
- examples/restful/webspicy/formaldef/todo/todos.csv
|
218
227
|
- examples/restful/webspicy/rack.rb
|
219
228
|
- examples/restful/webspicy/real.rb
|
220
229
|
- examples/restful/webspicy/schema.fio
|
221
230
|
- examples/restful/webspicy/support/must_be_an_admin.rb
|
222
231
|
- examples/restful/webspicy/support/must_be_authenticated.rb
|
232
|
+
- examples/restful/webspicy/support/todo_not_removed.rb
|
223
233
|
- examples/restful/webspicy/support/todo_removed.rb
|
224
|
-
- examples/restful/webspicy/todo/deleteTodo.yml
|
225
|
-
- examples/restful/webspicy/todo/getTodo.yml
|
226
|
-
- examples/restful/webspicy/todo/getTodoSingleServiceFormat.yml
|
227
|
-
- examples/restful/webspicy/todo/getTodos.yml
|
228
|
-
- examples/restful/webspicy/todo/options.yml
|
229
|
-
- examples/restful/webspicy/todo/patchTodo.yml
|
230
|
-
- examples/restful/webspicy/todo/postCsv.yml
|
231
|
-
- examples/restful/webspicy/todo/postFile.yml
|
232
|
-
- examples/restful/webspicy/todo/postTodos.yml
|
233
|
-
- examples/restful/webspicy/todo/putTodo.yml
|
234
|
-
- examples/restful/webspicy/todo/todos.csv
|
235
234
|
- examples/single_spec/spec.yml
|
236
235
|
- examples/website/config.rb
|
237
236
|
- examples/website/schema.fio
|
@@ -246,9 +245,18 @@ files:
|
|
246
245
|
- lib/webspicy/configuration/single_yml_file.rb
|
247
246
|
- lib/webspicy/formaldoc.fio
|
248
247
|
- lib/webspicy/mocker.rb
|
248
|
+
- lib/webspicy/mocker/config.ru
|
249
249
|
- lib/webspicy/openapi.rb
|
250
250
|
- lib/webspicy/openapi/generator.rb
|
251
|
+
- lib/webspicy/rspec/checker.rb
|
252
|
+
- lib/webspicy/rspec/checker/rspec_checker.rb
|
253
|
+
- lib/webspicy/rspec/support/rspec_runnable.rb
|
254
|
+
- lib/webspicy/rspec/tester.rb
|
255
|
+
- lib/webspicy/rspec/tester/rspec_asserter.rb
|
256
|
+
- lib/webspicy/rspec/tester/rspec_matchers.rb
|
257
|
+
- lib/webspicy/rspec/tester/rspec_tester.rb
|
251
258
|
- lib/webspicy/specification.rb
|
259
|
+
- lib/webspicy/specification/errcondition.rb
|
252
260
|
- lib/webspicy/specification/file_upload.rb
|
253
261
|
- lib/webspicy/specification/postcondition.rb
|
254
262
|
- lib/webspicy/specification/precondition.rb
|
@@ -258,6 +266,7 @@ files:
|
|
258
266
|
- lib/webspicy/specification/test_case.rb
|
259
267
|
- lib/webspicy/support.rb
|
260
268
|
- lib/webspicy/support/colorize.rb
|
269
|
+
- lib/webspicy/support/data_object.rb
|
261
270
|
- lib/webspicy/support/status_range.rb
|
262
271
|
- lib/webspicy/tester.rb
|
263
272
|
- lib/webspicy/tester/asserter.rb
|
@@ -266,9 +275,8 @@ files:
|
|
266
275
|
- lib/webspicy/tester/client/http_client.rb
|
267
276
|
- lib/webspicy/tester/client/rack_test_client.rb
|
268
277
|
- lib/webspicy/tester/client/support.rb
|
278
|
+
- lib/webspicy/tester/failure.rb
|
269
279
|
- lib/webspicy/tester/invocation.rb
|
270
|
-
- lib/webspicy/tester/rspec_asserter.rb
|
271
|
-
- lib/webspicy/tester/rspec_matchers.rb
|
272
280
|
- lib/webspicy/version.rb
|
273
281
|
- spec/spec_helper.rb
|
274
282
|
- spec/unit/configuration/config.rb
|
data/LICENSE.md
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# The MIT Licence
|
2
|
-
|
3
|
-
Copyright (c) 2020 - Enspirit SPRL (Bernard Lambeau)
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,105 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../..
|
3
|
-
specs:
|
4
|
-
webspicy (0.16.0)
|
5
|
-
colorize (~> 0.8.1)
|
6
|
-
finitio (~> 0.9.0)
|
7
|
-
http (>= 2)
|
8
|
-
mustermann (~> 1.0)
|
9
|
-
mustermann-contrib
|
10
|
-
openapi3_parser (~> 0.8.2)
|
11
|
-
path (~> 2.0)
|
12
|
-
rack-robustness (~> 1.1, >= 1.1.0)
|
13
|
-
rack-test (~> 0.6.3)
|
14
|
-
rspec (~> 3.7)
|
15
|
-
rspec_junit_formatter (~> 0.4.1)
|
16
|
-
|
17
|
-
GEM
|
18
|
-
remote: https://rubygems.org/
|
19
|
-
specs:
|
20
|
-
addressable (2.7.0)
|
21
|
-
public_suffix (>= 2.0.2, < 5.0)
|
22
|
-
citrus (3.0.2)
|
23
|
-
colorize (0.8.1)
|
24
|
-
commonmarker (0.21.0)
|
25
|
-
ruby-enum (~> 0.5)
|
26
|
-
concurrent-ruby (1.1.7)
|
27
|
-
diff-lcs (1.4.4)
|
28
|
-
domain_name (0.5.20190701)
|
29
|
-
unf (>= 0.0.5, < 1.0.0)
|
30
|
-
ffi (1.13.1)
|
31
|
-
ffi-compiler (1.0.1)
|
32
|
-
ffi (>= 1.0.0)
|
33
|
-
rake
|
34
|
-
finitio (0.9.0)
|
35
|
-
citrus (>= 2.4, < 4.0)
|
36
|
-
hansi (0.2.0)
|
37
|
-
http (4.4.1)
|
38
|
-
addressable (~> 2.3)
|
39
|
-
http-cookie (~> 1.0)
|
40
|
-
http-form_data (~> 2.2)
|
41
|
-
http-parser (~> 1.2.0)
|
42
|
-
http-cookie (1.0.3)
|
43
|
-
domain_name (~> 0.5)
|
44
|
-
http-form_data (2.3.0)
|
45
|
-
http-parser (1.2.2)
|
46
|
-
ffi-compiler
|
47
|
-
i18n (1.8.5)
|
48
|
-
concurrent-ruby (~> 1.0)
|
49
|
-
mustermann (1.1.1)
|
50
|
-
ruby2_keywords (~> 0.0.1)
|
51
|
-
mustermann-contrib (1.1.1)
|
52
|
-
hansi (~> 0.2.0)
|
53
|
-
mustermann (= 1.1.1)
|
54
|
-
openapi3_parser (0.8.2)
|
55
|
-
commonmarker (~> 0.17)
|
56
|
-
psych (~> 3.1)
|
57
|
-
path (2.0.1)
|
58
|
-
psych (3.2.1)
|
59
|
-
public_suffix (4.0.6)
|
60
|
-
rack (2.2.3)
|
61
|
-
rack-protection (2.1.0)
|
62
|
-
rack
|
63
|
-
rack-robustness (1.1.0)
|
64
|
-
rack-test (0.6.3)
|
65
|
-
rack (>= 1.0)
|
66
|
-
rake (12.3.3)
|
67
|
-
rspec (3.10.0)
|
68
|
-
rspec-core (~> 3.10.0)
|
69
|
-
rspec-expectations (~> 3.10.0)
|
70
|
-
rspec-mocks (~> 3.10.0)
|
71
|
-
rspec-core (3.10.0)
|
72
|
-
rspec-support (~> 3.10.0)
|
73
|
-
rspec-expectations (3.10.0)
|
74
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
-
rspec-support (~> 3.10.0)
|
76
|
-
rspec-mocks (3.10.0)
|
77
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
78
|
-
rspec-support (~> 3.10.0)
|
79
|
-
rspec-support (3.10.0)
|
80
|
-
rspec_junit_formatter (0.4.1)
|
81
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
82
|
-
ruby-enum (0.8.0)
|
83
|
-
i18n
|
84
|
-
ruby2_keywords (0.0.2)
|
85
|
-
sinatra (2.1.0)
|
86
|
-
mustermann (~> 1.0)
|
87
|
-
rack (~> 2.2)
|
88
|
-
rack-protection (= 2.1.0)
|
89
|
-
tilt (~> 2.0)
|
90
|
-
tilt (2.0.10)
|
91
|
-
unf (0.1.4)
|
92
|
-
unf_ext
|
93
|
-
unf_ext (0.0.7.7)
|
94
|
-
|
95
|
-
PLATFORMS
|
96
|
-
ruby
|
97
|
-
x86_64-darwin-15
|
98
|
-
|
99
|
-
DEPENDENCIES
|
100
|
-
rake (~> 12)
|
101
|
-
sinatra (~> 2)
|
102
|
-
webspicy!
|
103
|
-
|
104
|
-
BUNDLED WITH
|
105
|
-
2.2.1
|