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.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -2
  3. data/.rubocop.yml +68 -0
  4. data/.travis.yml +1 -1
  5. data/Appraisals +9 -1
  6. data/Gemfile +2 -3
  7. data/Rakefile +17 -20
  8. data/app/controllers/washout_builder/washout_builder_controller.rb +79 -79
  9. data/app/helpers/washout_builder_complex_type_helper.rb +16 -23
  10. data/app/helpers/washout_builder_fault_type_helper.rb +12 -13
  11. data/app/helpers/washout_builder_method_arguments_helper.rb +24 -26
  12. data/app/helpers/washout_builder_method_list_helper.rb +16 -11
  13. data/app/helpers/washout_builder_method_return_type_helper.rb +14 -12
  14. data/app/views/wash_with_html/doc.builder +2 -2
  15. data/bin/appraisal +16 -0
  16. data/bin/autospec +16 -0
  17. data/bin/bundler +16 -0
  18. data/bin/cdiff +16 -0
  19. data/bin/coderay +16 -0
  20. data/bin/colortab +16 -0
  21. data/bin/coveralls +16 -0
  22. data/bin/decolor +16 -0
  23. data/bin/erubis +16 -0
  24. data/bin/guard +16 -0
  25. data/bin/htmldiff +16 -0
  26. data/bin/ldiff +16 -0
  27. data/bin/listen +16 -0
  28. data/bin/nokogiri +16 -0
  29. data/bin/phare +16 -0
  30. data/bin/pry +16 -0
  31. data/bin/rackup +16 -0
  32. data/bin/rails +16 -0
  33. data/bin/rake +16 -0
  34. data/bin/restclient +16 -0
  35. data/bin/rspec +16 -0
  36. data/bin/rubocop +16 -0
  37. data/bin/ruby-parse +16 -0
  38. data/bin/ruby-rewrite +16 -0
  39. data/bin/sass +16 -0
  40. data/bin/sass-convert +16 -0
  41. data/bin/scss +16 -0
  42. data/bin/scss-lint +16 -0
  43. data/bin/term_display +16 -0
  44. data/bin/term_mandel +16 -0
  45. data/bin/thor +16 -0
  46. data/bin/uuid +16 -0
  47. data/config/routes.rb +3 -3
  48. data/init.rb +1 -1
  49. data/lib/washout_builder.rb +20 -29
  50. data/lib/washout_builder/document/complex_type.rb +70 -75
  51. data/lib/washout_builder/document/exception_model.rb +46 -51
  52. data/lib/washout_builder/document/generator.rb +56 -66
  53. data/lib/washout_builder/document/shared_complex_type.rb +2 -4
  54. data/lib/washout_builder/engine.rb +1 -2
  55. data/lib/washout_builder/soap.rb +6 -10
  56. data/lib/washout_builder/type.rb +9 -23
  57. data/lib/washout_builder/version.rb +5 -5
  58. data/spec/app/controllers/washout_builder_controller_spec.rb +26 -28
  59. data/spec/app/helpers/washout_builder_complex_type_helper_spec.rb +37 -45
  60. data/spec/app/helpers/washout_builder_fault_type_helper_spec.rb +65 -77
  61. data/spec/app/helpers/washout_builder_method_arguments_helper_spec.rb +65 -76
  62. data/spec/app/helpers/washout_builder_method_list_helper_spec.rb +30 -35
  63. data/spec/app/helpers/washout_builder_method_return_type_helper_spec.rb +25 -27
  64. data/spec/dummy/config/application.rb +4 -4
  65. data/spec/dummy/config/boot.rb +1 -1
  66. data/spec/dummy/config/environments/development.rb +2 -3
  67. data/spec/dummy/config/environments/test.rb +3 -3
  68. data/spec/dummy/config/initializers/secret_token.rb +1 -1
  69. data/spec/dummy/config/initializers/session_store.rb +1 -1
  70. data/spec/dummy/config/routes.rb +0 -1
  71. data/spec/dummy/script/rails +2 -2
  72. data/spec/integration/washout_builder_all_services_spec.rb +2 -5
  73. data/spec/integration/washout_builder_service_spec.rb +2 -5
  74. data/spec/lib/washout_builder/document/complex_type_spec.rb +98 -118
  75. data/spec/lib/washout_builder/document/exception_model_spec.rb +49 -54
  76. data/spec/lib/washout_builder/document/generator_spec.rb +93 -118
  77. data/spec/lib/washout_builder/type_spec.rb +17 -29
  78. data/spec/lib/washout_builder_spec.rb +293 -308
  79. data/spec/spec_helper.rb +24 -30
  80. data/spec/support/complex_types/fluffy.rb +3 -3
  81. data/spec/support/complex_types/fluffy_container.rb +3 -3
  82. data/spec/support/complex_types/project_type.rb +4 -5
  83. data/spec/support/complex_types/test_type.rb +4 -4
  84. data/washout_builder.gemspec +5 -2
  85. metadata +78 -3
