rails_key_rotator 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +21 -0
- data/Appraisals +17 -0
- data/CHANGELOG.md +0 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Dockerfile +15 -0
- data/Guardfile +42 -0
- data/LICENSE.txt +21 -0
- data/README.md +70 -0
- data/Rakefile +10 -0
- data/dip.yml +64 -0
- data/docker-compose.yml +21 -0
- data/gemfiles/active_support_60.gemfile +7 -0
- data/gemfiles/active_support_61.gemfile +7 -0
- data/gemfiles/active_support_70.gemfile +7 -0
- data/gemfiles/active_support_71.gemfile +7 -0
- data/lib/rails_key_rotator/version.rb +5 -0
- data/lib/rails_key_rotator.rb +50 -0
- data/rails_key_rotator.gemspec +37 -0
- data/sig/rails_key_rotator.rbs +4 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4d1778feace35c94d339199b459de6c749f82539e63cbe46a934684ec17cbb9e
|
4
|
+
data.tar.gz: 05dac7f4d49bdf29c7689ecb5c4b17a8907471d5d5139a9fa80c5f80137fbca6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b283c99e15d1bc2804ec2486971c78765b1e2eab9c68c31510baf95c53fac9e8dded8c1f380c201ad4964077428a694459556999d2516d7efafdfea55aecf02a
|
7
|
+
data.tar.gz: 9aea496df02a242c867dce7d3fe3b8237872f3d732dbbc9392eb12a0985e62296f9fa9418a2f3c3726bad156a41af6493ddcdf5e3ab4126d1db0209fe35c5dd1
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require:
|
2
|
+
- standard
|
3
|
+
inherit_gem:
|
4
|
+
standard: config/base.yml
|
5
|
+
|
6
|
+
Gemspec/DependencyVersion:
|
7
|
+
Enabled: true
|
8
|
+
Gemspec/DeprecatedAttributeAssignment:
|
9
|
+
Enabled: true
|
10
|
+
Gemspec/DevelopmentDependencies:
|
11
|
+
Enabled: true
|
12
|
+
Gemspec/DuplicatedAssignment:
|
13
|
+
Enabled: true
|
14
|
+
Gemspec/OrderedDependencies:
|
15
|
+
Enabled: true
|
16
|
+
Gemspec/RequireMFA:
|
17
|
+
Enabled: true
|
18
|
+
Gemspec/RequiredRubyVersion:
|
19
|
+
Enabled: true
|
20
|
+
Gemspec/RubyVersionGlobalsUsage:
|
21
|
+
Enabled: true
|
data/Appraisals
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
appraise "active_support_60" do
|
4
|
+
gem "activesupport", "~> 6.0.0", require: "active_support"
|
5
|
+
end
|
6
|
+
|
7
|
+
appraise "active_support_61" do
|
8
|
+
gem "activesupport", "~> 6.1.0", require: "active_support"
|
9
|
+
end
|
10
|
+
|
11
|
+
appraise "active_support_70" do
|
12
|
+
gem "activesupport", "~> 7.0.0", require: "active_support"
|
13
|
+
end
|
14
|
+
|
15
|
+
appraise "active_support_71" do
|
16
|
+
gem "activesupport", "~> 7.1.0", require: "active_support"
|
17
|
+
end
|
data/CHANGELOG.md
ADDED
File without changes
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at TODO: Write your email address. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/Dockerfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
FROM ruby:3.2
|
2
|
+
|
3
|
+
RUN apt-get update && apt-get install -y \
|
4
|
+
vim
|
5
|
+
|
6
|
+
ENV APP_HOME /app
|
7
|
+
|
8
|
+
ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
|
9
|
+
BUNDLE_JOBS=8
|
10
|
+
|
11
|
+
ARG BUNDLER_VERSION=2.4.20
|
12
|
+
RUN gem update --system && \
|
13
|
+
gem install bundler:$BUNDLER_VERSION
|
14
|
+
|
15
|
+
WORKDIR $APP_HOME
|
data/Guardfile
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features) \
|
6
|
+
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
+
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
+
#
|
12
|
+
# $ mkdir config
|
13
|
+
# $ mv Guardfile config/
|
14
|
+
# $ ln -s config/Guardfile .
|
15
|
+
#
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
+
|
18
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
19
|
+
# rspec may be run, below are examples of the most common uses.
|
20
|
+
# * bundler: 'bundle exec rspec'
|
21
|
+
# * bundler binstubs: 'bin/rspec'
|
22
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
23
|
+
# installed the spring binstubs per the docs)
|
24
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
25
|
+
# * 'just' rspec: 'rspec'
|
26
|
+
|
27
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
28
|
+
require "guard/rspec/dsl"
|
29
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
30
|
+
|
31
|
+
# Feel free to open issues for suggestions and improvements
|
32
|
+
|
33
|
+
# RSpec files
|
34
|
+
rspec = dsl.rspec
|
35
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
36
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
37
|
+
watch(rspec.spec_files)
|
38
|
+
|
39
|
+
# Ruby files
|
40
|
+
ruby = dsl.ruby
|
41
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
42
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2023 TODO: Write your name
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# RailsKeyRotator
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Install the gem and add to the application's Gemfile by executing:
|
6
|
+
|
7
|
+
$ bundle add rails_key_rotator
|
8
|
+
|
9
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
10
|
+
|
11
|
+
$ gem install rails_key_rotator
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
> _*⚠️ !!! WARNING !!! ⚠️*_
|
16
|
+
> _*⚠️ DON'T FORGET TO HANDOUT THE NEW KEY TO YOUR COLLEAGUES! ⚠️*_
|
17
|
+
|
18
|
+
1. First create a new key w/ `dip rails runner "puts ActiveSupport::EncryptedConfiguration.generate_key"` and deploy this in `RAILS_MASTER_KEY_NEW` on the targeted infrastructure.
|
19
|
+
|
20
|
+
2. While waiting on deploying this variable, create a new encrypted file:
|
21
|
+
|
22
|
+
```shell
|
23
|
+
# Copy the output current credentials
|
24
|
+
dip credentials show -e development
|
25
|
+
# Backup current credentials
|
26
|
+
mv -i config/credentials/development.yml.enc config/credentials/development.yml.enc.bak-$(date "+%Y-%m-%d-%H%M")
|
27
|
+
# Backup current key
|
28
|
+
mv -i config/credentials/development.key config/credentials/development.key.bak-$(date "+%Y-%m-%d-%H%M")
|
29
|
+
# Save the new key into file
|
30
|
+
echo d92599b046b58ab2d4158212e6d27162 > config/credentials/development.key
|
31
|
+
# Create new credentials file w/
|
32
|
+
dip credentials -e development
|
33
|
+
# Verify content
|
34
|
+
dip credentials show -e development
|
35
|
+
```
|
36
|
+
|
37
|
+
3. Commit to Github and deploy new encrypted file.
|
38
|
+
|
39
|
+
4. After a while when everything is back in sync replace `RAILS_MASTER_KEY` w/ the new key and delete `RAILS_MASTER_KEY_NEW`
|
40
|
+
|
41
|
+
### Process
|
42
|
+
|
43
|
+
When we've defined `RAILS_MASTER_KEY_NEW` it means we are rotating the encryption key for our credentials. What we want to do then is:
|
44
|
+
|
45
|
+
1. Check if we can decrypt the current credentials file with the new key
|
46
|
+
|
47
|
+
2. If we can, we will change `RAILS_MASTER_KEY` to equal `RAILS_MASTER_KEY_NEW`
|
48
|
+
|
49
|
+
3. If not, we will fallback to the old key, thus leave `RAILS_MASTER_KEY` alone
|
50
|
+
|
51
|
+
See: https://www.reddit.com/r/rails/comments/x4sujc/deploying_a_rotated_credentials_key_without/
|
52
|
+
|
53
|
+
|
54
|
+
## Development
|
55
|
+
|
56
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
57
|
+
|
58
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
59
|
+
|
60
|
+
## Contributing
|
61
|
+
|
62
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rails_key_rotator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/rails_key_rotator/blob/master/CODE_OF_CONDUCT.md).
|
63
|
+
|
64
|
+
## License
|
65
|
+
|
66
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
67
|
+
|
68
|
+
## Code of Conduct
|
69
|
+
|
70
|
+
Everyone interacting in the RailsKeyRotator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rails_key_rotator/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/dip.yml
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# Required minimum dip version
|
2
|
+
version: '7.5'
|
3
|
+
|
4
|
+
environment:
|
5
|
+
RAILS_ENV: development
|
6
|
+
|
7
|
+
compose:
|
8
|
+
files:
|
9
|
+
- docker-compose.yml
|
10
|
+
- docker-compose.override.yml # platform specific overrides
|
11
|
+
|
12
|
+
interaction:
|
13
|
+
sh:
|
14
|
+
description: Open a Bash shell within a Rails container (with dependencies up)
|
15
|
+
command: /bin/bash
|
16
|
+
service: rails_key_rotator
|
17
|
+
|
18
|
+
bash:
|
19
|
+
description: Run an arbitrary script within a container (or open a shell without deps)
|
20
|
+
command: /bin/bash
|
21
|
+
service: rails_key_rotator
|
22
|
+
|
23
|
+
bundle:
|
24
|
+
description: Run Bundler commands
|
25
|
+
command: bundle
|
26
|
+
service: rails_key_rotator
|
27
|
+
|
28
|
+
rake:
|
29
|
+
description: Run Rake commands
|
30
|
+
command: bundle exec rake
|
31
|
+
service: rails_key_rotator
|
32
|
+
|
33
|
+
guard:
|
34
|
+
description: Run red-green-red refactor loop using guard
|
35
|
+
environment:
|
36
|
+
RAILS_ENV: test
|
37
|
+
command: bundle exec guard
|
38
|
+
service: rails_key_rotator
|
39
|
+
|
40
|
+
rspec:
|
41
|
+
description: Run Rails tests
|
42
|
+
environment:
|
43
|
+
RAILS_ENV: test
|
44
|
+
command: bundle exec rspec
|
45
|
+
service: rails_key_rotator
|
46
|
+
|
47
|
+
provision:
|
48
|
+
# Dip requires .env to do anything
|
49
|
+
- touch .env
|
50
|
+
|
51
|
+
# Remove old containers and volumes.
|
52
|
+
- dip compose down --volumes --remove-orphans
|
53
|
+
- docker volume create rails_key_rotator-history
|
54
|
+
- dip compose build
|
55
|
+
|
56
|
+
# Install gems
|
57
|
+
- dip bundle install
|
58
|
+
|
59
|
+
# Setup configuration files if they do not (yet) exist
|
60
|
+
# use `|| true` to fix error when /bin/cp is used (which returns 1 when file exists)
|
61
|
+
- cp -n docker-compose.override.yml.example docker-compose.override.yml || true
|
62
|
+
- cp -n .env.local.example .env.local || true
|
63
|
+
- cp -n .env.example .env || true
|
64
|
+
|
data/docker-compose.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
version: '3.8'
|
2
|
+
|
3
|
+
services:
|
4
|
+
rails_key_rotator:
|
5
|
+
container_name: rails_key_rotator
|
6
|
+
build:
|
7
|
+
context: .
|
8
|
+
dockerfile: Dockerfile
|
9
|
+
volumes:
|
10
|
+
- .:/app
|
11
|
+
- bundle:/usr/local/bundle
|
12
|
+
- history:/usr/local/hist
|
13
|
+
environment:
|
14
|
+
HISTFILE: /usr/local/hist/.bash_history
|
15
|
+
IRB_HISTFILE: /usr/local/hist/.irb_history
|
16
|
+
|
17
|
+
volumes:
|
18
|
+
bundle:
|
19
|
+
history:
|
20
|
+
external: true
|
21
|
+
name: rails_key_rotator-history
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "rails_key_rotator/version"
|
4
|
+
require "tempfile"
|
5
|
+
require "active_support"
|
6
|
+
require "active_support/encrypted_configuration"
|
7
|
+
|
8
|
+
module RailsKeyRotator
|
9
|
+
class Error < StandardError; end
|
10
|
+
# Your code goes here...
|
11
|
+
class << self
|
12
|
+
def call
|
13
|
+
return if ENV["RAILS_MASTER_KEY"].blank?
|
14
|
+
|
15
|
+
if ENV.fetch("RAILS_MASTER_KEY_NEW", false)
|
16
|
+
if can_read_credentials!
|
17
|
+
ENV["RAILS_MASTER_KEY"] = ENV.fetch("RAILS_MASTER_KEY_NEW")
|
18
|
+
say "NEW key"
|
19
|
+
else
|
20
|
+
say "OLD key"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def can_read_credentials!
|
28
|
+
ActiveSupport::EncryptedConfiguration.new(
|
29
|
+
config_path: credential_path,
|
30
|
+
env_key: "RAILS_MASTER_KEY_NEW",
|
31
|
+
key_path: "",
|
32
|
+
raise_if_missing_key: true
|
33
|
+
).read
|
34
|
+
rescue ActiveSupport::MessageEncryptor::InvalidMessage
|
35
|
+
false
|
36
|
+
end
|
37
|
+
|
38
|
+
def credential_path
|
39
|
+
Rails.root.join("config/credentials/#{env}.yml.enc")
|
40
|
+
end
|
41
|
+
|
42
|
+
def say(message)
|
43
|
+
warn "\e[41;37;1m\n\n\tKeyRotator: Using #{message} for #{env} env\n\e[0m"
|
44
|
+
end
|
45
|
+
|
46
|
+
def env
|
47
|
+
defined?(Rails) ? Rails.env : (ENV["RAILS_ENV"] || "test")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/rails_key_rotator/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "rails_key_rotator"
|
7
|
+
spec.version = RailsKeyRotator::VERSION
|
8
|
+
spec.authors = ["Leon Berenschot"]
|
9
|
+
spec.email = ["leon@wendbaar.nl"]
|
10
|
+
|
11
|
+
spec.summary = "Rotate your RAILS_MASTER_KEY with ease"
|
12
|
+
# spec.description = "TODO: Write a longer description or delete this line."
|
13
|
+
spec.homepage = "https://wendbaar.nl"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.7.0"
|
16
|
+
|
17
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
18
|
+
|
19
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
20
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
21
|
+
spec.metadata["source_code_uri"] = "https://github.com/LeipeLeon/rails_key_rotator"
|
22
|
+
spec.metadata["changelog_uri"] = "https://github.com/LeipeLeon/rails_key_rotator/CHANGELOG.md"
|
23
|
+
|
24
|
+
# Specify which files should be added to the gem when it is released.
|
25
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
26
|
+
spec.files = Dir.chdir(__dir__) do
|
27
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
28
|
+
(File.expand_path(f) == __FILE__) ||
|
29
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
|
30
|
+
end
|
31
|
+
end
|
32
|
+
spec.bindir = "exe"
|
33
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
34
|
+
spec.require_paths = ["lib"]
|
35
|
+
|
36
|
+
spec.add_runtime_dependency "activesupport", ">= 6.0", "< 7.2"
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails_key_rotator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Leon Berenschot
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '6.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '7.2'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '6.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '7.2'
|
33
|
+
description:
|
34
|
+
email:
|
35
|
+
- leon@wendbaar.nl
|
36
|
+
executables: []
|
37
|
+
extensions: []
|
38
|
+
extra_rdoc_files: []
|
39
|
+
files:
|
40
|
+
- ".rspec"
|
41
|
+
- ".rubocop.yml"
|
42
|
+
- Appraisals
|
43
|
+
- CHANGELOG.md
|
44
|
+
- CODE_OF_CONDUCT.md
|
45
|
+
- Dockerfile
|
46
|
+
- Guardfile
|
47
|
+
- LICENSE.txt
|
48
|
+
- README.md
|
49
|
+
- Rakefile
|
50
|
+
- dip.yml
|
51
|
+
- docker-compose.yml
|
52
|
+
- gemfiles/active_support_60.gemfile
|
53
|
+
- gemfiles/active_support_61.gemfile
|
54
|
+
- gemfiles/active_support_70.gemfile
|
55
|
+
- gemfiles/active_support_71.gemfile
|
56
|
+
- lib/rails_key_rotator.rb
|
57
|
+
- lib/rails_key_rotator/version.rb
|
58
|
+
- rails_key_rotator.gemspec
|
59
|
+
- sig/rails_key_rotator.rbs
|
60
|
+
homepage: https://wendbaar.nl
|
61
|
+
licenses:
|
62
|
+
- MIT
|
63
|
+
metadata:
|
64
|
+
rubygems_mfa_required: 'true'
|
65
|
+
homepage_uri: https://wendbaar.nl
|
66
|
+
source_code_uri: https://github.com/LeipeLeon/rails_key_rotator
|
67
|
+
changelog_uri: https://github.com/LeipeLeon/rails_key_rotator/CHANGELOG.md
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 2.7.0
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubygems_version: 3.4.10
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: Rotate your RAILS_MASTER_KEY with ease
|
87
|
+
test_files: []
|