washout_builder 0.14.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/.rubocop.yml +68 -0
- data/.travis.yml +1 -1
- data/Appraisals +9 -1
- data/Gemfile +2 -3
- data/Rakefile +17 -20
- data/app/controllers/washout_builder/washout_builder_controller.rb +79 -79
- data/app/helpers/washout_builder_complex_type_helper.rb +16 -23
- data/app/helpers/washout_builder_fault_type_helper.rb +12 -13
- data/app/helpers/washout_builder_method_arguments_helper.rb +24 -26
- data/app/helpers/washout_builder_method_list_helper.rb +16 -11
- data/app/helpers/washout_builder_method_return_type_helper.rb +14 -12
- data/app/views/wash_with_html/doc.builder +2 -2
- data/bin/appraisal +16 -0
- data/bin/autospec +16 -0
- data/bin/bundler +16 -0
- data/bin/cdiff +16 -0
- data/bin/coderay +16 -0
- data/bin/colortab +16 -0
- data/bin/coveralls +16 -0
- data/bin/decolor +16 -0
- data/bin/erubis +16 -0
- data/bin/guard +16 -0
- data/bin/htmldiff +16 -0
- data/bin/ldiff +16 -0
- data/bin/listen +16 -0
- data/bin/nokogiri +16 -0
- data/bin/phare +16 -0
- data/bin/pry +16 -0
- data/bin/rackup +16 -0
- data/bin/rails +16 -0
- data/bin/rake +16 -0
- data/bin/restclient +16 -0
- data/bin/rspec +16 -0
- data/bin/rubocop +16 -0
- data/bin/ruby-parse +16 -0
- data/bin/ruby-rewrite +16 -0
- data/bin/sass +16 -0
- data/bin/sass-convert +16 -0
- data/bin/scss +16 -0
- data/bin/scss-lint +16 -0
- data/bin/term_display +16 -0
- data/bin/term_mandel +16 -0
- data/bin/thor +16 -0
- data/bin/uuid +16 -0
- data/config/routes.rb +3 -3
- data/init.rb +1 -1
- data/lib/washout_builder.rb +20 -29
- data/lib/washout_builder/document/complex_type.rb +70 -75
- data/lib/washout_builder/document/exception_model.rb +46 -51
- data/lib/washout_builder/document/generator.rb +56 -66
- data/lib/washout_builder/document/shared_complex_type.rb +2 -4
- data/lib/washout_builder/engine.rb +1 -2
- data/lib/washout_builder/soap.rb +6 -10
- data/lib/washout_builder/type.rb +9 -23
- data/lib/washout_builder/version.rb +5 -5
- data/spec/app/controllers/washout_builder_controller_spec.rb +26 -28
- data/spec/app/helpers/washout_builder_complex_type_helper_spec.rb +37 -45
- data/spec/app/helpers/washout_builder_fault_type_helper_spec.rb +65 -77
- data/spec/app/helpers/washout_builder_method_arguments_helper_spec.rb +65 -76
- data/spec/app/helpers/washout_builder_method_list_helper_spec.rb +30 -35
- data/spec/app/helpers/washout_builder_method_return_type_helper_spec.rb +25 -27
- data/spec/dummy/config/application.rb +4 -4
- data/spec/dummy/config/boot.rb +1 -1
- data/spec/dummy/config/environments/development.rb +2 -3
- data/spec/dummy/config/environments/test.rb +3 -3
- data/spec/dummy/config/initializers/secret_token.rb +1 -1
- data/spec/dummy/config/initializers/session_store.rb +1 -1
- data/spec/dummy/config/routes.rb +0 -1
- data/spec/dummy/script/rails +2 -2
- data/spec/integration/washout_builder_all_services_spec.rb +2 -5
- data/spec/integration/washout_builder_service_spec.rb +2 -5
- data/spec/lib/washout_builder/document/complex_type_spec.rb +98 -118
- data/spec/lib/washout_builder/document/exception_model_spec.rb +49 -54
- data/spec/lib/washout_builder/document/generator_spec.rb +93 -118
- data/spec/lib/washout_builder/type_spec.rb +17 -29
- data/spec/lib/washout_builder_spec.rb +293 -308
- data/spec/spec_helper.rb +24 -30
- data/spec/support/complex_types/fluffy.rb +3 -3
- data/spec/support/complex_types/fluffy_container.rb +3 -3
- data/spec/support/complex_types/project_type.rb +4 -5
- data/spec/support/complex_types/test_type.rb +4 -4
- data/washout_builder.gemspec +5 -2
- metadata +78 -3
data/spec/spec_helper.rb
CHANGED
@@ -1,44 +1,43 @@
|
|
1
1
|
# Configure Rails Envinronment
|
2
|
-
ENV[
|
2
|
+
ENV['RAILS_ENV'] = 'test'
|
3
3
|
|
4
4
|
require 'simplecov'
|
5
5
|
require 'simplecov-summary'
|
6
6
|
require 'coveralls'
|
7
7
|
|
8
|
-
#require "codeclimate-test-reporter"
|
8
|
+
# require "codeclimate-test-reporter"
|
9
9
|
formatters = [SimpleCov::Formatter::HTMLFormatter]
|
10
10
|
|
11
|
-
formatters << Coveralls::SimpleCov::Formatter #if ENV['TRAVIS']
|
12
|
-
#formatters << CodeClimate::TestReporter::Formatter # if ENV['CODECLIMATE_REPO_TOKEN'] && ENV['TRAVIS']
|
13
|
-
|
14
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formatters]
|
11
|
+
formatters << Coveralls::SimpleCov::Formatter # if ENV['TRAVIS']
|
12
|
+
# formatters << CodeClimate::TestReporter::Formatter # if ENV['CODECLIMATE_REPO_TOKEN'] && ENV['TRAVIS']
|
15
13
|
|
14
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formatters]
|
16
15
|
|
17
16
|
Coveralls.wear!
|
18
|
-
SimpleCov.start
|
17
|
+
SimpleCov.start 'rails' do
|
19
18
|
add_filter 'spec'
|
20
|
-
#add_group 'Library', 'lib'
|
21
|
-
|
19
|
+
# add_group 'Library', 'lib'
|
20
|
+
# add_group 'App', 'app'
|
22
21
|
|
23
|
-
at_exit
|
22
|
+
at_exit {}
|
24
23
|
end
|
25
24
|
|
26
|
-
#CodeClimate::TestReporter.configure do |config|
|
25
|
+
# CodeClimate::TestReporter.configure do |config|
|
27
26
|
# config.logger.level = Logger::WARN
|
28
|
-
#end
|
29
|
-
# CodeClimate::TestReporter.start
|
27
|
+
# end
|
28
|
+
# CodeClimate::TestReporter.start
|
30
29
|
|
31
30
|
require 'active_support'
|
32
31
|
require 'nori'
|
33
32
|
require 'nokogiri'
|
34
33
|
require 'ostruct'
|
35
34
|
|
36
|
-
require File.expand_path(
|
37
|
-
require File.expand_path(
|
38
|
-
require
|
39
|
-
require
|
35
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
36
|
+
require File.expand_path('../../config/routes.rb', __FILE__)
|
37
|
+
require 'rails/test_help'
|
38
|
+
require 'rspec/rails'
|
40
39
|
require 'rspec/autorun'
|
41
|
-
require
|
40
|
+
require 'savon'
|
42
41
|
require 'wash_out'
|
43
42
|
|
44
43
|
require 'capybara/rspec'
|
@@ -54,14 +53,14 @@ RSpec.configure do |config|
|
|
54
53
|
require 'rspec/expectations'
|
55
54
|
config.include RSpec::Matchers
|
56
55
|
config.infer_spec_type_from_file_location!
|
57
|
-
|
56
|
+
|
58
57
|
config.before(:suite) do
|
59
58
|
# Blocks all remote HTTP requests by default, they need to be stubbed.
|
60
59
|
if !RUBY_PLATFORM.downcase.include?('darwin') && !ENV['NO_HEADLESS']
|
61
60
|
Headless.new(reuse: false, destroy_on_exit: false).start
|
62
61
|
end
|
63
62
|
end
|
64
|
-
|
63
|
+
|
65
64
|
config.mock_with :mocha
|
66
65
|
config.before(:all) do
|
67
66
|
WashoutBuilder::Engine.config.wash_out = {
|
@@ -82,7 +81,7 @@ RSpec.configure do |config|
|
|
82
81
|
end
|
83
82
|
end
|
84
83
|
|
85
|
-
HTTPI.logger = Logger.new(open(
|
84
|
+
HTTPI.logger = Logger.new(open('/dev/null', 'w'))
|
86
85
|
HTTPI.adapter = :rack
|
87
86
|
|
88
87
|
HTTPI::Adapter::Rack.mount 'app', Dummy::Application
|
@@ -93,12 +92,10 @@ end
|
|
93
92
|
def mock_controller(options = {}, &block)
|
94
93
|
Object.send :remove_const, :ApiController if defined?(ApiController)
|
95
94
|
Object.send :const_set, :ApiController, Class.new(ApplicationController) {
|
96
|
-
soap_service options.reverse_merge(
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
})
|
101
|
-
class_exec &block if block
|
95
|
+
soap_service options.reverse_merge(snakecase_input: true,
|
96
|
+
camelize_wsdl: true,
|
97
|
+
namespace: false)
|
98
|
+
class_exec(&block) if block
|
102
99
|
}
|
103
100
|
|
104
101
|
ActiveSupport::Dependencies::Reference.instance_variable_get(:'@store').delete('ApiController')
|
@@ -108,10 +105,7 @@ def base_exception
|
|
108
105
|
WashOut::Dispatcher::SOAPError
|
109
106
|
end
|
110
107
|
|
111
|
-
|
112
108
|
class WashoutBuilderTestError < base_exception
|
113
|
-
|
114
|
-
|
115
109
|
end
|
116
110
|
|
117
111
|
def get_wash_out_param(class_name_or_structure, soap_config = soap_config)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module Api
|
2
2
|
class TestType < WashOut::Type
|
3
|
-
map :
|
4
|
-
:
|
5
|
-
:
|
6
|
-
:
|
3
|
+
map project: {
|
4
|
+
name: :string,
|
5
|
+
description: :string,
|
6
|
+
users: [{ mail: :string }],
|
7
7
|
# 'dada' => [Project]
|
8
8
|
}
|
9
9
|
end
|
data/washout_builder.gemspec
CHANGED
@@ -30,11 +30,14 @@ Gem::Specification.new do |s|
|
|
30
30
|
s.add_development_dependency 'simplecov-summary', '~> 0.0.4', '>= 0.0.4'
|
31
31
|
s.add_development_dependency 'mocha','~> 1.1', '>= 1.1'
|
32
32
|
s.add_development_dependency 'coveralls','~> 0.7', '>= 0.7'
|
33
|
-
# s.add_development_dependency 'codeclimate-test-reporter','~> 0.3', '>= 0.3'
|
34
|
-
# s.add_development_dependency 'rubyntlm','~> 0.3.4', '>= 0.3'
|
33
|
+
# s.add_development_dependency 'codeclimate-test-reporter','~> 0.3', '>= 0.3'
|
34
|
+
# s.add_development_dependency 'rubyntlm','~> 0.3.4', '>= 0.3'
|
35
35
|
s.add_development_dependency 'rvm-tester','~> 1.1', '>= 1.1'
|
36
36
|
|
37
37
|
s.add_development_dependency 'capybara', '~> 2.2', '>= 2.2.1'
|
38
38
|
s.add_development_dependency 'selenium-webdriver', '~> 2.41', '>= 2.41.0'
|
39
39
|
s.add_development_dependency 'headless','~> 1.0', '>= 1.0.1'
|
40
|
+
s.add_development_dependency 'rubocop', '0.29'
|
41
|
+
s.add_development_dependency 'phare'
|
42
|
+
s.add_development_dependency "scss-lint"
|
40
43
|
end
|
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: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wash_out
|
@@ -350,6 +350,48 @@ dependencies:
|
|
350
350
|
- - '>='
|
351
351
|
- !ruby/object:Gem::Version
|
352
352
|
version: 1.0.1
|
353
|
+
- !ruby/object:Gem::Dependency
|
354
|
+
name: rubocop
|
355
|
+
requirement: !ruby/object:Gem::Requirement
|
356
|
+
requirements:
|
357
|
+
- - '='
|
358
|
+
- !ruby/object:Gem::Version
|
359
|
+
version: '0.29'
|
360
|
+
type: :development
|
361
|
+
prerelease: false
|
362
|
+
version_requirements: !ruby/object:Gem::Requirement
|
363
|
+
requirements:
|
364
|
+
- - '='
|
365
|
+
- !ruby/object:Gem::Version
|
366
|
+
version: '0.29'
|
367
|
+
- !ruby/object:Gem::Dependency
|
368
|
+
name: phare
|
369
|
+
requirement: !ruby/object:Gem::Requirement
|
370
|
+
requirements:
|
371
|
+
- - '>='
|
372
|
+
- !ruby/object:Gem::Version
|
373
|
+
version: '0'
|
374
|
+
type: :development
|
375
|
+
prerelease: false
|
376
|
+
version_requirements: !ruby/object:Gem::Requirement
|
377
|
+
requirements:
|
378
|
+
- - '>='
|
379
|
+
- !ruby/object:Gem::Version
|
380
|
+
version: '0'
|
381
|
+
- !ruby/object:Gem::Dependency
|
382
|
+
name: scss-lint
|
383
|
+
requirement: !ruby/object:Gem::Requirement
|
384
|
+
requirements:
|
385
|
+
- - '>='
|
386
|
+
- !ruby/object:Gem::Version
|
387
|
+
version: '0'
|
388
|
+
type: :development
|
389
|
+
prerelease: false
|
390
|
+
version_requirements: !ruby/object:Gem::Requirement
|
391
|
+
requirements:
|
392
|
+
- - '>='
|
393
|
+
- !ruby/object:Gem::Version
|
394
|
+
version: '0'
|
353
395
|
description: 'WashOut Soap Service HTML-Documentation generator (extends WashOut https://github.com/inossidabile/wash_out/) '
|
354
396
|
email: raoul_ice@yahoo.com
|
355
397
|
executables: []
|
@@ -359,6 +401,7 @@ files:
|
|
359
401
|
- .coveralls.yml
|
360
402
|
- .gitignore
|
361
403
|
- .rspec
|
404
|
+
- .rubocop.yml
|
362
405
|
- .travis.yml
|
363
406
|
- Appraisals
|
364
407
|
- CONTRIBUTING.md
|
@@ -378,6 +421,38 @@ files:
|
|
378
421
|
- app/views/wash_with_html/_public_method.builder
|
379
422
|
- app/views/wash_with_html/all_services.builder
|
380
423
|
- app/views/wash_with_html/doc.builder
|
424
|
+
- bin/appraisal
|
425
|
+
- bin/autospec
|
426
|
+
- bin/bundler
|
427
|
+
- bin/cdiff
|
428
|
+
- bin/coderay
|
429
|
+
- bin/colortab
|
430
|
+
- bin/coveralls
|
431
|
+
- bin/decolor
|
432
|
+
- bin/erubis
|
433
|
+
- bin/guard
|
434
|
+
- bin/htmldiff
|
435
|
+
- bin/ldiff
|
436
|
+
- bin/listen
|
437
|
+
- bin/nokogiri
|
438
|
+
- bin/phare
|
439
|
+
- bin/pry
|
440
|
+
- bin/rackup
|
441
|
+
- bin/rails
|
442
|
+
- bin/rake
|
443
|
+
- bin/restclient
|
444
|
+
- bin/rspec
|
445
|
+
- bin/rubocop
|
446
|
+
- bin/ruby-parse
|
447
|
+
- bin/ruby-rewrite
|
448
|
+
- bin/sass
|
449
|
+
- bin/sass-convert
|
450
|
+
- bin/scss
|
451
|
+
- bin/scss-lint
|
452
|
+
- bin/term_display
|
453
|
+
- bin/term_mandel
|
454
|
+
- bin/thor
|
455
|
+
- bin/uuid
|
381
456
|
- config/routes.rb
|
382
457
|
- init.rb
|
383
458
|
- lib/washout_builder.rb
|
@@ -451,7 +526,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
451
526
|
version: '0'
|
452
527
|
requirements: []
|
453
528
|
rubyforge_project:
|
454
|
-
rubygems_version: 2.4.
|
529
|
+
rubygems_version: 2.4.6
|
455
530
|
signing_key:
|
456
531
|
specification_version: 4
|
457
532
|
summary: WashOut Soap Service HTML-Documentation generator (extends WashOut https://github.com/inossidabile/wash_out/)
|