webspicy 0.15.8 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +76 -24
  3. data/bin/webspicy +30 -14
  4. data/examples/restful/Gemfile.lock +40 -24
  5. data/examples/restful/Rakefile +0 -1
  6. data/examples/restful/app.rb +4 -1
  7. data/examples/restful/webspicy/config.rb +9 -0
  8. data/examples/restful/webspicy/{todo/deleteTodo.yml → formaldef/todo/_one/delete.yml} +7 -1
  9. data/examples/restful/webspicy/formaldef/todo/_one/get.simpler.yml +46 -0
  10. data/examples/restful/webspicy/{todo/getTodo.yml → formaldef/todo/_one/get.yml} +0 -0
  11. data/examples/restful/webspicy/{todo/patchTodo.yml → formaldef/todo/_one/patch.yml} +3 -0
  12. data/examples/restful/webspicy/{todo/putTodo.yml → formaldef/todo/_one/put.yml} +0 -0
  13. data/examples/restful/webspicy/{todo/getTodos.yml → formaldef/todo/get.yml} +0 -0
  14. data/examples/restful/webspicy/{todo → formaldef/todo}/options.yml +1 -1
  15. data/examples/restful/webspicy/{todo/postCsv.yml → formaldef/todo/post.csv.yml} +0 -0
  16. data/examples/restful/webspicy/{todo/postFile.yml → formaldef/todo/post.file.yml} +1 -1
  17. data/examples/restful/webspicy/{todo/postTodos.yml → formaldef/todo/post.yml} +0 -0
  18. data/examples/restful/webspicy/{todo → formaldef/todo}/todos.csv +0 -0
  19. data/examples/restful/webspicy/rack.rb +1 -1
  20. data/examples/restful/webspicy/real.rb +1 -1
  21. data/examples/restful/webspicy/schema.fio +2 -2
  22. data/examples/restful/webspicy/support/must_be_authenticated.rb +2 -2
  23. data/examples/restful/webspicy/support/todo_not_removed.rb +21 -0
  24. data/examples/restful/webspicy/support/todo_removed.rb +20 -0
  25. data/examples/single_spec/spec.yml +59 -0
  26. data/examples/website/config.rb +2 -0
  27. data/examples/website/schema.fio +1 -0
  28. data/examples/website/specification/get-http.yml +30 -0
  29. data/examples/website/specification/get-https.yml +30 -0
  30. data/lib/finitio/webspicy/scalars.fio +25 -0
  31. data/lib/webspicy.rb +49 -17
  32. data/lib/webspicy/checker.rb +5 -20
  33. data/lib/webspicy/configuration.rb +79 -14
  34. data/lib/webspicy/configuration/scope.rb +154 -0
  35. data/lib/webspicy/configuration/single_url.rb +58 -0
  36. data/lib/webspicy/configuration/single_yml_file.rb +30 -0
  37. data/lib/webspicy/formaldoc.fio +25 -8
  38. data/lib/webspicy/mocker.rb +8 -8
  39. data/lib/webspicy/mocker/config.ru +5 -0
  40. data/lib/webspicy/openapi.rb +1 -0
  41. data/lib/webspicy/openapi/generator.rb +127 -0
  42. data/lib/webspicy/rspec/checker.rb +2 -0
  43. data/lib/webspicy/rspec/checker/rspec_checker.rb +24 -0
  44. data/lib/webspicy/rspec/support/rspec_runnable.rb +27 -0
  45. data/lib/webspicy/rspec/tester.rb +4 -0
  46. data/lib/webspicy/rspec/tester/rspec_asserter.rb +121 -0
  47. data/lib/webspicy/rspec/tester/rspec_matchers.rb +114 -0
  48. data/lib/webspicy/rspec/tester/rspec_tester.rb +63 -0
  49. data/lib/webspicy/{resource.rb → specification.rb} +31 -10
  50. data/lib/webspicy/specification/errcondition.rb +16 -0
  51. data/lib/webspicy/specification/file_upload.rb +37 -0
  52. data/lib/webspicy/specification/postcondition.rb +16 -0
  53. data/lib/webspicy/specification/precondition.rb +19 -0
  54. data/lib/webspicy/specification/precondition/global_request_headers.rb +35 -0
  55. data/lib/webspicy/specification/precondition/robust_to_invalid_input.rb +68 -0
  56. data/lib/webspicy/{resource → specification}/service.rb +38 -25
  57. data/lib/webspicy/specification/test_case.rb +133 -0
  58. data/lib/webspicy/support.rb +2 -0
  59. data/lib/webspicy/support/colorize.rb +28 -0
  60. data/lib/webspicy/support/data_object.rb +25 -0
  61. data/lib/webspicy/support/status_range.rb +6 -1
  62. data/lib/webspicy/tester.rb +8 -77
  63. data/lib/webspicy/tester/asserter.rb +11 -5
  64. data/lib/webspicy/tester/assertions.rb +13 -10
  65. data/lib/webspicy/tester/client.rb +63 -0
  66. data/lib/webspicy/tester/client/http_client.rb +154 -0
  67. data/lib/webspicy/tester/client/rack_test_client.rb +188 -0
  68. data/lib/webspicy/tester/client/support.rb +65 -0
  69. data/lib/webspicy/tester/failure.rb +6 -0
  70. data/lib/webspicy/tester/invocation.rb +70 -0
  71. data/lib/webspicy/version.rb +2 -2
  72. data/spec/{unit/spec_helper.rb → spec_helper.rb} +0 -0
  73. data/spec/unit/configuration/scope/test_each_service.rb +49 -0
  74. data/spec/unit/configuration/scope/test_each_specification.rb +68 -0
  75. data/spec/unit/configuration/scope/test_expand_example.rb +65 -0
  76. data/spec/unit/configuration/scope/test_to_real_url.rb +82 -0
  77. data/spec/unit/openapi/test_generator.rb +28 -0
  78. data/spec/unit/specification/precondition/test_global_request_headers.rb +42 -0
  79. data/spec/unit/{resource → specification}/service/test_dress_params.rb +2 -2
  80. data/spec/unit/specification/test_case/test_mutate.rb +24 -0
  81. data/spec/unit/{resource → specification}/test_instantiate_url.rb +5 -5
  82. data/spec/unit/{resource → specification}/test_url_placeholders.rb +4 -4
  83. data/spec/unit/test_configuration.rb +24 -7
  84. data/spec/unit/tester/client/test_around.rb +61 -0
  85. data/spec/unit/tester/test_asserter.rb +246 -0
  86. data/spec/unit/tester/test_assertions.rb +12 -10
  87. data/tasks/test.rake +3 -1
  88. metadata +106 -48
  89. data/LICENSE.md +0 -22
  90. data/lib/webspicy/client.rb +0 -61
  91. data/lib/webspicy/client/http_client.rb +0 -145
  92. data/lib/webspicy/client/rack_test_client.rb +0 -181
  93. data/lib/webspicy/client/support.rb +0 -48
  94. data/lib/webspicy/file_upload.rb +0 -35
  95. data/lib/webspicy/postcondition.rb +0 -14
  96. data/lib/webspicy/precondition.rb +0 -15
  97. data/lib/webspicy/resource/service/invocation.rb +0 -212
  98. data/lib/webspicy/resource/service/test_case.rb +0 -132
  99. data/lib/webspicy/scope.rb +0 -160
  100. data/spec/unit/client/test_around.rb +0 -59
  101. data/spec/unit/scope/test_each_resource.rb +0 -66
  102. data/spec/unit/scope/test_each_service.rb +0 -47
  103. data/spec/unit/scope/test_expand_example.rb +0 -63
  104. data/spec/unit/scope/test_to_real_url.rb +0 -80
