washout_builder 0.11.2 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWJiN2YxMDQ0NDg1ZGY0N2U4Y2Q0NWM5MjE1MjMyMTJkMjM0NzM5Nw==
4
+ YTY0YWEzYzBmZTdjMmVmMWU5MzFkNzE1OTYwZjQ2OTA1YWUxODc3MQ==
5
5
  data.tar.gz: !binary |-
6
- NjUzYzA4YTc2MTBmOTg0ZDRkZWNlZDRkZWY5NzAzYmVjZmNiOTVjMA==
6
+ Yzg2MGQ2MjAxNGU4ZWI2YjRlOTE5MzkxOWQwMGIyOWJkN2M3NDUwZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTk4YmY4Y2ZlYjhjOWYyNzBmOGFiM2I4MjU5NmUxMmUyYzM2MDQ3OGRlNTI0
10
- ZGNhZjNjZjBjYmY1MmUyNDg0MGVlYTVlYmQ3Nzc4OWQzOGI0MGNmNmMzMzM0
11
- MTY4NjUzYzEyNTIxZDRmNjU5NThmYmZjM2I1YTcwYjg4ZjFhMDQ=
9
+ NmI3N2U5OTdmZTAzMjRmZWRjYzBiYWZmZDE3OTdhOTM0NGNjNTg3Yzk2YjU2
10
+ YTc3ZDUwYWE4NWJjZmNkZGNhZjMzZTI2NDkyYmYzYTc0OTEwZmEyNDRlMTkz
11
+ ODI1MDYwMGY3MDU0NGEyMmZhNDhkNTBhNjcwODk2YmM0ZTk3Mjk=
12
12
  data.tar.gz: !binary |-
13
- MjNkMmNiY2I3MzY4YmMzZTM5MTE2NzgyZTU1YjlkMmRlYzBkMWY4MzUwODc3
14
- ZjliYWZhZDU2ZTc4YjA2NjdiYWY2ZGM4ZWRlNzUzYmYwMTE1ZmVmNDBkMWFl
15
- NmNjODYwNDlhOWVmYzQ1Y2JiN2NjN2JkMjlhZjc2MTcxNWU3OGE=
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
- :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",
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[:service_name]} Soap Webservice"
42
- xml.p {|pre| pre << "Documentation URI: &nbsp;<a href='#{service[:documentation_url]}'><span class='pre'>#{service[:documentation_url]}</span></a>" }
43
- xml.p {|pre| pre << "Endpoint URI: &nbsp;<span class='pre'>#{service[:endpoint]}</span>" }
44
- xml.p {|pre| pre << "WSDL URI: &nbsp;<a href='#{service[:namespace]}'><span class='pre'>#{service[:namespace]}</span></a>" }
41
+ xml.h1 "#{service['service_name']} Soap Webservice"
42
+ xml.p {|pre| pre << "Documentation URI: &nbsp;<a href='#{service['documentation_url']}'><span class='pre'>#{service['documentation_url']}</span></a>" }
43
+ xml.p {|pre| pre << "Endpoint URI: &nbsp;<span class='pre'>#{service['endpoint']}</span>" }
44
+ xml.p {|pre| pre << "WSDL URI: &nbsp;<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,3 +1,3 @@
1
1
  module WashoutBuilder
2
- VERSION = "0.11.2"
2
+ VERSION = "0.11.3"
3
3
  end
@@ -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([{"service_name"=>"Api", "namespace"=>"/api/wsdl", "endpoint"=>"/api/action", "documentation_url"=>"http://test.host/api/doc"}])
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
@@ -0,0 +1,10 @@
1
+ module Api
2
+ class TestType < WashOut::Type
3
+ map :project => {
4
+ :name => :string,
5
+ :description => :string,
6
+ :users => [{:mail => :string }],
7
+ # 'dada' => [Project]
8
+ }
9
+ end
10
+ 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.2
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