Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ysets

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ysets

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= ysets

YAML settings for your Rails 3 app.

===Install the gem

Add this to your Gemfile gem "ysets"

Install with Bundler bundle install

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

  1. Create a YAML file inside /your_rails_app/config/ysets/ClassName.yml
  2. On your application.rb add require "ysets/railtie" module YourApp class Application < Rails::Application Ysets::Railtie.setup!
    end end

===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.yml:

defaults: &defaults api_key: asdf12345lkj some_number: 999 erb_stuffs: <%= "erb stuff works" %> some_array: - element1 - element2

development: <<: *defaults api_key: api key for dev

test: <<: *defaults

production: <<: *defaults

In the above example, you can define the key/value pair using strings, numbers, erb code, or arrays. Notice that the "api_key" in the development environment will override the "api_key" from defaults.

===Accessing the values in your Rails app

SAMPLE.api_key # => asdf12345lkj SAMPLE.some_array[0] # => element1

FAQs

Package last updated on 22 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc