diffcrypt 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +16 -2
- data/.rubocop.yml +4 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +3 -1
- data/SECURITY.md +17 -0
- data/diffcrypt.gemspec +1 -1
- data/lib/diffcrypt/cli.rb +6 -0
- data/lib/diffcrypt/encryptor.rb +2 -3
- data/lib/diffcrypt/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2009b6cc9a7318e8f6624d6fbde27562799a4ccd44d7aa1263d6c1ff6dbea2a8
|
4
|
+
data.tar.gz: 9f3aacfbd55710037b3bbadc56d6513b66775da721e4120b20ab5e95f320837e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5412dc78d1e840f0b8d58eb60f13b3e761945c6a76235ad9eb32fd737eaba8df027892c8ad836a56f7e154a60ecb5085608db448021d1c4cd6aad0e8a87ba696
|
7
|
+
data.tar.gz: 2c3002f8783d0c92f13f3efc13e8e8a23a3d5d80aaa9ea1c20cf7148e8bad6b3ad1a840389412c138f70a8c494c465fc592beea2774f616ca63b8406370d7797
|
data/.circleci/config.yml
CHANGED
@@ -7,5 +7,19 @@ jobs:
|
|
7
7
|
steps:
|
8
8
|
- checkout
|
9
9
|
- run: bundle install
|
10
|
-
- run:
|
11
|
-
|
10
|
+
- run:
|
11
|
+
name: Setup Code Climate test-reporter
|
12
|
+
command: |
|
13
|
+
# download test reporter as a static binary
|
14
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
15
|
+
chmod +x ./cc-test-reporter
|
16
|
+
- run:
|
17
|
+
name: rake test
|
18
|
+
command: |
|
19
|
+
./cc-test-reporter before-build
|
20
|
+
bundle exec rake test
|
21
|
+
./cc-test-reporter after-build --coverage-input-type lcov --exit-code $?
|
22
|
+
- run:
|
23
|
+
name: rubocop
|
24
|
+
command: bundle exec rubocop
|
25
|
+
when: always
|
data/.rubocop.yml
CHANGED
@@ -9,8 +9,12 @@ Style/Documentation:
|
|
9
9
|
Metrics/MethodLength:
|
10
10
|
Exclude:
|
11
11
|
- test/**/*_test.rb
|
12
|
+
TrailingCommaInArrayLiteral:
|
13
|
+
EnforcedStyleForMultiline: consistent_comma
|
12
14
|
Style/TrailingCommaInArguments:
|
13
15
|
EnforcedStyleForMultiline: consistent_comma
|
16
|
+
Style/AccessorGrouping:
|
17
|
+
EnforcedStyle: separated
|
14
18
|
|
15
19
|
Layout/LineLength:
|
16
20
|
Exclude:
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
|
9
9
|
|
10
|
+
## [0.3.2] - 2020-07-20
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- CLI: `diffcrypt generate-key` command to generate a new key for a cipher
|
15
|
+
- Internal: Library now generates and publishes code coverage publically on Code Climate
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
|
19
|
+
- Only support ruby 2.5+ since 2.4 is no longer maintained
|
20
|
+
|
21
|
+
### Removed
|
22
|
+
|
23
|
+
- No longer generate and store a checksum. Backwards compatible since it wasn't used
|
24
|
+
|
25
|
+
|
26
|
+
|
10
27
|
## [0.3.1] - 2020-07-08
|
11
28
|
|
12
29
|
### Fixed
|
data/Gemfile
CHANGED
@@ -7,4 +7,6 @@ gemspec
|
|
7
7
|
|
8
8
|
gem 'minitest', '~> 5.0'
|
9
9
|
gem 'rake', '~> 13.0'
|
10
|
-
gem 'rubocop', '~> 0.
|
10
|
+
gem 'rubocop', '~> 0.88.0'
|
11
|
+
gem 'simplecov', '~> 0.17.0', require: false # CodeClimate not compatible with 0.18+ yet - https://github.com/codeclimate/test-reporter/issues/413
|
12
|
+
gem 'simplecov-lcov', '< 0.8'
|
data/SECURITY.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
## Supported Versions
|
6
|
+
|
7
|
+
Since the internal APIs may change dramatically until v1.0, here is a list of the versions that are supported.
|
8
|
+
|
9
|
+
| Version | Supported |
|
10
|
+
| ------- | ------------------ |
|
11
|
+
| 0.3.x | :white_check_mark: |
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
## Reporting a Vulnerability
|
16
|
+
|
17
|
+
Please email security@marcqualie.com to report any security issues.
|
data/diffcrypt.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'Diffable encrypted configuration files that can be safely committed into a git repository'
|
13
13
|
spec.homepage = 'https://github.com/marcqualie/diffcrypt'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
16
16
|
|
17
17
|
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
18
18
|
|
data/lib/diffcrypt/cli.rb
CHANGED
@@ -21,6 +21,12 @@ module Diffcrypt
|
|
21
21
|
puts encryptor.encrypt(contents)
|
22
22
|
end
|
23
23
|
|
24
|
+
desc 'generate-key', 'Generate a 32 bit key'
|
25
|
+
method_option :cipher, default: Encryptor::CIPHER
|
26
|
+
def generate_key
|
27
|
+
say Encryptor.generate_key(options[:cipher])
|
28
|
+
end
|
29
|
+
|
24
30
|
desc 'version', 'Show client version'
|
25
31
|
def version
|
26
32
|
say Diffcrypt::VERSION
|
data/lib/diffcrypt/encryptor.rb
CHANGED
@@ -14,8 +14,8 @@ module Diffcrypt
|
|
14
14
|
class Encryptor
|
15
15
|
CIPHER = 'aes-128-gcm'
|
16
16
|
|
17
|
-
def self.generate_key
|
18
|
-
SecureRandom.hex(ActiveSupport::MessageEncryptor.key_len(
|
17
|
+
def self.generate_key(cipher = CIPHER)
|
18
|
+
SecureRandom.hex(ActiveSupport::MessageEncryptor.key_len(cipher))
|
19
19
|
end
|
20
20
|
|
21
21
|
def initialize(key)
|
@@ -51,7 +51,6 @@ module Diffcrypt
|
|
51
51
|
YAML.dump(
|
52
52
|
'client' => "diffcrypt-#{Diffcrypt::VERSION}",
|
53
53
|
'cipher' => CIPHER,
|
54
|
-
'checksum' => Digest::MD5.hexdigest(Marshal.dump(data)),
|
55
54
|
'data' => data,
|
56
55
|
)
|
57
56
|
end
|
data/lib/diffcrypt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diffcrypt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Qualie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- LICENSE.txt
|
63
63
|
- README.md
|
64
64
|
- Rakefile
|
65
|
+
- SECURITY.md
|
65
66
|
- bin/console
|
66
67
|
- bin/diffcrypt
|
67
68
|
- bin/setup
|
@@ -85,14 +86,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
86
|
requirements:
|
86
87
|
- - ">="
|
87
88
|
- !ruby/object:Gem::Version
|
88
|
-
version: 2.
|
89
|
+
version: 2.5.0
|
89
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
91
|
requirements:
|
91
92
|
- - ">="
|
92
93
|
- !ruby/object:Gem::Version
|
93
94
|
version: '0'
|
94
95
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
96
|
+
rubygems_version: 3.1.2
|
96
97
|
signing_key:
|
97
98
|
specification_version: 4
|
98
99
|
summary: Diffable encrypted configuration files
|