<img src=“https://travis-ci.org/bogdanRada/washout_builder.png?branch=master,develop” />
<img src=“https://www.versioneye.com/user/projects/52fc7297ec1375346600007d/badge.png” alt=“Dependency Status” />}[https://www.versioneye.com/user/projects/52fc7297ec1375346600007d]{<img src=“https://www.versioneye.com/user/projects/52fc7297ec1375346600007d/badge.png” alt=“Dependency Status” /> <img src=“https://coveralls.io/repos/bogdanRada/washout_builder/badge.png” alt=“Coverage Status” /> <img src=“https://codeclimate.com/github/bogdanRada/washout_builder.png” /> <img src=“https://reposs.herokuapp.com/?path=bogdanRada/washout_builder” alt=“Repo Size”/> <img src=“https://gem-download-badge.herokuapp.com/?gem=washout_builder&type=total” alt=“Version Downloads”/>
WashOutBuilder is a Soap Service Documentation generator (extends WashOut github.com/inossidabile/wash_out/)
The way WashOut is used is not modified, it just extends its functionality by generating html documentation to your services that you write
-
Provides way of seeing the available services with links to documentation, endpoint and namespace
-
Provides a human-readable HTML documentation generated for each service that you write
Rails >3.0 only. MRI 1.9, 2.0, JRuby (–1.9).
Ruby 1.8 is not officially supported since 0.5.3. We will accept further compatibilty pull-requests but no upcoming versions will be tested against it.
Rubinius support temporarily dropped since 0.6.2 due to Rails 4 incompatibility.
Type the following from the command line to install:
gem install washout_builder
Add the following to your Gemfile:
gem "washout_builder"
it will automatically install also wash_out
gem that is currently used
Or if you want this to be available only in development mode , you can do something like this inside the Gemfile:
gem 'wash_out' # The WashOut gem would be used also in production group :development, :test do gem 'washout_builder' # only available in development mode. end
Please read release details if you are upgrading. We break backward compatibility between large ticks but you can expect it to be specified at release notes.
The way soap_actions, or reusable types are defined or how the configuration is made using WashOut(github.com/inossidabile/wash_out) haven’t changed You can still do everything that gem does .
In order to see the documentation you must write something like this in the routes (exactly like you would do when using only WashOut)
In the following file config/routes.rb
you can put this configuration
WashOutSample::Application.routes.draw do wash_out :rumbas wash_out :my_other_service namespace :api do wash_out :project_service end mount WashoutBuilder::Engine => "/washout" end
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.
If you want to access directly the hml documentation that was generated for RumbasController you can do that by accessing url like this:
/washout/Rumbas #camelcase name /washout/rumbas #without camelcase /washout/Api::ProjectService # for namespaced services with camelcase /washout/api/project_service # without camelcase
When specifying the soap_service you can also pass a option for description . Here is an example
soap_service namespace: "http://my.app.com/my_service/wsdl", :description => "here goes some description for your service"
When specifying the soap_action you can also pass a option for description and a list of exceptions(need to be classes) that the method can raise at a certain moment.
Here is an example :
soap_action "find", :args => {:number => :integer} , :return => :boolean, :raises => [MyCustomSoapError, MyOtherCustomSoapError ] , :description => "some description about this method to show in the documentation"
The exception classes used must inherit from WashOut::Dispatcher::SOAPError
, which has by default a error code and a message as attributes .
To test, do the following:
-
cd to the gem root.
-
bundle install
-
bundle exec rake
Please log all feedback/issues via GitHub Issues. Thanks.
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.
-
Fork the project.
-
Start a feature/bugfix branch.
-
Commit and push until you are happy with your contribution.
-
Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright © 2013 bogdanRada. See LICENSE.txt for further details.