washout_builder 1.7.4 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +15 -14
- data/Appraisals +8 -2
- data/README.md +22 -1
- data/Rakefile +3 -3
- data/app/controllers/washout_builder/washout_builder_controller.rb +9 -9
- data/app/helpers/washout_builder_complex_type_helper.rb +4 -2
- data/app/helpers/washout_builder_method_arguments_helper.rb +4 -2
- data/app/helpers/washout_builder_method_list_helper.rb +4 -2
- data/app/helpers/washout_builder_method_return_type_helper.rb +6 -4
- data/app/helpers/washout_builder_shared_helper.rb +29 -0
- data/app/views/wash_with_html/doc.builder +6 -6
- data/gemfiles/rails_6.1.3.gemfile +8 -0
- data/install-travis-bundler.sh +12 -10
- data/lib/washout_builder.rb +0 -1
- data/lib/washout_builder/document/complex_type.rb +35 -54
- data/lib/washout_builder/document/exception_model.rb +17 -18
- data/lib/washout_builder/document/generator.rb +6 -6
- data/lib/washout_builder/engine.rb +1 -0
- data/lib/washout_builder/env_checker.rb +2 -2
- data/lib/washout_builder/soap.rb +2 -2
- data/lib/washout_builder/version.rb +2 -2
- data/spec/app/controllers/washout_builder_controller_spec.rb +4 -4
- data/spec/dummy/app/views/layouts/application.html.erb +1 -1
- data/spec/dummy/public/404.html +1 -1
- data/spec/dummy/public/422.html +1 -1
- data/spec/dummy/public/500.html +1 -1
- data/spec/lib/washout_builder/document/complex_type_spec.rb +32 -36
- data/spec/lib/washout_builder/document/exception_model_spec.rb +5 -5
- data/spec/spec_helper.rb +37 -2
- data/spec/support/complex_types/test_type.rb +1 -2
- data/washout_builder.gemspec +3 -2
- metadata +55 -60
- data/lib/washout_builder/param.rb +0 -50
data/washout_builder.gemspec
CHANGED
@@ -22,12 +22,13 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_runtime_dependency 'wash_out', '>= 0.9.1', '>= 0.9.1'
|
23
23
|
s.add_runtime_dependency 'activesupport', '>= 4.0', '>= 4.0'
|
24
24
|
|
25
|
-
|
25
|
+
# wasabi >= 3.6.0 does not work well with savon
|
26
|
+
s.add_development_dependency 'wasabi', '< 3.6.0'
|
26
27
|
s.add_development_dependency 'savon', '~> 2.11', '>= 2.11'
|
27
28
|
s.add_development_dependency 'httpi', '~> 2.4', '>= 2.4'
|
28
29
|
s.add_development_dependency 'nokogiri', '~> 1.7', '>= 1.7'
|
29
30
|
|
30
|
-
s.add_development_dependency 'rspec-rails','4.0.
|
31
|
+
s.add_development_dependency 'rspec-rails','4.0.2'
|
31
32
|
s.add_development_dependency 'appraisal', '~> 2.1', '>= 2.1'
|
32
33
|
s.add_development_dependency 'simplecov', '~> 0.12', '>= 0.12'
|
33
34
|
s.add_development_dependency 'simplecov-summary', '~> 0.0.5', '>= 0.0.5'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: washout_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wash_out
|
@@ -42,80 +42,74 @@ dependencies:
|
|
42
42
|
name: wasabi
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '3.5'
|
48
|
-
- - "~>"
|
45
|
+
- - "<"
|
49
46
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
47
|
+
version: 3.6.0
|
51
48
|
type: :development
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
|
-
- - "
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '3.5'
|
58
|
-
- - "~>"
|
52
|
+
- - "<"
|
59
53
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
54
|
+
version: 3.6.0
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: savon
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
|
-
- - "
|
59
|
+
- - "~>"
|
66
60
|
- !ruby/object:Gem::Version
|
67
61
|
version: '2.11'
|
68
|
-
- - "
|
62
|
+
- - ">="
|
69
63
|
- !ruby/object:Gem::Version
|
70
64
|
version: '2.11'
|
71
65
|
type: :development
|
72
66
|
prerelease: false
|
73
67
|
version_requirements: !ruby/object:Gem::Requirement
|
74
68
|
requirements:
|
75
|
-
- - "
|
69
|
+
- - "~>"
|
76
70
|
- !ruby/object:Gem::Version
|
77
71
|
version: '2.11'
|
78
|
-
- - "
|
72
|
+
- - ">="
|
79
73
|
- !ruby/object:Gem::Version
|
80
74
|
version: '2.11'
|
81
75
|
- !ruby/object:Gem::Dependency
|
82
76
|
name: httpi
|
83
77
|
requirement: !ruby/object:Gem::Requirement
|
84
78
|
requirements:
|
85
|
-
- - "
|
79
|
+
- - "~>"
|
86
80
|
- !ruby/object:Gem::Version
|
87
81
|
version: '2.4'
|
88
|
-
- - "
|
82
|
+
- - ">="
|
89
83
|
- !ruby/object:Gem::Version
|
90
84
|
version: '2.4'
|
91
85
|
type: :development
|
92
86
|
prerelease: false
|
93
87
|
version_requirements: !ruby/object:Gem::Requirement
|
94
88
|
requirements:
|
95
|
-
- - "
|
89
|
+
- - "~>"
|
96
90
|
- !ruby/object:Gem::Version
|
97
91
|
version: '2.4'
|
98
|
-
- - "
|
92
|
+
- - ">="
|
99
93
|
- !ruby/object:Gem::Version
|
100
94
|
version: '2.4'
|
101
95
|
- !ruby/object:Gem::Dependency
|
102
96
|
name: nokogiri
|
103
97
|
requirement: !ruby/object:Gem::Requirement
|
104
98
|
requirements:
|
105
|
-
- - "
|
99
|
+
- - "~>"
|
106
100
|
- !ruby/object:Gem::Version
|
107
101
|
version: '1.7'
|
108
|
-
- - "
|
102
|
+
- - ">="
|
109
103
|
- !ruby/object:Gem::Version
|
110
104
|
version: '1.7'
|
111
105
|
type: :development
|
112
106
|
prerelease: false
|
113
107
|
version_requirements: !ruby/object:Gem::Requirement
|
114
108
|
requirements:
|
115
|
-
- - "
|
109
|
+
- - "~>"
|
116
110
|
- !ruby/object:Gem::Version
|
117
111
|
version: '1.7'
|
118
|
-
- - "
|
112
|
+
- - ">="
|
119
113
|
- !ruby/object:Gem::Version
|
120
114
|
version: '1.7'
|
121
115
|
- !ruby/object:Gem::Dependency
|
@@ -124,112 +118,112 @@ dependencies:
|
|
124
118
|
requirements:
|
125
119
|
- - '='
|
126
120
|
- !ruby/object:Gem::Version
|
127
|
-
version: 4.0.
|
121
|
+
version: 4.0.2
|
128
122
|
type: :development
|
129
123
|
prerelease: false
|
130
124
|
version_requirements: !ruby/object:Gem::Requirement
|
131
125
|
requirements:
|
132
126
|
- - '='
|
133
127
|
- !ruby/object:Gem::Version
|
134
|
-
version: 4.0.
|
128
|
+
version: 4.0.2
|
135
129
|
- !ruby/object:Gem::Dependency
|
136
130
|
name: appraisal
|
137
131
|
requirement: !ruby/object:Gem::Requirement
|
138
132
|
requirements:
|
139
|
-
- - "
|
133
|
+
- - "~>"
|
140
134
|
- !ruby/object:Gem::Version
|
141
135
|
version: '2.1'
|
142
|
-
- - "
|
136
|
+
- - ">="
|
143
137
|
- !ruby/object:Gem::Version
|
144
138
|
version: '2.1'
|
145
139
|
type: :development
|
146
140
|
prerelease: false
|
147
141
|
version_requirements: !ruby/object:Gem::Requirement
|
148
142
|
requirements:
|
149
|
-
- - "
|
143
|
+
- - "~>"
|
150
144
|
- !ruby/object:Gem::Version
|
151
145
|
version: '2.1'
|
152
|
-
- - "
|
146
|
+
- - ">="
|
153
147
|
- !ruby/object:Gem::Version
|
154
148
|
version: '2.1'
|
155
149
|
- !ruby/object:Gem::Dependency
|
156
150
|
name: simplecov
|
157
151
|
requirement: !ruby/object:Gem::Requirement
|
158
152
|
requirements:
|
159
|
-
- - "
|
153
|
+
- - "~>"
|
160
154
|
- !ruby/object:Gem::Version
|
161
155
|
version: '0.12'
|
162
|
-
- - "
|
156
|
+
- - ">="
|
163
157
|
- !ruby/object:Gem::Version
|
164
158
|
version: '0.12'
|
165
159
|
type: :development
|
166
160
|
prerelease: false
|
167
161
|
version_requirements: !ruby/object:Gem::Requirement
|
168
162
|
requirements:
|
169
|
-
- - "
|
163
|
+
- - "~>"
|
170
164
|
- !ruby/object:Gem::Version
|
171
165
|
version: '0.12'
|
172
|
-
- - "
|
166
|
+
- - ">="
|
173
167
|
- !ruby/object:Gem::Version
|
174
168
|
version: '0.12'
|
175
169
|
- !ruby/object:Gem::Dependency
|
176
170
|
name: simplecov-summary
|
177
171
|
requirement: !ruby/object:Gem::Requirement
|
178
172
|
requirements:
|
179
|
-
- - "
|
173
|
+
- - "~>"
|
180
174
|
- !ruby/object:Gem::Version
|
181
175
|
version: 0.0.5
|
182
|
-
- - "
|
176
|
+
- - ">="
|
183
177
|
- !ruby/object:Gem::Version
|
184
178
|
version: 0.0.5
|
185
179
|
type: :development
|
186
180
|
prerelease: false
|
187
181
|
version_requirements: !ruby/object:Gem::Requirement
|
188
182
|
requirements:
|
189
|
-
- - "
|
183
|
+
- - "~>"
|
190
184
|
- !ruby/object:Gem::Version
|
191
185
|
version: 0.0.5
|
192
|
-
- - "
|
186
|
+
- - ">="
|
193
187
|
- !ruby/object:Gem::Version
|
194
188
|
version: 0.0.5
|
195
189
|
- !ruby/object:Gem::Dependency
|
196
190
|
name: mocha
|
197
191
|
requirement: !ruby/object:Gem::Requirement
|
198
192
|
requirements:
|
199
|
-
- - "
|
193
|
+
- - "~>"
|
200
194
|
- !ruby/object:Gem::Version
|
201
195
|
version: '1.2'
|
202
|
-
- - "
|
196
|
+
- - ">="
|
203
197
|
- !ruby/object:Gem::Version
|
204
198
|
version: '1.2'
|
205
199
|
type: :development
|
206
200
|
prerelease: false
|
207
201
|
version_requirements: !ruby/object:Gem::Requirement
|
208
202
|
requirements:
|
209
|
-
- - "
|
203
|
+
- - "~>"
|
210
204
|
- !ruby/object:Gem::Version
|
211
205
|
version: '1.2'
|
212
|
-
- - "
|
206
|
+
- - ">="
|
213
207
|
- !ruby/object:Gem::Version
|
214
208
|
version: '1.2'
|
215
209
|
- !ruby/object:Gem::Dependency
|
216
210
|
name: coveralls
|
217
211
|
requirement: !ruby/object:Gem::Requirement
|
218
212
|
requirements:
|
219
|
-
- - "
|
213
|
+
- - "~>"
|
220
214
|
- !ruby/object:Gem::Version
|
221
215
|
version: '0.8'
|
222
|
-
- - "
|
216
|
+
- - ">="
|
223
217
|
- !ruby/object:Gem::Version
|
224
218
|
version: '0.8'
|
225
219
|
type: :development
|
226
220
|
prerelease: false
|
227
221
|
version_requirements: !ruby/object:Gem::Requirement
|
228
222
|
requirements:
|
229
|
-
- - "
|
223
|
+
- - "~>"
|
230
224
|
- !ruby/object:Gem::Version
|
231
225
|
version: '0.8'
|
232
|
-
- - "
|
226
|
+
- - ">="
|
233
227
|
- !ruby/object:Gem::Version
|
234
228
|
version: '0.8'
|
235
229
|
- !ruby/object:Gem::Dependency
|
@@ -256,60 +250,60 @@ dependencies:
|
|
256
250
|
name: yard-rspec
|
257
251
|
requirement: !ruby/object:Gem::Requirement
|
258
252
|
requirements:
|
259
|
-
- - "
|
253
|
+
- - "~>"
|
260
254
|
- !ruby/object:Gem::Version
|
261
255
|
version: '0.1'
|
262
|
-
- - "
|
256
|
+
- - ">="
|
263
257
|
- !ruby/object:Gem::Version
|
264
258
|
version: '0.1'
|
265
259
|
type: :development
|
266
260
|
prerelease: false
|
267
261
|
version_requirements: !ruby/object:Gem::Requirement
|
268
262
|
requirements:
|
269
|
-
- - "
|
263
|
+
- - "~>"
|
270
264
|
- !ruby/object:Gem::Version
|
271
265
|
version: '0.1'
|
272
|
-
- - "
|
266
|
+
- - ">="
|
273
267
|
- !ruby/object:Gem::Version
|
274
268
|
version: '0.1'
|
275
269
|
- !ruby/object:Gem::Dependency
|
276
270
|
name: redcarpet
|
277
271
|
requirement: !ruby/object:Gem::Requirement
|
278
272
|
requirements:
|
279
|
-
- - "
|
273
|
+
- - "~>"
|
280
274
|
- !ruby/object:Gem::Version
|
281
275
|
version: '3.4'
|
282
|
-
- - "
|
276
|
+
- - ">="
|
283
277
|
- !ruby/object:Gem::Version
|
284
278
|
version: '3.4'
|
285
279
|
type: :development
|
286
280
|
prerelease: false
|
287
281
|
version_requirements: !ruby/object:Gem::Requirement
|
288
282
|
requirements:
|
289
|
-
- - "
|
283
|
+
- - "~>"
|
290
284
|
- !ruby/object:Gem::Version
|
291
285
|
version: '3.4'
|
292
|
-
- - "
|
286
|
+
- - ">="
|
293
287
|
- !ruby/object:Gem::Version
|
294
288
|
version: '3.4'
|
295
289
|
- !ruby/object:Gem::Dependency
|
296
290
|
name: github-markup
|
297
291
|
requirement: !ruby/object:Gem::Requirement
|
298
292
|
requirements:
|
299
|
-
- - "
|
293
|
+
- - "~>"
|
300
294
|
- !ruby/object:Gem::Version
|
301
295
|
version: '1.4'
|
302
|
-
- - "
|
296
|
+
- - ">="
|
303
297
|
- !ruby/object:Gem::Version
|
304
298
|
version: '1.4'
|
305
299
|
type: :development
|
306
300
|
prerelease: false
|
307
301
|
version_requirements: !ruby/object:Gem::Requirement
|
308
302
|
requirements:
|
309
|
-
- - "
|
303
|
+
- - "~>"
|
310
304
|
- !ruby/object:Gem::Version
|
311
305
|
version: '1.4'
|
312
|
-
- - "
|
306
|
+
- - ">="
|
313
307
|
- !ruby/object:Gem::Version
|
314
308
|
version: '1.4'
|
315
309
|
- !ruby/object:Gem::Dependency
|
@@ -350,6 +344,7 @@ files:
|
|
350
344
|
- app/helpers/washout_builder_method_arguments_helper.rb
|
351
345
|
- app/helpers/washout_builder_method_list_helper.rb
|
352
346
|
- app/helpers/washout_builder_method_return_type_helper.rb
|
347
|
+
- app/helpers/washout_builder_shared_helper.rb
|
353
348
|
- app/views/wash_with_html/_complex_type.builder
|
354
349
|
- app/views/wash_with_html/_fault_type.builder
|
355
350
|
- app/views/wash_with_html/_public_method.builder
|
@@ -370,6 +365,7 @@ files:
|
|
370
365
|
- gemfiles/rails_5.2.4.gemfile
|
371
366
|
- gemfiles/rails_6.0.0.gemfile
|
372
367
|
- gemfiles/rails_6.0.1.gemfile
|
368
|
+
- gemfiles/rails_6.1.3.gemfile
|
373
369
|
- gemfiles/rails_api_4.2.7.gemfile
|
374
370
|
- init.rb
|
375
371
|
- install-travis-bundler.sh
|
@@ -380,7 +376,6 @@ files:
|
|
380
376
|
- lib/washout_builder/document/shared_complex_type.rb
|
381
377
|
- lib/washout_builder/engine.rb
|
382
378
|
- lib/washout_builder/env_checker.rb
|
383
|
-
- lib/washout_builder/param.rb
|
384
379
|
- lib/washout_builder/router.rb
|
385
380
|
- lib/washout_builder/soap.rb
|
386
381
|
- lib/washout_builder/type.rb
|
@@ -446,7 +441,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
446
441
|
- !ruby/object:Gem::Version
|
447
442
|
version: '0'
|
448
443
|
requirements: []
|
449
|
-
rubygems_version: 3.
|
444
|
+
rubygems_version: 3.1.2
|
450
445
|
signing_key:
|
451
446
|
specification_version: 4
|
452
447
|
summary: WashOut Soap Service HTML-Documentation generator (extends WashOut https://github.com/inossidabile/wash_out/)
|
@@ -1,50 +0,0 @@
|
|
1
|
-
module WashoutBuilder
|
2
|
-
# module that extends the base WashoutParam to allow parsing of definitions for building documentation
|
3
|
-
module Param
|
4
|
-
extend ActiveSupport::Concern
|
5
|
-
|
6
|
-
# Method that receives the arguments for a soap action (input or output) and tries to parse the definition (@see WashOutParam#parse_def)
|
7
|
-
#
|
8
|
-
# the following lines was removed from original method because when generating the documentation
|
9
|
-
# the "source_class" attrtibute of the object was not the name of the class of the complex tyoe
|
10
|
-
# but instead was the name given in the hash
|
11
|
-
#
|
12
|
-
# if definition.is_a?(Class) && definition.ancestors.include?(WashOut::Type)
|
13
|
-
# definition = definition.wash_out_param_map
|
14
|
-
# end
|
15
|
-
#
|
16
|
-
# @example Given the class ProjectType as a "definition" argument, the complex type name should be ProjectType and not "project"
|
17
|
-
# class ProjectType < WashOut::Type
|
18
|
-
# map :project => {
|
19
|
-
# :name => :string,
|
20
|
-
# :description => :string,
|
21
|
-
# :users => [{:mail => :string }],
|
22
|
-
# }
|
23
|
-
# end
|
24
|
-
#
|
25
|
-
#
|
26
|
-
# @see WashoutBuilder::SOAP#soap_action
|
27
|
-
# @see WashOutParam#initialize
|
28
|
-
#
|
29
|
-
# @param [WasOut::SoapConfig] soap_config Holds the soap configuration for the entire web service
|
30
|
-
# @param [Object] definition Any type of object ( this is passed from the soap action)
|
31
|
-
#
|
32
|
-
# @return [Type] description of returned object
|
33
|
-
def parse_builder_def(soap_config, definition)
|
34
|
-
raise '[] should not be used in your params. Use nil if you want to mark empty set.' if definition == []
|
35
|
-
return [] if definition.blank?
|
36
|
-
|
37
|
-
definition = { value: definition } unless definition.is_a?(Hash) # for arrays and symbols
|
38
|
-
|
39
|
-
definition.map do |name, opt|
|
40
|
-
if opt.is_a? self
|
41
|
-
opt
|
42
|
-
elsif opt.is_a? Array
|
43
|
-
new(soap_config, name, opt[0], true)
|
44
|
-
else
|
45
|
-
new(soap_config, name, opt)
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|