@@ -0,0 +1,246 @@
1
+ require 'spec_helper'
2
+
3
+ module Webspicy
4
+ class Tester
5
+ describe Asserter do
6
+ describe '#includes' do
7
+ it 'returns nil when the value is found in an array' do
8
+ expect(Asserter.new([:a, 'foo', 99]).includes('', 'foo'))
9
+ .to eq nil
10
+ end
11
+
12
+ it 'returns nil when the assertion is identical to a non-array' do
13
+ expect(Asserter.new({ foo: Time.at(0) }).includes('', { foo: Time.at(0) }))
14
+ .to eq nil
15
+ end
16
+
17
+ it 'raises an exception with a descriptive message when the assertion is false' do
18
+ expect { Asserter.new([:a, 'foo', 99]).includes('', 42) }
19
+ .to raise_exception Failure,
20
+ 'Expected ["a","foo",99] to include 42'
21
+
22
+ end
23
+ end
24
+
25
+ describe '#notIncludes' do
26
+ it 'returns nil when the value is not found in an array' do
27
+ expect(Asserter.new([:a, 'foo', 99]).notIncludes('', 'boom'))
28
+ .to eq nil
29
+ end
30
+
31
+ it 'returns nil when the assertion and target are not identical' do
32
+ expect(Asserter.new({ foo: Time.at(0) }).notIncludes('', 'LOL'))
33
+ .to eq nil
34
+ end
35
+
36
+ it 'raises an exception with a descriptive message when the assertion is false' do
37
+ expect { Asserter.new([:a, 'foo', 99]).notIncludes('', 'foo') }
38
+ .to raise_exception Failure,
39
+ 'Expected ["a","foo",99] not to include foo'
40
+ end
41
+ end
42
+
43
+ describe '#empty' do
44
+ it 'returns nil when the target is empty' do
45
+ expect(Asserter.new([]).empty).to eq nil
46
+ expect(Asserter.new({}).empty).to eq nil
47
+ end
48
+
49
+ it 'raises an exception with a descriptive message when the assertion is false' do
50
+ expect { Asserter.new(['foo']).empty }
51
+ .to raise_exception Failure,
52
+ 'Expected ["foo"] to be empty'
53
+ end
54
+ end
55
+
56
+ describe '#notEmpty' do
57
+ it 'returns nil when the target is not empty' do
58
+ expect(Asserter.new(['foo']).notEmpty).to eq nil
59
+ expect(Asserter.new({ foo: 'bar' }).notEmpty).to eq nil
60
+ end
61
+
62
+ it 'raises an exception with a descriptive message when the assertion is false' do
63
+ expect { Asserter.new([]).notEmpty }
64
+ .to raise_exception Failure,
65
+ 'Expected [] to be non empty'
66
+ expect { Asserter.new({}).notEmpty }
67
+ .to raise_exception Failure,
68
+ 'Expected {} to be non empty'
69
+ end
70
+ end
71
+
72
+ describe '#size' do
73
+ let(:target) { [1, 2, 3, 4] }
74
+ let(:asserter) { Asserter.new(target) }
75
+
76
+ it 'returns nil when the assertion is true for a plain array' do
77
+ expect(asserter.size('', 4)).to eq nil
78
+ end
79
+
80
+ it 'raises an exception with a descriptive message when the assertion is false' do
81
+ expect { asserter.size('', 3) }
82
+ .to raise_exception Failure, 'Expected [1,2,3,4] to have a size of 3, actual size is: 4'
83
+ end
84
+
85
+ context 'with a string' do
86
+ let(:target) { 'FooBaz' }
87
+
88
+ it 'returns nil when the assertion is true' do
89
+ expect(asserter.size('', 6)).to eq nil
90
+ end
91
+ end
92
+
93
+ context 'with an array at a nested path' do
94
+ let(:target) { { foo: [1, 2, { bar: [10, 11, 12] }, 4] } }
95
+
96
+ it 'returns nil when the assertion is true' do
97
+ expect(asserter.size('foo/2/bar', 3)).to eq nil
98
+ end
99
+
100
+ it 'raises an exception with a descriptive message when the assertion is false' do
101
+ expect { asserter.size('foo/2/bar', 99) }
102
+ .to raise_exception Failure,
103
+ 'Expected [10,11,12] to have a size of 99, actual size is: 3'
104
+ end
105
+
106
+ it 'raises an InvalidArgError when the path is invalid' do
107
+ expect { asserter.size('foo/28/bar', 99) }
108
+ .to raise_exception Webspicy::Tester::Assertions::InvalidArgError,
109
+ 'Expecting instance responding to size'
110
+ end
111
+ end
112
+ end
113
+
114
+ describe '#idIn' do
115
+ it 'returns nil when the specified ids match exactly' do
116
+ expect(Asserter.new([{ id: 1 }, { id: 2 }]).idIn('', 1, 2)).to eq nil
117
+ expect(Asserter.new({ id: 123 }).idIn('', 123)).to eq nil
118
+
119
+ os = OpenStruct.new(id: 'foo')
120
+ expect(Asserter.new(os).idIn('', 'foo')).to eq nil
121
+ end
122
+
123
+ it 'raises an exception with a descriptive message when the assertion is false' do
124
+ expect { Asserter.new([{ id: 1}, { id: 2}]).idIn('', 123, 125) }
125
+ .to raise_exception Failure,
126
+ 'Expected [{"id":1},{"id":2}] to have ids 123,125'
127
+ expect { Asserter.new([{ id: 1}, { id: 2}]).idIn('', 1, 2, 3) }
128
+ .to raise_exception Failure,
129
+ 'Expected [{"id":1},{"id":2}] to have ids 1,2,3'
130
+ expect { Asserter.new([{ id: 1}, { id: 2}]).idIn('', 1) }
131
+ .to raise_exception Failure,
132
+ 'Expected [{"id":1},{"id":2}] to have ids 1'
133
+ end
134
+ end
135
+
136
+ describe '#idNotIn' do
137
+ it 'returns nil when the specified ids do not match exactly' do
138
+ expect(Asserter.new([{ id: 1 }, { id: 2 }]).idNotIn('', 123, 125)).to eq nil
139
+ expect(Asserter.new({ id: 123 }).idNotIn('', 1, 2, 3)).to eq nil
140
+ expect(Asserter.new({ id: 123 }).idNotIn('', 1)).to eq nil
141
+ end
142
+
143
+ it 'raises an exception with a descriptive message when the assertion is false' do
144
+ expect { Asserter.new([{ id: 1}, { id: 2}]).idNotIn('', 1, 2) }
145
+ .to raise_exception Failure,
146
+ 'Expected [{"id":1},{"id":2}] to not have ids 1,2'
147
+ expect { Asserter.new({ id: 1}).idNotIn('', 1) }
148
+ .to raise_exception Failure,
149
+ 'Expected {"id":1} to not have ids 1'
150
+
151
+ os = OpenStruct.new(id: 'foo')
152
+ expect { Asserter.new(os).idNotIn('', 'foo') }
153
+ .to raise_exception Failure,
154
+ 'Expected "#<OpenStruct id=\"foo\">"... to not have ids foo'
155
+ end
156
+ end
157
+ end
158
+
159
+ describe '#idFD' do
160
+ let(:target) do
161
+ [
162
+ { id: 1, a: 'a1', b: 'b1' },
163
+ { id: 2, a: 'a2', b: 'b2' }
164
+ ]
165
+ end
166
+
167
+ it 'returns nil when the element with specified id matches the expected keys-value pairs' do
168
+ expect(Asserter.new(target).idFD('', 2, { b: 'b2' })).to eq nil
169
+ expect(Asserter.new(target).idFD('', 2, { a: 'a2', b: 'b2' })).to eq nil
170
+ end
171
+
172
+ it 'raises an exception when the assertion is false' do
173
+ expect { Asserter.new(target).idFD('', 2, { c: 'c2' }) }
174
+ .to raise_exception Failure,
175
+ 'Expected [{"id":1,"a":"a1","b":"b1"... ' \
176
+ 'to contain the key(s) and value(s) {:c=>"c2"}'
177
+ expect { Asserter.new(target).idFD('', 2, { b: 'b1' }) }
178
+ .to raise_exception Failure,
179
+ 'Expected [{"id":1,"a":"a1","b":"b1"... ' \
180
+ 'to contain the key(s) and value(s) {:b=>"b1"}'
181
+ end
182
+
183
+ it 'raises an exception with a descriptive message when no element with the specified id is present in target' do
184
+ expect { Asserter.new(target).idFD('', 3, { a: 'a3' }) }
185
+ .to raise_exception Failure,
186
+ 'Expected an element with id 3 to contain ' \
187
+ 'the key(s) and value(s) {:a=>"a3"}, '\
188
+ 'but there is no element with that id'
189
+ end
190
+ end
191
+
192
+ describe '#pathFD' do
193
+ let(:target) do
194
+ [
195
+ { a: 'a1', b: 'b1' },
196
+ { a: 'a2', b: 'b2' }
197
+ ]
198
+ end
199
+
200
+ it 'returns nil when the target matches the expected keys-value pairs' do
201
+ expect(Asserter.new(target).pathFD('0', { b: 'b1' })).to eq nil
202
+ expect(Asserter.new(target).pathFD('0', { a: 'a1', b: 'b1' })).to eq nil
203
+ expect(Asserter.new(target).pathFD('1', { b: 'b2' })).to eq nil
204
+ expect(Asserter.new(target).pathFD('1', { a: 'a2', b: 'b2' })).to eq nil
205
+ end
206
+
207
+ it 'raises an exception when the assertion is false' do
208
+ expect { Asserter.new(target).pathFD('0', { c: 'c2' }) }
209
+ .to raise_exception Failure,
210
+ 'Expected {"a":"a1","b":"b1"} ' \
211
+ 'to contain the key(s) and value(s) {:c=>"c2"}'
212
+ expect { Asserter.new(target).pathFD('0', { b: 'b2' }) }
213
+ .to raise_exception Failure,
214
+ 'Expected {"a":"a1","b":"b1"} ' \
215
+ 'to contain the key(s) and value(s) {:b=>"b2"}'
216
+ end
217
+ end
218
+
219
+ describe '#match' do
220
+ it 'returns nil when the target matches the specified regexp' do
221
+ expect(Asserter.new('Empathise').match('', /path/)).to eq nil
222
+ expect(Asserter.new('Empathise').match('', /.mp/)).to eq nil
223
+ end
224
+
225
+ it 'raises an exception when the assertion is false' do
226
+ expect { Asserter.new('Empathise').match('', /ize/) }
227
+ .to raise_exception Failure,
228
+ 'Expected "Empathise" to match /ize/'
229
+ end
230
+ end
231
+
232
+ describe '#notMatch' do
233
+ it 'returns nil when the target does not matche the specified regexp' do
234
+ expect(Asserter.new('Empathise').notMatch('', /ize/)).to eq nil
235
+ expect(Asserter.new('Empathise').notMatch('', /^path/)).to eq nil
236
+ end
237
+
238
+ it 'raises an exception when the assertion is false' do
239
+ expect { Asserter.new('Empathise').notMatch('', /path/) }
240
+ .to raise_exception Failure,
241
+ 'Expected "Empathise" not to match /path/'
242
+ end
243
+ end
244
+ end
245
+ end
246
+
@@ -23,7 +23,7 @@ module Webspicy
23
23
  expect(includes [5, 1], 1).to be(true)