@@ -1,41 +1,39 @@
1
1
  module WashoutBuilderMethodArgumentsHelper
2
-
3
- def create_method_argument_element( pre, param, mlen)
4
- spacer = "    "
5
- complex_class = param.get_complex_class_name
6
- use_spacer = mlen > 1 ? true : false
2
+ def create_method_argument_element(pre, param, mlen)
3
+ spacer = '    '
4
+ complex_class = param.find_complex_class_name
5
+ use_spacer = mlen > 1 ? true : false
7
6
  if WashoutBuilder::Type::BASIC_TYPES.include?(param.type)
8
- pre << "#{use_spacer ? spacer: ''}<span class='blue'>#{param.type}</span>&nbsp;<span class='bold'>#{param.name}</span>"
7
+ pre << "#{use_spacer ? spacer : ''}<span class='blue'>#{param.type}</span>&nbsp;<span class='bold'>#{param.name}</span>"
9
8
  else
10
- unless complex_class.nil?
11
- argument_content = param.multiplied == false ? "#{complex_class}" : "Array of #{complex_class}"
12
- pre << "#{use_spacer ? spacer: ''}<a href='##{complex_class}'><span class='lightBlue'>#{argument_content}</span></a>&nbsp;<span class='bold'>#{param.name}</span>"
13
- end
9
+ create_method_argument_complex_element(pre, param, use_spacer, spacer, complex_class)
14
10
  end
15
11
  end
16
-
17
- def create_argument_element_spacer(xml, j, mlen )
18
- if j< (mlen-1)
19
- xml.span ", "
12
+
13
+ def create_method_argument_complex_element(pre, param, use_spacer, spacer, complex_class)
14
+ return if complex_class.nil?
15
+ argument_content = param.multiplied == false ? "#{complex_class}" : "Array of #{complex_class}"
16
+ pre << "#{use_spacer ? spacer : ''}<a href='##{complex_class}'><span class='lightBlue'>#{argument_content}</span></a>&nbsp;<span class='bold'>#{param.name}</span>"
17
+ end
18
+
19
+ def create_argument_element_spacer(xml, j, mlen)
20
+ if j < (mlen - 1)
21
+ xml.span ', '
20
22
  end
21
23
  if mlen > 1
22
24
  xml.br
23
25
  end
24
- if (j+1) == mlen
25
- xml.span("class" => "bold") {|y| y << ")" }
26
- end
26
+ return unless (j + 1) == mlen
27
+ xml.span('class' => 'bold') { |y| y << ')' }
27
28
  end
28
-
29
-
30
-
29
+
31
30
  def create_html_public_method_arguments(xml, pre, input)
32
31
  mlen = input.size
33
32
  xml.br if mlen > 1
34
- if mlen > 0
35
- input.each_with_index do |element, index|
36
- create_method_argument_element( pre, element, mlen)
37
- create_argument_element_spacer(xml, index, mlen )
38
- end
33
+ return unless mlen > 0
34
+ input.each_with_index do |element, index|
35
+ create_method_argument_element(pre, element, mlen)
36
+ create_argument_element_spacer(xml, index, mlen)
39
37
  end
40
38
  end
41
- end
39
+ end
@@ -1,24 +1,29 @@
1
1
  module WashoutBuilderMethodListHelper
2
-
3
-
4
-
5
2
  def create_return_complex_type_list_html(xml, complex_class, builder_out)
6
- return_content = builder_out[0].multiplied == false ? "#{complex_class}" : "Array of #{complex_class}"
7
- xml.span("class" => "pre") { xml.a("href" => "##{complex_class}") { |xml| xml.span("class" => "lightBlue") { |y| y<<"#{return_content}" } } }
3
+ return_content = builder_out[0].multiplied == false ? "#{complex_class}" : "Array of #{complex_class}"
4
+ xml.span('class' => 'pre') do
5
+ xml.a('href' => "##{complex_class}") do |inner_xml|
6
+ inner_xml.span('class' => 'lightBlue') do |y|
7
+ y << "#{return_content}"
8
+ end
9
+ end
10
+ end
8
11
  end
