washout_builder 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.rdoc +42 -20
- data/app/views/wash_with_html/doc.builder +2 -2
- data/lib/washout_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjBhNzE2NTAxZjVhY2I4OGY4YTQ2YjNiY2E4ZWQ4ZTMwYTQ2NzlhMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWMyNGZkMWQ0YjI4M2UyNjQyY2IyZDg0YTFlYjkwNjcxNTk5NGQ2Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGIwN2FkYTAzYzBlN2NjNGI1YmVjMTQ2MTZlMTc3OWM0NmE3ZjliYmI4YzMz
|
10
|
+
ZDA3M2ZjYWJkMTYwNmZmZDcwYTUxN2MzMDVmZGU5ZmY5NmZmNmYwOWVjYmYy
|
11
|
+
NjU2OTZiNDI0ZmFjMjU1YThkNWUzNTc1ODYyYmQzYjcxYjJjMjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjRjZTBjMjQ2ZWViNDdjZTk4MjRjMGE3YTIyNGM5M2NhNmNhMDlhYjQyMjIw
|
14
|
+
YWViYWM5Y2UwNzJlNjg4NWRiMjEyNTgyNWJiN2Q4MWQwMzg1YWRjMmJmOTRj
|
15
|
+
Yjg1ZWFmYzhhNDQ2NTcwZmNhODQzZjRjYzQyMWIzNjhkYjM4ZGY=
|
data/README.rdoc
CHANGED
@@ -51,8 +51,7 @@ Or if you want this to be available only in development mode , you can do someth
|
|
51
51
|
group :development, :test do
|
52
52
|
gem 'washout_builder' # The documentation will only be available in development mode.
|
53
53
|
end
|
54
|
-
|
55
|
-
Just make sure that the requirements for this gem are met and everything should be fine.
|
54
|
+
|
56
55
|
|
57
56
|
Please read {release details}[https://github.com/bogdanRada/washout_builder/releases] if you are upgrading. We break backward compatibility between large ticks but you can expect it to be specified at release notes.
|
58
57
|
|
@@ -61,21 +60,26 @@ Please read {release details}[https://github.com/bogdanRada/washout_builder/rele
|
|
61
60
|
The way soap_actions, or reusable types are defined or how the configuration is made using WashOut(https://github.com/inossidabile/wash_out) haven't changed
|
62
61
|
You can still do everything that gem does .
|
63
62
|
|
64
|
-
|
63
|
+
In order to see the documentation you must write something like this in the routes (exactly like you would do when using only WashOut)
|
65
64
|
|
66
|
-
|
65
|
+
In the following file +config/routes.rb+ you can put this configuration
|
67
66
|
|
68
|
-
|
67
|
+
WashOutSample::Application.routes.draw do
|
68
|
+
wash_out :rumbas
|
69
|
+
wash_out :my_other_service
|
70
|
+
end
|
69
71
|
|
72
|
+
You can access the url +/washout+ and you will see a list with available services ( in our case there are only two : The RumbasController and MyOtherServiceController) with links to their documentation and where you can find the WSDL.
|
70
73
|
|
71
|
-
|
72
|
-
|
73
|
-
attribute :custom_attribute, String
|
74
|
-
attribute :other_custom_attribute, Integer
|
75
|
-
|
76
|
-
end
|
74
|
+
If you want to access directly the hml documentation that was generated for RumbasController you can do that by accessing url +/rumbas/doc+ And the WSDL will be available at +/rumbas/wsdl+
|
77
75
|
|
78
|
-
|
76
|
+
|
77
|
+
When specifying the <b>soap_service</b> you can also pass a <b>option for description</b> . Here is an example
|
78
|
+
|
79
|
+
soap_service namespace: "http://my.app.com/my_service/wsdl",
|
80
|
+
:description => "here goes some description for your service"
|
81
|
+
|
82
|
+
When specifying the <b>soap_action</b> you can also pass a <b>option for description</b> and a <b>list of exceptions(need to be classes)</b> that the method can raise at a certain moment.
|
79
83
|
|
80
84
|
Here is an example :
|
81
85
|
|
@@ -86,20 +90,38 @@ Here is an example :
|
|
86
90
|
:description => "some description about this method to show in the documentation"
|
87
91
|
|
88
92
|
|
89
|
-
|
93
|
+
The exception classes used <b>must inherit</b> from <tt>WashOut::SOAPError</tt>, which has by default a error code and a message as attributes but you can extend it by adding more attributes to your own custom class.
|
90
94
|
|
91
|
-
|
95
|
+
The WashOut::SoapError now includes Virtus.model from +virtus+ gem. This way you can add attributes like this:
|
92
96
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
+
class MyCustomSoapError < WashOut::SOAPError
|
98
|
+
|
99
|
+
attribute :custom_attribute, String
|
100
|
+
attribute :other_custom_attribute, Integer
|
101
|
+
|
102
|
+
end
|
103
|
+
|
104
|
+
You can also specify complex types like this:
|
97
105
|
|
98
|
-
|
106
|
+
class MyCustomSoapError < WashOut::SOAPError
|
107
|
+
|
108
|
+
attribute :errors,Array[Integer]
|
109
|
+
attribute :custom, Array[MyCustomModel]
|
110
|
+
attribute :custom2, MyCustomModel
|
111
|
+
|
112
|
+
end
|
99
113
|
|
100
|
-
|
114
|
+
<b>The class MyCustomModel must include +Virtus.model+ if you want it to show up in the documentation!</b>
|
115
|
+
|
116
|
+
And you can also use inheritance between custom exception classes like this:
|
101
117
|
|
118
|
+
class MySecondCustomSoapError < MyCustomSoapError
|
119
|
+
|
120
|
+
atribute :option , String
|
121
|
+
|
122
|
+
end
|
102
123
|
|
124
|
+
And you will see in the documentation that the class +MySecondCustomSoapError+ will extend +MyCustomSoapError+
|
103
125
|
|
104
126
|
= Testing
|
105
127
|
|
@@ -42,9 +42,9 @@ xml.html( "xmlns" => "http://www.w3.org/1999/xhtml" ) {
|
|
42
42
|
xml.a( "href" => "#{@namespace}") { |y| y << "#{@namespace}" }
|
43
43
|
};}
|
44
44
|
|
45
|
-
unless @
|
45
|
+
unless @soap_config.description.blank?
|
46
46
|
xml.h1 "#{@service}"
|
47
|
-
xml.p "#{@
|
47
|
+
xml.p "#{@soap_config.description}"
|
48
48
|
end
|
49
49
|
|
50
50
|
xml.div("class" => "noprint") {
|