https://github.com/pepicrft/encrypted-environment
Ruby utility to load encrypted variables into the environment
https://github.com/pepicrft/encrypted-environment
ejson encrypt keys ruby
Last synced: 4 months ago
JSON representation
Ruby utility to load encrypted variables into the environment
- Host: GitHub
- URL: https://github.com/pepicrft/encrypted-environment
- Owner: pepicrft
- License: mit
- Created: 2019-01-10T08:57:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:37:57.000Z (over 2 years ago)
- Last Synced: 2025-09-06T15:40:46.941Z (9 months ago)
- Topics: ejson, encrypt, keys, ruby
- Language: Ruby
- Size: 14.6 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Encrypted enironment
[](https://circleci.com/gh/pepibumur/encrypted-environment)
[](https://codecov.io/gh/pepibumur/encrypted-environment)
[](https://badge.fury.io/rb/encrypted-environment)
Ruby utility to load encrypted variables into the environment
## Install
1. Add the following line to the Gemfile:
```
gem "encrypted-environment", git: "git@github.com:pepibumur/encrypted-environment.git"
```
2. Run `bundle install`
## Usage
```ruby
require "encrypted/environment"
Encrypted::Environment.load_from_ejson(
"path/to/env.ejson",
secrets_path: "secrets",
private_key: "key"
)
Encrypted::Environment.encrypt_ejson(
"path/to/env.ejson",
secrets_path: "secrets",
private_key: "key"
)
```