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

cre

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cre

  • 2.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status Gem Version

Cre

This gem basically lets you dig out the rails encrypted credentials by simply doing:

Cre.dig(:password)

Instead of going the long way:

Rails.application.credentials.dig(Rails.env.to_sym, :password)

Usage

By default it uses the currently active rails environment. Specify the environment specifically by adding it as the first argument. But do remember that it only considers defined environments in config/environments

Cre.dig(:production, :password)

⚠️ This assumes your credentials are setup like:

production:
  aws_key: 'somekeyproduction'
  password: 'fakepass'
development:
  aws_key: 'somekeydevelopment'
  password: 'fakepass'
test:
  aws_key: 'somekeytest'
  password: 'fakepass'

It also supports deeper nested credentials for example:

Cre.dig(:production, :aws, :client, secret, :key)

Or:

Cre.dig(:something, :nested, :multiple, :layers, :deep)

Installation

Add this line to your application's Gemfile:

gem 'cre', '~> 2.1.1'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cre

##Todo:

  • Exeption handeling

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 17 Dec 2021

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