Project

samplar

0.0
No commit activity in last 3 years
No release in over 3 years
API Client tester on the view.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

~> 4.2.11.1, < 6.1.0
 Project Readme

Samplar

Samplar is mountable engine for Rails. Generates API clients tester page.
Recommend only development env.

CircleCI

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.yml is here

image

No argument method

Click Client#foo.
image

Click execute.
Then show the output result.
Client#foo output execute instance method foo.
image

With 2 arguments method

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

Input args and click execute.
image

Then show the output result.
image

About LICENSE

This project rocks and uses MIT-LICENSE.