Samplar
Samplar is mountable engine for Rails. Generates API clients tester page.
Recommend only development env.
Support Rails version
gem 'rails', '~> 4.2.11'
Installation
Add to Gemfile.
gem 'samplar'
And then bundle.
$ bundle
Usage
# config/routes.rb
Rails.routes.draw do
...
mount Samplar::Engine => "/samplar"
end
Create config/samplar.yaml
client:
foo:
bar:
- arg1
- arg2
self:
foo:
bar:
- arg1
- arg2
Run rails server
$ bundle exec rails s
And then access to http://localhost:3000/samplar
Example
/sampler page
- Show client name and methods list when access to
/samplarpage. - These sample client classes are defined here.
- And sample
samplar.ymlis here
No argument method
Click execute.
Then show the output result.
Client#foo output execute instance method foo.

With 2 arguments method
Click Client#bar. This method needs 2 args to call.

About LICENSE
This project rocks and uses MIT-LICENSE.



