New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

redis_env

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis_env

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Redis Env

Store your environment variables in Redis.

Installation

$ gem install redis_env

Usage

Commands:
  redis-env clear           # Remove all environment variables
  redis-env exec COMMAND    # Run a COMMAND within the environment
  redis-env list            # List all variables
  redis-env load FILE       # Read an env file and load it into redis
  redis-env set NAME VALUE  # Set an environment variable called NAME to VALUE
  redis-env unset NAME      # Remove an environment variable called NAME

Options:
  [--project=PROJECT]  # The project these variables are for
  [--redis=REDIS]      # The url of the redis server
                       # Default: redis://localhost:6379/0

Examples

Load your existing .env file

redis-env load --project my-awesome-app .env

Now run your app using redis-env

redis-env exec --project my-awesome-app rails s

Programmatic Usage

require "redis_env"
client = RedisEnv.new(Redis.new, "my-awesome-app")

# Write keys
client.set("IMPORTANT_KEY", "VALUE")
client.bulk_set("IMPORTANT_KEY" => "NEW VALUE", "ANOTHER_KEY" => "banana")

# Use keys
SomeRestClient.new(url: client.variables["RELEVENT_URL"])

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sionide21/redis-env.

FAQs

Package last updated on 27 Feb 2016

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