Sha256: b5d0a2ce3fc5adbfc0a9e5906830fceec9567e32927f32e1f8e7ef3b97dcde0a

Contents?: true

Size: 837 Bytes

Versions: 1

Compression:

Stored size: 837 Bytes

Contents

# Dead simple configuration

Read configuration from a YAML/JSON file and expose the keys as methods.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'dsc'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install dsc

## Usage

Create a config file:

```yaml
development:
  username: dev
  password:
production:
  username: hugo
  password: secret
  pool: 42
```

Open the file and use it:

```ruby
require 'dsc'

database_config = Dsc.load_file('config/database.yml', env: 'production')
database_config.username # => 'hugo'
```

That's it!

## 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dsc-0.0.1 README.md