24
24
  end
25
25
 
26
- it 'has an notIcludes() assertion' do
26
+ it 'has a notIncludes() assertion' do
27
27
  expect(notIncludes [], 1).to be(true)
28
28
  expect(notIncludes [5, 1], 1).to be(false)
29
29
  end
@@ -37,7 +37,7 @@ module Webspicy
37
37
  expect(exists({ foo: {} }, 'foo/bar')).to be(false)
38
38
  end
39
39
 
40
- it 'has an notExists() assertion' do
40
+ it 'has a notExists() assertion' do
41
41
  expect(notExists nil).to be(true)
42
42
  expect(notExists []).to be(false)
43
43
  expect(notExists [1]).to be(false)
@@ -60,7 +60,7 @@ module Webspicy
60
60
  expect(notEmpty({ foo: [1] }, 'foo')).to be(true)
61
61
  end
62
62
 
63
- it 'has an size() assertion' do
63
+ it 'has a size() assertion' do
64
64
  expect(size [], 0).to be(true)
65
65
  expect(size [], 1).to be(false)
66
66
  expect(size [12], 1).to be(true)
@@ -96,17 +96,19 @@ module Webspicy
96
96
  { id: 1, bar: "bar" },
97
97
  { id: 2, bar: "baz" }
98
98
  ] }
