README.md in config_volumizer-0.2.0 vs README.md in config_volumizer-0.3.0
- old
+ new
@@ -1,9 +1,11 @@
# config_volumizer
[](https://travis-ci.org/payrollhero/config_volumizer)
[](https://codeclimate.com/github/payrollhero/config_volumizer)
+[](https://coveralls.io/r/payrollhero/config_volumizer?branch=master)
+[](https://gemnasium.com/payrollhero/config_volumizer)
* [Homepage](https://rubygems.org/gems/config_volumizer)
* [Documentation](http://rubydoc.info/gems/config_volumizer/frames)
* [Email](mailto:piotr.banasik at gmail.com)
@@ -30,37 +32,46 @@
```
info a series of ENV variables like so:
```
-some.setting[0] = one
-some.setting[1] = two
-some.setting[2] = three
-some.with.another = setting
+some_setting = one,two,three
+some_with_another = setting
```
... and then just give it some volume with the volumizer to turn it back to the original rich structure
```ruby
-ConfigVolumizer.parse(ENV, 'some')
+mapping = { "some" => { "setting" => :value, "with" => { "another" => :value } } }
+ConfigVolumizer.parse(ENV, 'some', mapping)
```
## Features
### Parsing
-You can parse a flattened config via `ConfigVolumizer.parse(ENV, 'some')`
+You can parse a flattened config via `ConfigVolumizer.parse(ENV, 'some', mapping)`
For example if your ENV was:
```
-some.setting[0] = one
-some.setting[1] = two
-some.setting[2] = three
-some.with.another = setting
+some_setting = one,two,three
+some_with_another = setting
```
+And you created a map like so:
+```ruby
+mapping = {
+ "some" => {
+ "setting" => :value,
+ "with" => {
+ "another" => :value
+ }
+ }
+}
+```
+
This would yield a {Hash} like the following:
```yaml
some:
setting:
@@ -85,16 +96,51 @@
- three
with:
another: setting
```
-You would get back a hash looking like this:
+You would get back the data and mapping looking like this:
```yaml
-"some.setting[0]": one
-"some.setting[1]": two
-"some.setting[2]": three
-"some.with.another": setting
+some:
+ setting: :value
+ with:
+ another: :value
+```
+
+```yaml
+"some_setting": one,two,three
+"some_with_another": setting
+```
+
+## Deployment
+
+In order to deploy a new version of the gem into the wild ...
+
+You will need to configure your github api token for the changelog.
+
+Generate a new token for changelogs [here](https://github.com/settings/tokens/new).
+
+add:
+
+```bash
+export CHANGELOG_GITHUB_TOKEN=YOUR_CHANGELOG_API_TOKEN
+```
+
+somewhere in your shell init. (ie .zshrc or simillar)
+
+
+```bash
+vim lib/config_volumizer/version.rb
+# set the new version
+# commit the changed version file
+# name your commit with the version number eg: "1.8.0"
+rake release
+# to push the gem to rubygems.org
+rake changelog
+# commit the changed changelog
+# name your commit with the version again eg: "changelog for 1.8.0"
+git push
```
## Install
Add it to your gemfile and use it.