Sha256: 1069d0a14ea26fa04738f0fb6c7fcbbb27502bbbadfebcacd6c4d0a352e65510

Contents?: true

Size: 1.24 KB

Versions: 8

Compression:

Stored size: 1.24 KB

Contents

## CouchbaseSettings ##

Couchbase Server Settings in YAML for your Rails 3 app. Using patterns similar to the Yettings gem, it turns yaml into methods on the CouchbaseSettings module. 

## Required: Rails 3 and Ruby >= 1.9.2-p271 ##

## Install the gem ##

Add this to your Gemfile

```ruby
gem "couchbase-settings"
```


Install with Bundler

```bash
$ bundle install
``` 

## Adding the YAML file with your key/value pairs ##

Create a YAML file inside /your_rails_app/config called couchbase.yml

## Couchbase YAML file content ##

You can define key/value pairs in the YAML file and these will be available in your app.  You can set the defaults and any environment specific values.  
The file must contain each environment that you will use in your Rails app.  Here is a sample:

```yaml
defaults: &defaults
  server: 127.0.0.1
  servers:
    - 127.0.0.1
    - 127.0.0.2
     
  bucket: default
  password: 

development:
  <<: *defaults
  

test:
  <<: *defaults

production:
  <<: *defaults
```

## Accessing the values in your Rails app ##

```ruby
# Single Server IP
CouchbaseSettings.server  

# Server Cluster IP's (Array)
CouchbaseSettings.servers 

# Server Bucket Name
CouchbaseSettings.bucket

# Bucket Password, if set
CouchbaseSettings.password 
```

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
couchbase-settings-0.3.4 README.md
couchbase-settings-0.1.4 README.md
couchbase-settings-0.1.3 README.md
couchbase-settings-0.1.2 README.md
couchbase-settings-0.1.1 README.md
couchbase-settings-0.1.0 README.md
couchbase-settings-0.0.6 README.md
couchbase-settings-0.0.4 README.md