99
- expect(idFD(target, 'foo', 1, bar: "bar")).to be(true)
100
- expect(idFD(target, 'foo', 1, bar: "baz")).to be(false)
101
- expect(idFD(target, 'foo', 1, baz: "boz")).to be(false)
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
- expect(idFD(target, 'foo', 1, bar: "bar")).to be(true)
105
- expect(idFD(target, 'foo', 1, bar: "baz")).to be(false)
106
- expect(idFD(target, 'foo', 1, baz: "boz")).to be(false)
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
- it 'has an pathFD assertion' do
111
+ it 'has a pathFD assertion' do
110
112
  target = { foo: { bar: "baz"} }
111
113
  expect(pathFD(target, 'foo', bar: "baz")).to be(true)
112
114
  expect(pathFD(target, 'foo', bar: "boz")).to be(false)
@@ -11,7 +11,9 @@ namespace :test do
11
11
  tests << :unit
12
12
 
13
13
  require 'path'
14
- Path.dir.parent.glob("examples/*").select{|f| f.directory? }.each do |file|
14
+ Path.dir.parent.glob("examples/*").select{|f|
15
+ f.directory? && (f/"Rakefile").exists?
16
+ }.each do |file|
15
17
  test_name = file.basename.to_s.to_sym
16
18
  desc "Runs the integration tests on the #{file.basename} example"
