washout_builder 0.11.2 → 0.11.3
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 +8 -8
- data/app/controllers/washout_builder_controller.rb +4 -4
- data/app/views/wash_with_html/all_services.builder +4 -4
- data/lib/washout_builder/document/generator.rb +3 -3
- data/lib/washout_builder/version.rb +1 -1
- data/spec/app/controllers/washout_builder_controller_spec.rb +2 -5
- data/spec/support/complex_types/test_type.rb +10 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTY0YWEzYzBmZTdjMmVmMWU5MzFkNzE1OTYwZjQ2OTA1YWUxODc3MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Yzg2MGQ2MjAxNGU4ZWI2YjRlOTE5MzkxOWQwMGIyOWJkN2M3NDUwZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmI3N2U5OTdmZTAzMjRmZWRjYzBiYWZmZDE3OTdhOTM0NGNjNTg3Yzk2YjU2
|
10
|
+
YTc3ZDUwYWE4NWJjZmNkZGNhZjMzZTI2NDkyYmYzYTc0OTEwZmEyNDRlMTkz
|
11
|
+
ODI1MDYwMGY3MDU0NGEyMmZhNDhkNTBhNjcwODk2YmM0ZTk3Mjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzU3ZTFjNmI1NGU5MWRhMTQ4ZTI2NmNkNDQxNmUxMmNhZjYxYmI1NmViNDMz
|
14
|
+
ZGEyN2U1MTA4NGMxOTM3ZmY0NjM1MzIwMGU1NWRiMmQ3ZGY0MWY5NTJhODYy
|
15
|
+
NTg1NWYzZWI4NWNhMTVhMmJiNGMwNmU0MTU3OGQ0YTVlYjBlM2U=
|
@@ -14,10 +14,10 @@ class WashoutBuilderController < ActionController::Base
|
|
14
14
|
controllers.map do |hash|
|
15
15
|
namespace = hash[:class].soap_config.namespace
|
16
16
|
@services << {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
'service_name' => hash[:class].to_s.underscore.gsub("_controller", "").camelize ,
|
18
|
+
'namespace' => namespace,
|
19
|
+
'endpoint' => namespace.gsub("/wsdl", "/action"),
|
20
|
+
'documentation_url' => "#{request.protocol}#{request.host_with_port}/#{hash[:name]}/doc",
|
21
21
|
}
|
22
22
|
end
|
23
23
|
end
|
@@ -38,10 +38,10 @@ xml.html( "xmlns" => "http://www.w3.org/1999/xhtml" ) {
|
|
38
38
|
unless @services.blank?
|
39
39
|
|
40
40
|
@services.each do |service|
|
41
|
-
xml.h1 "#{service[
|
42
|
-
xml.p {|pre| pre << "Documentation URI: <a href='#{service[
|
43
|
-
xml.p {|pre| pre << "Endpoint URI: <span class='pre'>#{service[
|
44
|
-
xml.p {|pre| pre << "WSDL URI: <a href='#{service[
|
41
|
+
xml.h1 "#{service['service_name']} Soap Webservice"
|
42
|
+
xml.p {|pre| pre << "Documentation URI: <a href='#{service['documentation_url']}'><span class='pre'>#{service['documentation_url']}</span></a>" }
|
43
|
+
xml.p {|pre| pre << "Endpoint URI: <span class='pre'>#{service['endpoint']}</span>" }
|
44
|
+
xml.p {|pre| pre << "WSDL URI: <a href='#{service['namespace']}'><span class='pre'>#{service['namespace']}</span></a>" }
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -69,7 +69,7 @@ module WashoutBuilder
|
|
69
69
|
(input_types + output_types).each do |p|
|
70
70
|
defined.concat(p.get_nested_complex_types(config, defined))
|
71
71
|
end
|
72
|
-
defined.sort_by { |hash| hash[:class].to_s.downcase }.uniq unless defined.blank?
|
72
|
+
defined.sort_by { |hash| hash[:class].to_s.downcase }.uniq{|hash| hash[:class] } unless defined.blank?
|
73
73
|
end
|
74
74
|
|
75
75
|
|
@@ -85,8 +85,8 @@ module WashoutBuilder
|
|
85
85
|
defined.each{ |exception_class| exception_class.get_fault_class_ancestors( fault_types, true)} unless defined.blank?
|
86
86
|
complex_types = extract_nested_complex_types_from_exceptions(fault_types)
|
87
87
|
complex_types.delete_if{ |hash| fault_types << hash if (hash[:fault].is_a?(Class) && hash[:fault].ancestors.detect{ |fault| WashoutBuilder::Type.get_fault_classes.include?(fault) }.present?) || (hash[:fault].is_a?(Class) && WashoutBuilder::Type.get_fault_classes.include?(hash[:fault])) } unless complex_types.blank?
|
88
|
-
fault_types = fault_types.sort_by { |hash| hash[:fault].to_s.downcase }.uniq unless fault_types.blank?
|
89
|
-
complex_types = complex_types.sort_by { |hash| hash[:fault].to_s.downcase }.uniq unless complex_types.blank?
|
88
|
+
fault_types = fault_types.sort_by { |hash| hash[:fault].to_s.downcase }.uniq {|hash| hash[:fault] } unless fault_types.blank?
|
89
|
+
complex_types = complex_types.sort_by { |hash| hash[:fault].to_s.downcase }.uniq {|hash| hash[:fault] } unless complex_types.blank?
|
90
90
|
[fault_types, complex_types]
|
91
91
|
end
|
92
92
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
|
4
3
|
describe WashoutBuilderController, :type => :controller do
|
5
4
|
|
6
5
|
let(:soap_config) { OpenStruct.new(
|
@@ -14,14 +13,12 @@ describe WashoutBuilderController, :type => :controller do
|
|
14
13
|
|
15
14
|
it "gets the services" do
|
16
15
|
get :all
|
17
|
-
assigns(:services).should eq([{
|
16
|
+
assigns(:services).should eq([{'service_name'=>"Api", 'namespace'=>"/api/wsdl", 'endpoint'=>"/api/action", 'documentation_url'=>"http://test.host/api/doc"}])
|
18
17
|
end
|
19
18
|
|
20
|
-
|
21
19
|
it "renders the template" do
|
22
20
|
get :all
|
23
21
|
response.should render_template("wash_with_html/all_services")
|
24
22
|
end
|
25
|
-
|
26
23
|
|
27
|
-
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: washout_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- spec/support/complex_types/fluffy.rb
|
106
106
|
- spec/support/complex_types/fluffy_container.rb
|
107
107
|
- spec/support/complex_types/project_type.rb
|
108
|
+
- spec/support/complex_types/test_type.rb
|
108
109
|
- spec/support/exceptions/another_exception.rb
|
109
110
|
- spec/support/exceptions/base_exception.rb
|
110
111
|
- spec/support/exceptions/custom2.rb
|
@@ -175,6 +176,7 @@ test_files:
|
|
175
176
|
- spec/support/complex_types/fluffy.rb
|
176
177
|
- spec/support/complex_types/fluffy_container.rb
|
177
178
|
- spec/support/complex_types/project_type.rb
|
179
|
+
- spec/support/complex_types/test_type.rb
|
178
180
|
- spec/support/exceptions/another_exception.rb
|
179
181
|
- spec/support/exceptions/base_exception.rb
|
180
182
|
- spec/support/exceptions/custom2.rb
|