Project

herdic

0.0
No commit activity in last 3 years
No release in over 3 years
A command line HTTP client intended to create and test API documentation with ease
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 10.3

Runtime

>= 3.2, ~> 4.1
 Project Readme

Herdic

Herdic is a command line HTTP client intended to create and test API documentation with ease.

Installation

$ gem install herdic

Or add the gem to your Gemfile.

gem 'herdic'

Synopsis

herdic [-e] [-c config.yaml] [--use-ssl] path/to/spec.yaml
Option Description
-e Edit request file in vim (default) before run
-c config.yaml Specify absolute path of herdic.yaml
--use-ssl Use Net::HTTP with flag use_ssl = true

Sample

Config

# herdic.yaml
api_base: http://localhost:3000/user_v1

user_account:
  email:    user+1@example.com
  password: password

Specs

# sessions/create.yaml

- title:    Signin as user
  method:   post
  endpoint: <%= config['api_base'] %>/user_account/session

  body:
    user_account:
      email:    <%= config['user_account']['email'] %>
      password: <%= config['user_account']['password'] %>

  register:
    user_account_access_token: user_account.access_token
# user_bases/show.yaml

- include: ../sessions/create.yaml

- title:    Show user basis
  method:   get
  endpoint: <%= config['api_base'] %>/user_basis

  header:
    X-Access-Token: <%= registry['user_account_access_token'] %>

Run

$ herdic user_bases/show.yaml

License

This project is copyright by Creasty, released under the MIT lisence.
See LICENSE file for details.