17
19
  task(test_name) 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.15.8
4
+ version: 0.17.0
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: 2020-08-28 00:00:00.000000000 Z
11
+ date: 2021-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.7'
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.7'
54
+ version: '3.10'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec_junit_formatter
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: finitio
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.8.0
89
+ version: 0.9.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.8.0
96
+ version: 0.9.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: http
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: path
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '1.3'
117
+ version: '2.0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '1.3'
124
+ version: '2.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rack-robustness
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -170,6 +170,34 @@ dependencies:
170
170
  - - ">="
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
+ - !ruby/object:Gem::Dependency
174
+ name: colorize
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: 0.8.1
180
+ type: :runtime
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - "~>"
185
+ - !ruby/object:Gem::Version
186
+ version: 0.8.1
187
+ - !ruby/object:Gem::Dependency
188
+ name: openapi3_parser
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - "~>"
192
+ - !ruby/object:Gem::Version
193
+ version: 0.8.2
194
+ type: :runtime
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - "~>"
199
+ - !ruby/object:Gem::Version
200
+ version: 0.8.2
173
201
  description: Webspicy helps testing web services as software operation black boxes
174
202
  email: blambeau@gmail.com
175
203
  executables:
@@ -178,7 +206,6 @@ extensions: []
178
206
  extra_rdoc_files: []
