cf-app-utils

Helper methods for apps running on Cloud Foundry.

Installation

Add this line to your application's Gemfile:

gem 'cf-app-utils'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cf-app-utils

Usage

Require and use the gem in your application:

require 'cf-app-utils'

CF::App::Credentials.find_by_service_*

Returns the credentials hash for a given service that you have bound to your application.

# Get credentials for the service with the given name
CF::App::Credentials.find_by_service_name('master-db')

# Get credentials for the first service with the given tag
CF::App::Credentials.find_by_service_tag('relational')

# Get credentials for the first service with the given label
CF::App::Credentials.find_by_service_label('cleardb')