Socket
Book a DemoInstallSign in
Socket

sedative

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sedative

0.0.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Sedative

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'sedative'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sedative

And run the generator:

$ rails g sedative:install

By default, it will create Settings and Switches variables. You can change this by adding arguments to the generator. For a single variable called Constants, do this:

$ rails g sedative:install constants

Usage

Open up config/settings/settings.yml, or whatever you named your settings variable to, and stick with the pattern. It's really DRY and convenient having all your settings in one file.

Beyond convenience, the settings also change based on your environment. I like to keep API information here. You can do something like this:

development:
   mailchimp:
     token: [Your development API token]
     secret: [Your development API key]

production:
   mailchimp:
     token: [Your production API token]
     secret: [Your production API secret]

When you need to connect to the service, using the settings is simple:

OAuth2::Client.new Settings.mailchimp.id,
                   Settings.mailchimp.secret,
                   site: 'https://login.mailchimp.com',
                   authorize_url: '/oauth2/authorize',
                   token_url: '/oauth2/token'

There you go.

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 15 Jun 2012

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.