179
207
  files:
180
208
  - Gemfile
181
- - LICENSE.md
182
209
  - README.md
183
210
  - Rakefile
184
211
  - bin/webspicy
@@ -187,57 +214,88 @@ files:
187
214
  - examples/restful/Rakefile
188
215
  - examples/restful/app.rb
189
216
  - examples/restful/webspicy/config.rb
217
+ - examples/restful/webspicy/formaldef/todo/_one/delete.yml
218
+ - examples/restful/webspicy/formaldef/todo/_one/get.simpler.yml
219
+ - examples/restful/webspicy/formaldef/todo/_one/get.yml
220
+ - examples/restful/webspicy/formaldef/todo/_one/patch.yml
221
+ - examples/restful/webspicy/formaldef/todo/_one/put.yml
222
+ - examples/restful/webspicy/formaldef/todo/get.yml
223
+ - examples/restful/webspicy/formaldef/todo/options.yml
224
+ - examples/restful/webspicy/formaldef/todo/post.csv.yml
225
+ - examples/restful/webspicy/formaldef/todo/post.file.yml
226
+ - examples/restful/webspicy/formaldef/todo/post.yml
227
+ - examples/restful/webspicy/formaldef/todo/todos.csv
190
228
  - examples/restful/webspicy/rack.rb
