Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/winebarrel/rhcl
Pure Ruby HCL parser
https://github.com/winebarrel/rhcl
Last synced: 7 days ago
JSON representation
Pure Ruby HCL parser
- Host: GitHub
- URL: https://github.com/winebarrel/rhcl
- Owner: winebarrel
- License: mit
- Archived: true
- Created: 2014-08-13T17:00:55.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-21T08:10:03.000Z (about 10 years ago)
- Last Synced: 2024-09-28T12:46:18.138Z (about 1 month ago)
- Language: Ruby
- Size: 219 KB
- Stars: 15
- Watchers: 3
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-terraform - rhcl - Pure Ruby HCL parser (Libraries / Miscellaneous)
- awesome-tf - rhcl - Pure Ruby HCL parser :skull: (Libraries / IDE)
README
# Rhcl
Pure Ruby [HCL](https://github.com/hashicorp/hcl) parser
[![Gem Version](https://badge.fury.io/rb/rhcl.png)](http://badge.fury.io/rb/rhcl)
[![Build Status](https://travis-ci.org/winebarrel/rhcl.svg?branch=master)](https://travis-ci.org/winebarrel/rhcl)## Installation
Add this line to your application's Gemfile:
gem 'rhcl'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rhcl
## Usage
### Parse
```ruby
Rhcl.parse(<<-EOS)
variable "foo" {
default = "bar"
description = "bar"
}variable "amis" {
default = {
east = "foo"
}
}
EOS
```### Dump
```ruby
Rhcl.dump(
{"variable"=>
{"foo"=>{"default"=>"bar", "description"=>"bar"},
"amis"=>{"default"=>{"east"=>"foo"}}}}
)
```## Contributing
1. Fork it ( http://github.com/winebarrel/rhcl/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request