Sha256: d865515aed91d341b121ab551711f59768c69d69cab856f5a9e9b45242fd711a
Contents?: true
Size: 1.68 KB
Versions: 2
Compression:
Stored size: 1.68 KB
Contents
Configstruct ============= [![Gem Version](https://badge.fury.io/rb/configstruct.png)](http://rubygems.org/gems/configstruct) [![Build Status](https://travis-ci.org/mose/configstruct.png?branch=master)](https://travis-ci.org/mose/configstruct) [![Coverage Status](https://coveralls.io/repos/mose/configstruct/badge.png)](https://coveralls.io/r/mose/configstruct) [![Dependency Status](https://gemnasium.com/mose/configstruct.svg)](https://gemnasium.com/mose/configstruct) [![Code Climate](https://codeclimate.com/github/mose/configstruct.png)](https://codeclimate.com/github/mose/configstruct) ---- This gem is a lib for managing configfile for cli applications, including - call a setup of the config file if it does not exist - edit configuration and update the config file It's for now totally experimental, please do not use yet. ## Installation Add this line to your application's Gemfile: gem 'configstruct' ## Usage ````ruby require 'cliprompt' class Config < ConfigStruct include Cliprompt def set_defaults super default :name, 'default' default :url, 'http://greenruby.org' end def setup values = {} output.puts Paint['Applicaton configuration.', :blue] values['api_id'] = guess 'API_CLIENT', 'What is your Client ID?' values['api_secret'] = guess 'API_SECRET', 'What is your Secret Key?' write values end end ```` ## Contributing 1. Fork it 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 a new Pull Request Copyright ---------- (c) Copy is right, 2014 - mose - this code is distributed under MIT license
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
configstruct-0.0.2 | README.md |
configstruct-0.0.1 | README.md |