RedSnow
### API Blueprint Parser for Ruby
NOTE: This library is deprecated and unmaintained. We recommend using drafter directly via libffi.
Ruby binding for the Snow Crash library, also a thermonuclear weapon.
API Blueprint is Web API documentation language. You can find API Blueprint documentation on the API Blueprint site.
Install
The best way to install RedSnow is by using its GEM package.
gem install redsnow
Installation instructions for Ubuntu 14.04 are described in detail here.
Documentation
Getting started
```ruby require ‘redsnow’
result = RedSnow.parse(‘# My API’, exportSourcemap: true) puts result.ast.name puts result.sourcemap.name ```
Parsing options
Options can be number or hash. We support :requireBlueprintName
and :exportSourcemap
option.
```ruby require ‘redsnow’
result = RedSnow::parse(‘# My API’, { :exportSourcemap => true }) puts result.ast.name puts result.sourcemap.name ```
Hacking Redsnow
You are welcome to contribute. Use following steps to build & test Redsnow.
Build
-
If needed, install bundler:
sh $ gem install bundler
-
Clone the repo + fetch the submodules:
sh $ git clone git://github.com/apiaryio/redsnow.git $ cd redsnow $ git submodule update --init --recursive
-
Build:
sh $ rake
Test
Inside the redsnow repository run:
sh
$ bundle install
$ rake test
Release
Use rake install
to test locally released version.
sh
$ rake release
Contribute
Fork & Pull Request.
License
MIT License. See the LICENSE file.