191
229
  - examples/restful/webspicy/real.rb
192
230
  - examples/restful/webspicy/schema.fio
193
231
  - examples/restful/webspicy/support/must_be_an_admin.rb
194
232
  - examples/restful/webspicy/support/must_be_authenticated.rb
195
- - examples/restful/webspicy/todo/deleteTodo.yml
196
- - examples/restful/webspicy/todo/getTodo.yml
197
- - examples/restful/webspicy/todo/getTodos.yml
198
- - examples/restful/webspicy/todo/options.yml
199
- - examples/restful/webspicy/todo/patchTodo.yml
200
- - examples/restful/webspicy/todo/postCsv.yml
201
- - examples/restful/webspicy/todo/postFile.yml
202
- - examples/restful/webspicy/todo/postTodos.yml
203
- - examples/restful/webspicy/todo/putTodo.yml
204
- - examples/restful/webspicy/todo/todos.csv
233
+ - examples/restful/webspicy/support/todo_not_removed.rb
234
+ - examples/restful/webspicy/support/todo_removed.rb
235
+ - examples/single_spec/spec.yml
236
+ - examples/website/config.rb
237
+ - examples/website/schema.fio
238
+ - examples/website/specification/get-http.yml
239
+ - examples/website/specification/get-https.yml
240
+ - lib/finitio/webspicy/scalars.fio
205
241
  - lib/webspicy.rb
206
242
  - lib/webspicy/checker.rb
207
- - lib/webspicy/client.rb
208
- - lib/webspicy/client/http_client.rb
209
- - lib/webspicy/client/rack_test_client.rb
210
- - lib/webspicy/client/support.rb
211
243
  - lib/webspicy/configuration.rb
212
- - lib/webspicy/file_upload.rb
244
+ - lib/webspicy/configuration/scope.rb
245
+ - lib/webspicy/configuration/single_url.rb
246
+ - lib/webspicy/configuration/single_yml_file.rb
213
247
  - lib/webspicy/formaldoc.fio
214
248
  - lib/webspicy/mocker.rb
215
- - lib/webspicy/postcondition.rb
216
- - lib/webspicy/precondition.rb
217
- - lib/webspicy/resource.rb
218
- - lib/webspicy/resource/service.rb
219
- - lib/webspicy/resource/service/invocation.rb
220
- - lib/webspicy/resource/service/test_case.rb
221
- - lib/webspicy/scope.rb
249
+ - lib/webspicy/mocker/config.ru
250
+ - lib/webspicy/openapi.rb
251
+ - lib/webspicy/openapi/generator.rb
252
+ - lib/webspicy/rspec/checker.rb
253
+ - lib/webspicy/rspec/checker/rspec_checker.rb
254
+ - lib/webspicy/rspec/support/rspec_runnable.rb
255
+ - lib/webspicy/rspec/tester.rb
256
+ - lib/webspicy/rspec/tester/rspec_asserter.rb
257
+ - lib/webspicy/rspec/tester/rspec_matchers.rb
258
+ - lib/webspicy/rspec/tester/rspec_tester.rb
259
+ - lib/webspicy/specification.rb
260
+ - lib/webspicy/specification/errcondition.rb
261
+ - lib/webspicy/specification/file_upload.rb
262
+ - lib/webspicy/specification/postcondition.rb
263
+ - lib/webspicy/specification/precondition.rb
264
+ - lib/webspicy/specification/precondition/global_request_headers.rb
265
+ - lib/webspicy/specification/precondition/robust_to_invalid_input.rb
266
+ - lib/webspicy/specification/service.rb
267
+ - lib/webspicy/specification/test_case.rb
222
268
  - lib/webspicy/support.rb
