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

environment

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

environment

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= Environment

Environment variables in are not available to scripts running as crons and/or services. This gem allows ruby scripts running as a cron and/or as a service full access to the system environment variables.

== Installation

gem install environment

== Usage

The global constant ENV is left untouched by default. To read an environment variable, use Environment.get or Environment[].

Example usage:

require "rubygems" require "environment"

the following two are the same

path = Environment['PATH'] home = Environment.get('HOME')

If you want to override the default ENV constant, use the override! method

Example usage:

require "rubygems" require "environment"

host = ENV['HOSTNAME'] #nil Environment.override! host = ENV['HOSTNAME'] #yourdomain.com

FAQs

Package last updated on 22 Apr 2011

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