9
12
 
10
-
11
13
  def create_return_type_list_html(xml, output)
12
14
  if output.nil?
13
- xml.span("class" => "pre") { |sp| sp << "void" }
15
+ xml.span('class' => 'pre') { |sp| sp << 'void' }
14
16
  else
15
- complex_class = output[0].get_complex_class_name
17
+ complex_class = output[0].find_complex_class_name
16
18
  if WashoutBuilder::Type::BASIC_TYPES.include?(output[0].type)
17
- xml.span("class" => "pre") { |xml| xml.span("class" => "blue") { |sp| sp << "#{output[0].type}" } }
19
+ xml.span('class' => 'pre') do |inner_xml|
20
+ inner_xml.span('class' => 'blue') do |sp|
21
+ sp << "#{output[0].type}"
22
+ end
23
+ end
18
24
  else
19
25
  create_return_complex_type_html(xml, complex_class, output) unless complex_class.nil?
20
26
  end
21
27
  end
22
- end
23
-
28
+ end
24
29
  end
@@ -1,22 +1,24 @@
1
1
  module WashoutBuilderMethodReturnTypeHelper
2
-
3
- def create_html_public_method_return_type(xml,pre, output)
2
+ def create_html_public_method_return_type(xml, pre, output)
4
3
  if !output.nil?
5
- complex_class = output[0].get_complex_class_name
4
+ complex_class = output[0].find_complex_class_name
6
5
  if WashoutBuilder::Type::BASIC_TYPES.include?(output[0].type)
7
- xml.span("class" => "blue") { |y| y<< "#{output[0].type}" }
6
+ xml.span('class' => 'blue') { |y| y << "#{output[0].type}" }
8
7
  else
9
- unless complex_class.nil?
10
- complex_return_type = output[0].multiplied == false ? "#{complex_class}" : "Array of #{complex_class}"
11
- pre << "<a href='##{complex_class}'><span class='lightBlue'>#{complex_return_type}</span></a>"
12
- end
8
+ html_public_method_complex_type(pre, output, complex_class)
13
9
  end
14
10
  else
15
- pre << "void"
11
+ pre << 'void'
16
12
  end
17
13
  end
18
-
19
-
20
-
21
14
 
15
+ def html_public_method_complex_type(pre, output, complex_class)
16
+ return if complex_class.nil?
17
+ if output[0].multiplied == false
18
+ complex_return_type = "#{complex_class}"
19
+ else
20
+ complex_return_type = "Array of #{complex_class}"
21
+ end
22
+ pre << "<a href='##{complex_class}'><span class='lightBlue'>#{complex_return_type}</span></a>"
23
+ end
22
24
  end
@@ -72,7 +72,7 @@ xml.html( "xmlns" => "http://www.w3.org/1999/xhtml" ) {
72
72
  end
73
73
  end
74
74
 
75
- @methods = @document.get_soap_action_names
75
+ @methods = @document.all_soap_action_names
76
76
  unless @methods.blank?
77
77
  xml.p "Public Methods:"
78
78
 
@@ -115,4 +115,4 @@ xml.html( "xmlns" => "http://www.w3.org/1999/xhtml" ) {
115
115
 
116
116
  }
117
117
 
118
- }
118
+ }
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'appraisal' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('appraisal', 'appraisal')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'autospec' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rspec-core', 'autospec')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'bundler' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('bundler', 'bundler')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'cdiff' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('term-ansicolor', 'cdiff')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'coderay' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('coderay', 'coderay')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'colortab' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('term-ansicolor', 'colortab')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'coveralls' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('coveralls', 'coveralls')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'decolor' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('term-ansicolor', 'decolor')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'erubis' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('erubis', 'erubis')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'guard' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('guard', 'guard')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'htmldiff' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('diff-lcs', 'htmldiff')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'ldiff' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('diff-lcs', 'ldiff')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'listen' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('listen', 'listen')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'nokogiri' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('nokogiri', 'nokogiri')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'phare' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('phare', 'phare')
data/bin/pry ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'pry' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('pry', 'pry')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rackup' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rack', 'rackup')