diffcrypt 0.4.1 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +40 -0
- data/.rubocop.yml +14 -1
- data/CHANGELOG.md +51 -0
- data/Gemfile +4 -3
- data/README.md +4 -11
- data/Rakefile +3 -1
- data/SECURITY.md +2 -1
- data/diffcrypt.gemspec +5 -4
- data/lib/diffcrypt/encryptor.rb +4 -4
- data/lib/diffcrypt/file.rb +26 -1
- data/lib/diffcrypt/rails/application_helper.rb +39 -0
- data/lib/diffcrypt/rails/encrypted_configuration.rb +12 -3
- data/lib/diffcrypt/railtie.rb +14 -0
- data/lib/diffcrypt/tasks/rails.rake +40 -0
- data/lib/diffcrypt/version.rb +1 -1
- data/lib/diffcrypt.rb +2 -1
- metadata +22 -12
- data/.circleci/config.yml +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb31613525e78d8a5f45fe9276daa26127c3f6555b69864cf6c438713c8a5385
|
4
|
+
data.tar.gz: f0cccb6f0706f613284e4f42e04c482dc3368c9e3b121b4d3a895c961e74383b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d0d83aedaafe07809888c2bf7edb1100ee7b51c3d99dbf9deaa6108932a6585246e7b1d0f917f403f5a765e4421a73804465afacb6bd1c942c4a2befee1ecec
|
7
|
+
data.tar.gz: d40a2bfb110cae3f2961c5ca57f5de5e5250d54354b9470b1ffa140bf88717970cb9d067f65a4f03576e26b7b2372c88b5294eb22158bbfcc51bb8aa749cb07a
|
@@ -0,0 +1,40 @@
|
|
1
|
+
name: test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
rspec:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby:
|
15
|
+
- "2.7.5"
|
16
|
+
- "3.0.3"
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
bundler-cache: true
|
24
|
+
- name: Run rspec
|
25
|
+
run: bundle exec rake test
|
26
|
+
rubocop:
|
27
|
+
runs-on: ubuntu-latest
|
28
|
+
strategy:
|
29
|
+
matrix:
|
30
|
+
ruby:
|
31
|
+
- "2.7.5"
|
32
|
+
steps:
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
- name: Set up Ruby
|
35
|
+
uses: ruby/setup-ruby@v1
|
36
|
+
with:
|
37
|
+
ruby-version: ${{ matrix.ruby }}
|
38
|
+
bundler-cache: true
|
39
|
+
- name: Run rubocop
|
40
|
+
run: bundle exec rubocop
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
AllCops:
|
2
2
|
NewCops: enable
|
3
|
+
TargetRubyVersion: 2.6
|
3
4
|
|
4
5
|
Style/ClassAndModuleChildren:
|
5
6
|
Exclude:
|
@@ -8,14 +9,26 @@ Style/Documentation:
|
|
8
9
|
Enabled: false
|
9
10
|
Metrics/MethodLength:
|
10
11
|
Exclude:
|
12
|
+
- test/*_test.rb
|
11
13
|
- test/**/*_test.rb
|
12
|
-
|
14
|
+
Naming/VariableNumber:
|
15
|
+
Exclude:
|
16
|
+
- test/*_test.rb
|
17
|
+
- test/**/*_test.rb
|
18
|
+
Style/TrailingCommaInArrayLiteral:
|
13
19
|
EnforcedStyleForMultiline: consistent_comma
|
14
20
|
Style/TrailingCommaInArguments:
|
15
21
|
EnforcedStyleForMultiline: consistent_comma
|
22
|
+
Style/TrailingCommaInHashLiteral:
|
23
|
+
EnforcedStyleForMultiline: consistent_comma
|
16
24
|
Style/AccessorGrouping:
|
17
25
|
EnforcedStyle: separated
|
26
|
+
Style/OpenStructUse:
|
27
|
+
Exclude:
|
28
|
+
- test/*_test.rb
|
29
|
+
- test/**/*_test.rb
|
18
30
|
|
19
31
|
Layout/LineLength:
|
20
32
|
Exclude:
|
33
|
+
- test/*_test.rb
|
21
34
|
- test/**/*_test.rb
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
|
9
9
|
|
10
|
+
## Unreleased
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Broken namespace when saving credentials in rails
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
## [0.6.0] - 2022-02-06
|
19
|
+
|
20
|
+
### Added
|
21
|
+
|
22
|
+
- Rails 7 support
|
23
|
+
- Ruby 3.0 support
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
|
27
|
+
- Updated all dependencies
|
28
|
+
- Migrated from CircleCI to GitHub Actions
|
29
|
+
- Moved repo to own organisation
|
30
|
+
|
31
|
+
### Fixed
|
32
|
+
|
33
|
+
- Only add `.gitignore` entry once #52
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
## [0.5.1] - 2021-03-29
|
38
|
+
|
39
|
+
### Added
|
40
|
+
|
41
|
+
- Support for Rails 6.1
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
## [0.5.0] - 2020-12-06
|
46
|
+
|
47
|
+
### Added
|
48
|
+
|
49
|
+
- `Diffcrypt::Rails::ApplicationHelper` to simplify integration
|
50
|
+
- `rake diffcrypt:init` command to help setup credentials
|
51
|
+
|
52
|
+
### Changed
|
53
|
+
|
54
|
+
- Default cipher is now `aes-265-gcm`
|
55
|
+
- YAML keys are now sorted
|
56
|
+
- Improved support for rails native `aes-128-gcm` cipher
|
57
|
+
- Improved test coverage for differing ciphers
|
58
|
+
|
59
|
+
|
60
|
+
|
10
61
|
## [0.4.1] - 2020-10-06
|
11
62
|
|
12
63
|
### Fixed
|
data/Gemfile
CHANGED
@@ -6,7 +6,8 @@ source 'https://rubygems.org'
|
|
6
6
|
gemspec
|
7
7
|
|
8
8
|
gem 'minitest', '~> 5.0'
|
9
|
+
gem 'minitest-reporters', '~> 1.5.0'
|
9
10
|
gem 'rake', '~> 13.0'
|
10
|
-
gem 'rubocop', '~>
|
11
|
-
gem 'simplecov', '~> 0.
|
12
|
-
gem 'simplecov-lcov', '< 0.
|
11
|
+
gem 'rubocop', '~> 1.25.1'
|
12
|
+
gem 'simplecov', '~> 0.21.2', require: false # CodeClimate not compatible with 0.18+ yet - https://github.com/codeclimate/test-reporter/issues/413
|
13
|
+
gem 'simplecov-lcov', '< 0.9'
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Diffcrypt
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/diffcrypt.svg)](https://rubygems.org/gems/diffcrypt)
|
4
|
-
[![CircleCI](https://circleci.com/gh/
|
4
|
+
[![CircleCI](https://circleci.com/gh/diffcrypt/diffcrypt-ruby.svg?style=svg)](https://circleci.com/gh/diffcrypt/diffcrypt-ruby)
|
5
5
|
|
6
6
|
|
7
7
|
Diffable encrypted files that you can safely commit into your repo.
|
@@ -66,17 +66,10 @@ Currently there is not native support for rails, but ActiveSupport can be monkey
|
|
66
66
|
the built in encrypter. All existing `rails credentials:edit` also work with this method.
|
67
67
|
|
68
68
|
```ruby
|
69
|
-
|
69
|
+
# config/application.rb
|
70
70
|
module Rails
|
71
71
|
class Application
|
72
|
-
|
73
|
-
Diffcrypt::Rails::EncryptedConfiguration.new(
|
74
|
-
config_path: Rails.root.join(path),
|
75
|
-
key_path: Rails.root.join(key_path),
|
76
|
-
env_key: env_key,
|
77
|
-
raise_if_missing_key: config.require_master_key,
|
78
|
-
)
|
79
|
-
end
|
72
|
+
include Diffcrypt::Rails::ApplicationHelper
|
80
73
|
end
|
81
74
|
end
|
82
75
|
```
|
@@ -104,7 +97,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
104
97
|
|
105
98
|
## Contributing
|
106
99
|
|
107
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
100
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/diffcrypt/diffcrypt-ruby.
|
108
101
|
|
109
102
|
|
110
103
|
|
data/Rakefile
CHANGED
data/SECURITY.md
CHANGED
data/diffcrypt.gemspec
CHANGED
@@ -10,14 +10,14 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = 'Diffable encrypted configuration files'
|
12
12
|
spec.description = 'Diffable encrypted configuration files that can be safely committed into a git repository'
|
13
|
-
spec.homepage = 'https://github.com/
|
13
|
+
spec.homepage = 'https://github.com/diffcrypt/diffcrypt-ruby'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
|
16
16
|
|
17
17
|
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
18
18
|
|
19
19
|
spec.metadata['homepage_uri'] = spec.homepage
|
20
|
-
spec.metadata['source_code_uri'] = 'https://github.com/
|
20
|
+
spec.metadata['source_code_uri'] = 'https://github.com/diffcrypt/diffcrypt-ruby'
|
21
21
|
# spec.metadata['changelog_uri'] = "TODO: Put your gem's CHANGELOG.md URL here."
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = %w[diffcrypt]
|
30
30
|
spec.require_paths = ['lib']
|
31
31
|
|
32
|
-
spec.add_runtime_dependency 'activesupport', '
|
32
|
+
spec.add_runtime_dependency 'activesupport', '>= 6.0', '< 7.1'
|
33
33
|
spec.add_runtime_dependency 'thor', '>= 0.20', '< 2'
|
34
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
34
35
|
end
|
data/lib/diffcrypt/encryptor.rb
CHANGED
@@ -12,7 +12,7 @@ require_relative './version'
|
|
12
12
|
|
13
13
|
module Diffcrypt
|
14
14
|
class Encryptor
|
15
|
-
DEFAULT_CIPHER = 'aes-
|
15
|
+
DEFAULT_CIPHER = 'aes-256-gcm'
|
16
16
|
|
17
17
|
def self.generate_key(cipher = DEFAULT_CIPHER)
|
18
18
|
SecureRandom.hex(ActiveSupport::MessageEncryptor.key_len(cipher))
|
@@ -47,11 +47,11 @@ module Diffcrypt
|
|
47
47
|
# @param [String] contents The raw YAML string to be encrypted
|
48
48
|
# @param [String, nil] original_encrypted_contents The original (encrypted) content to determine which keys have changed
|
49
49
|
# @return [String]
|
50
|
-
def encrypt(contents, original_encrypted_contents = nil)
|
50
|
+
def encrypt(contents, original_encrypted_contents = nil, cipher: nil)
|
51
51
|
data = encrypt_data contents, original_encrypted_contents
|
52
52
|
YAML.dump(
|
53
53
|
'client' => "diffcrypt-#{Diffcrypt::VERSION}",
|
54
|
-
'cipher' => @cipher,
|
54
|
+
'cipher' => cipher || @cipher,
|
55
55
|
'data' => data,
|
56
56
|
)
|
57
57
|
end
|
@@ -86,7 +86,7 @@ module Diffcrypt
|
|
86
86
|
key_changed ? encrypt_string(value) : original_encrypted_value
|
87
87
|
end
|
88
88
|
end
|
89
|
-
data
|
89
|
+
data.sort.to_h
|
90
90
|
end
|
91
91
|
# rubocop:enable Metrics/PerceivedComplexity, Metrics/MethodLength, Metrics/CyclomaticComplexity
|
92
92
|
|
data/lib/diffcrypt/file.rb
CHANGED
@@ -14,7 +14,10 @@ module Diffcrypt
|
|
14
14
|
to_yaml['cipher']
|
15
15
|
end
|
16
16
|
|
17
|
+
# Determines the cipher to use for encryption/decryption
|
17
18
|
def cipher
|
19
|
+
return 'aes-128-gcm' if format == 'activesupport'
|
20
|
+
|
18
21
|
to_yaml['cipher'] || Encryptor::DEFAULT_CIPHER
|
19
22
|
end
|
20
23
|
|
@@ -23,11 +26,33 @@ module Diffcrypt
|
|
23
26
|
::File.exist?(@path)
|
24
27
|
end
|
25
28
|
|
29
|
+
# Determines the format to be used for encryption
|
30
|
+
# @return [String] diffcrypt|activesupport
|
31
|
+
def format
|
32
|
+
return 'diffcrypt' if read == ''
|
33
|
+
return 'diffcrypt' if read.index('---')&.zero?
|
34
|
+
|
35
|
+
'activesupport'
|
36
|
+
end
|
37
|
+
|
26
38
|
# @return [String] Raw contents of the file
|
27
39
|
def read
|
40
|
+
return '' unless ::File.exist?(@path)
|
41
|
+
|
28
42
|
@read ||= ::File.read(@path)
|
43
|
+
@read
|
44
|
+
end
|
45
|
+
|
46
|
+
# Save the encrypted contents back to disk
|
47
|
+
# @return [Boolean] True is file save was successful
|
48
|
+
def write(key, data, cipher: nil)
|
49
|
+
cipher ||= self.cipher
|
50
|
+
yaml = ::YAML.dump(data)
|
51
|
+
contents = Encryptor.new(key, cipher: cipher).encrypt(yaml)
|
52
|
+
::File.write(@path, contents)
|
29
53
|
end
|
30
54
|
|
55
|
+
# TODO: This seems useless, figure out what's up
|
31
56
|
def encrypt(key, cipher: DEFAULT_CIPHER)
|
32
57
|
return read if encrypted?
|
33
58
|
|
@@ -42,7 +67,7 @@ module Diffcrypt
|
|
42
67
|
end
|
43
68
|
|
44
69
|
def to_yaml
|
45
|
-
@to_yaml ||= YAML.safe_load(read)
|
70
|
+
@to_yaml ||= YAML.safe_load(read) || {}
|
46
71
|
end
|
47
72
|
end
|
48
73
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './encrypted_configuration'
|
4
|
+
|
5
|
+
module Diffcrypt
|
6
|
+
module Rails
|
7
|
+
module ApplicationHelper
|
8
|
+
def encrypted(path, key_path: 'config/master.key', env_key: 'RAILS_MASTER_KEY')
|
9
|
+
config_path, key_path = resolve_encrypted_paths(path, key_path)
|
10
|
+
|
11
|
+
Diffcrypt::Rails::EncryptedConfiguration.new(
|
12
|
+
config_path: config_path,
|
13
|
+
key_path: key_path,
|
14
|
+
env_key: env_key,
|
15
|
+
raise_if_missing_key: config.require_master_key,
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
def resolve_encrypted_paths(config_path, key_path)
|
22
|
+
config_path_abs = ::Rails.root.join(config_path)
|
23
|
+
key_path_abs = ::Rails.root.join(key_path)
|
24
|
+
|
25
|
+
# We always want to use `config/credentials/[environment]` for consistency
|
26
|
+
# If the master credentials do not exist, and a user has not specificed an environment, default to development
|
27
|
+
if config_path == 'config/credentials.yml.enc' && ::File.exist?(config_path_abs.to_s) == false
|
28
|
+
config_path_abs = ::Rails.root.join('config/credentials/development.yml.enc')
|
29
|
+
key_path_abs = ::Rails.root.join('config/credentials/development.key')
|
30
|
+
end
|
31
|
+
|
32
|
+
[
|
33
|
+
config_path_abs,
|
34
|
+
key_path_abs,
|
35
|
+
]
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -4,6 +4,8 @@ require 'fileutils'
|
|
4
4
|
require 'pathname'
|
5
5
|
require 'tmpdir'
|
6
6
|
|
7
|
+
require 'active_support/isolated_execution_state' if Gem.loaded_specs['activesupport'].version.to_s.index('7.')&.zero?
|
8
|
+
|
7
9
|
require 'active_support/ordered_options'
|
8
10
|
require 'active_support/core_ext/hash'
|
9
11
|
require 'active_support/core_ext/module/delegation'
|
@@ -52,7 +54,7 @@ module Diffcrypt
|
|
52
54
|
def write(contents, original_encrypted_contents = nil)
|
53
55
|
deserialize(contents)
|
54
56
|
|
55
|
-
|
57
|
+
::File.binwrite "#{content_path}.tmp", encrypt(contents, original_encrypted_contents)
|
56
58
|
::FileUtils.mv "#{content_path}.tmp", content_path
|
57
59
|
end
|
58
60
|
|
@@ -88,6 +90,13 @@ module Diffcrypt
|
|
88
90
|
end
|
89
91
|
# rubocop:enable Metrics/AbcSize
|
90
92
|
|
93
|
+
# Standard rails credentials encrypt the entire file. We need to detect this to use the correct
|
94
|
+
# data interface
|
95
|
+
# @return [Boolean]
|
96
|
+
def rails_native_credentials?(contents)
|
97
|
+
contents.index('---').nil?
|
98
|
+
end
|
99
|
+
|
91
100
|
# @param [String] contents The new content to be encrypted
|
92
101
|
# @param [String] diff_against The original (encrypted) content to determine which keys have changed
|
93
102
|
# @return [String] Encrypted content to commit
|
@@ -98,7 +107,7 @@ module Diffcrypt
|
|
98
107
|
# @param [String] contents
|
99
108
|
# @return [String]
|
100
109
|
def decrypt(contents)
|
101
|
-
if contents
|
110
|
+
if rails_native_credentials?(contents)
|
102
111
|
active_support_encryptor.decrypt_and_verify contents
|
103
112
|
else
|
104
113
|
encryptor.decrypt contents
|
@@ -110,7 +119,7 @@ module Diffcrypt
|
|
110
119
|
def active_support_encryptor
|
111
120
|
@active_support_encryptor ||= ActiveSupport::MessageEncryptor.new(
|
112
121
|
[key].pack('H*'),
|
113
|
-
cipher:
|
122
|
+
cipher: 'aes-128-gcm',
|
114
123
|
)
|
115
124
|
end
|
116
125
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'diffcrypt/rails/application_helper'
|
4
|
+
|
5
|
+
module Diffcrypt
|
6
|
+
class Railtie < ::Rails::Railtie
|
7
|
+
railtie_name :diffcrypt
|
8
|
+
|
9
|
+
rake_tasks do
|
10
|
+
path = ::File.expand_path(__dir__)
|
11
|
+
::Dir.glob("#{path}/tasks/**/*.rake").each { |f| load f }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# rubocop:disable Metrics/BlockLength
|
4
|
+
namespace :diffcrypt do
|
5
|
+
desc 'Initialize credentials for all environments'
|
6
|
+
task :init, %i[environments] do |_t, args|
|
7
|
+
args.with_defaults(
|
8
|
+
environments: 'development,test,staging,production',
|
9
|
+
)
|
10
|
+
environments = args.environments.split(',')
|
11
|
+
|
12
|
+
environments.each do |environment|
|
13
|
+
key_path = Rails.root.join('config', 'credentials', "#{environment}.key")
|
14
|
+
file_path = Rails.root.join('config', 'credentials', "#{environment}.yml.enc")
|
15
|
+
next if File.exist?(file_path) || File.exist?(key_path)
|
16
|
+
|
17
|
+
# Generate a new key
|
18
|
+
key = Diffcrypt::Encryptor.generate_key
|
19
|
+
key_dir = File.dirname(key_path)
|
20
|
+
Dir.mkdir(key_dir) unless Dir.exist?(key_dir)
|
21
|
+
::File.write(key_path, key)
|
22
|
+
|
23
|
+
# Encrypt default contents
|
24
|
+
file = Diffcrypt::File.new(file_path)
|
25
|
+
data = {
|
26
|
+
'secret_key_base' => SecureRandom.hex(32),
|
27
|
+
}
|
28
|
+
file.write(key, data)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Ensure .key files are always ignored
|
32
|
+
gitignore_path = Rails.root.join('.gitignore')
|
33
|
+
unless File.read(gitignore_path).include?('config/credentials/*.key')
|
34
|
+
::File.open(gitignore_path, 'a') do |f|
|
35
|
+
f.write("\nconfig/credentials/*.key")
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
# rubocop:enable Metrics/BlockLength
|
data/lib/diffcrypt/version.rb
CHANGED
data/lib/diffcrypt.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'diffcrypt/encryptor'
|
4
4
|
require 'diffcrypt/version'
|
5
|
+
require 'diffcrypt/railtie' if defined?(Rails)
|
5
6
|
|
6
7
|
module Diffcrypt
|
7
8
|
class Error < StandardError; end
|
@@ -16,7 +17,7 @@ module Diffcrypt
|
|
16
17
|
def initialize(key_path:, env_key:)
|
17
18
|
super \
|
18
19
|
'Missing encryption key to decrypt file with. ' \
|
19
|
-
|
20
|
+
"Ask your team for your master key and write it to #{key_path} or put it in the ENV['#{env_key}']."
|
20
21
|
end
|
21
22
|
end
|
22
23
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diffcrypt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Qualie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '6.0'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: '7.1'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '6.0'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: '7.1'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: thor
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,8 +59,8 @@ executables:
|
|
53
59
|
extensions: []
|
54
60
|
extra_rdoc_files: []
|
55
61
|
files:
|
56
|
-
- ".circleci/config.yml"
|
57
62
|
- ".github/dependabot.yml"
|
63
|
+
- ".github/workflows/test.yml"
|
58
64
|
- ".gitignore"
|
59
65
|
- ".rubocop.yml"
|
60
66
|
- CHANGELOG.md
|
@@ -71,15 +77,19 @@ files:
|
|
71
77
|
- lib/diffcrypt/cli.rb
|
72
78
|
- lib/diffcrypt/encryptor.rb
|
73
79
|
- lib/diffcrypt/file.rb
|
80
|
+
- lib/diffcrypt/rails/application_helper.rb
|
74
81
|
- lib/diffcrypt/rails/encrypted_configuration.rb
|
82
|
+
- lib/diffcrypt/railtie.rb
|
83
|
+
- lib/diffcrypt/tasks/rails.rake
|
75
84
|
- lib/diffcrypt/version.rb
|
76
85
|
- tmp/.keep
|
77
|
-
homepage: https://github.com/
|
86
|
+
homepage: https://github.com/diffcrypt/diffcrypt-ruby
|
78
87
|
licenses:
|
79
88
|
- MIT
|
80
89
|
metadata:
|
81
|
-
homepage_uri: https://github.com/
|
82
|
-
source_code_uri: https://github.com/
|
90
|
+
homepage_uri: https://github.com/diffcrypt/diffcrypt-ruby
|
91
|
+
source_code_uri: https://github.com/diffcrypt/diffcrypt-ruby
|
92
|
+
rubygems_mfa_required: 'true'
|
83
93
|
post_install_message:
|
84
94
|
rdoc_options: []
|
85
95
|
require_paths:
|
@@ -88,14 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
98
|
requirements:
|
89
99
|
- - ">="
|
90
100
|
- !ruby/object:Gem::Version
|
91
|
-
version: 2.
|
101
|
+
version: 2.6.0
|
92
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
103
|
requirements:
|
94
104
|
- - ">="
|
95
105
|
- !ruby/object:Gem::Version
|
96
106
|
version: '0'
|
97
107
|
requirements: []
|
98
|
-
rubygems_version: 3.
|
108
|
+
rubygems_version: 3.1.6
|
99
109
|
signing_key:
|
100
110
|
specification_version: 4
|
101
111
|
summary: Diffable encrypted configuration files
|
data/.circleci/config.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
version: 2.1
|
2
|
-
|
3
|
-
jobs:
|
4
|
-
build:
|
5
|
-
docker:
|
6
|
-
- image: circleci/ruby:2.6.6
|
7
|
-
working_directory: /mnt/ramdisk
|
8
|
-
steps:
|
9
|
-
- checkout
|
10
|
-
- run: bundle install
|
11
|
-
- run:
|
12
|
-
name: Setup Code Climate test-reporter
|
13
|
-
command: |
|
14
|
-
# download test reporter as a static binary
|
15
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
16
|
-
chmod +x ./cc-test-reporter
|
17
|
-
- run:
|
18
|
-
name: rake test
|
19
|
-
command: |
|
20
|
-
./cc-test-reporter before-build
|
21
|
-
bundle exec rake test
|
22
|
-
./cc-test-reporter after-build --coverage-input-type lcov --exit-code $?
|
23
|
-
- run:
|
24
|
-
name: rubocop
|
25
|
-
command: bundle exec rubocop
|
26
|
-
when: always
|