269
+ - lib/webspicy/support/colorize.rb
270
+ - lib/webspicy/support/data_object.rb
223
271
  - lib/webspicy/support/status_range.rb
224
272
  - lib/webspicy/tester.rb
225
273
  - lib/webspicy/tester/asserter.rb
226
274
  - lib/webspicy/tester/assertions.rb
275
+ - lib/webspicy/tester/client.rb
276
+ - lib/webspicy/tester/client/http_client.rb
277
+ - lib/webspicy/tester/client/rack_test_client.rb
278
+ - lib/webspicy/tester/client/support.rb
279
+ - lib/webspicy/tester/failure.rb
280
+ - lib/webspicy/tester/invocation.rb
227
281
  - lib/webspicy/version.rb
228
- - spec/unit/client/test_around.rb
282
+ - spec/spec_helper.rb
229
283
  - spec/unit/configuration/config.rb
284
+ - spec/unit/configuration/scope/test_each_service.rb
285
+ - spec/unit/configuration/scope/test_each_specification.rb
286
+ - spec/unit/configuration/scope/test_expand_example.rb
287
+ - spec/unit/configuration/scope/test_to_real_url.rb
230
288
  - spec/unit/mocker/test_mocker.rb
231
- - spec/unit/resource/service/test_dress_params.rb
232
- - spec/unit/resource/test_instantiate_url.rb
233
- - spec/unit/resource/test_url_placeholders.rb
234
- - spec/unit/scope/test_each_resource.rb
235
- - spec/unit/scope/test_each_service.rb
236
- - spec/unit/scope/test_expand_example.rb
237
- - spec/unit/scope/test_to_real_url.rb
238
- - spec/unit/spec_helper.rb
289
+ - spec/unit/openapi/test_generator.rb
290
+ - spec/unit/specification/precondition/test_global_request_headers.rb
291
+ - spec/unit/specification/service/test_dress_params.rb
292
+ - spec/unit/specification/test_case/test_mutate.rb
293
+ - spec/unit/specification/test_instantiate_url.rb
294
+ - spec/unit/specification/test_url_placeholders.rb
239
295
  - spec/unit/support/test_status_range.rb
240
296
  - spec/unit/test_configuration.rb
297
+ - spec/unit/tester/client/test_around.rb
298
+ - spec/unit/tester/test_asserter.rb
241
299
  - spec/unit/tester/test_assertions.rb
242
300
  - tasks/gem.rake
243
301
  - tasks/test.rake
@@ -245,7 +303,7 @@ homepage: http://github.com/enspirit/webspicy
245
303
  licenses:
246
304
  - MIT
247
305
  metadata: {}
248
- post_install_message:
306
+ post_install_message:
249
307
  rdoc_options: []
250
308
  require_paths:
251
309
  - lib
@@ -260,8 +318,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
318
  - !ruby/object:Gem::Version
261
319
  version: '0'
262
320
  requirements: []
263
- rubygems_version: 3.1.2
264
- signing_key:
321
+ rubygems_version: 3.1.4
322
+ signing_key:
265
323
  specification_version: 4
266
324
  summary: Webspicy helps testing web services as software operation black boxes!
267
325
  test_files: []