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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e921781508e8ff365d5ff49e6ad151176b40234d8ef96e1df9e0ad8df6f35cc8
4
- data.tar.gz: 992ef8b7850df1cf3588270b12d7c325756df1380723b2c786a9bcda92d60886
3
+ metadata.gz: 2009b6cc9a7318e8f6624d6fbde27562799a4ccd44d7aa1263d6c1ff6dbea2a8
4
+ data.tar.gz: 9f3aacfbd55710037b3bbadc56d6513b66775da721e4120b20ab5e95f320837e
5
5
  SHA512:
6
- metadata.gz: ebc1f0b8754cd2ef58143ed234e0bd350bf9206dfe852d977ca671f84fc7100b757ab05e5146992105a535f8b2e99fbfbfc9ebe18d97e760035bede4fdbd35a5
7
- data.tar.gz: 9a0e86a6332e9bfaa31ab0392de4f453fc48c84e6528068fddca637eb8785024e25704cbfee3a5534254fcf042c6ba5407781f04b32fbae2a183d46c6e7be1fb
6
+ metadata.gz: 5412dc78d1e840f0b8d58eb60f13b3e761945c6a76235ad9eb32fd737eaba8df027892c8ad836a56f7e154a60ecb5085608db448021d1c4cd6aad0e8a87ba696
7
+ data.tar.gz: 2c3002f8783d0c92f13f3efc13e8e8a23a3d5d80aaa9ea1c20cf7148e8bad6b3ad1a840389412c138f70a8c494c465fc592beea2774f616ca63b8406370d7797
@@ -7,5 +7,19 @@ jobs:
7
7
  steps:
8
8
  - checkout
9
9
  - run: bundle install
10
- - run: bundle exec rake test
11
- - run: bundle exec rubocop
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
@@ -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:
@@ -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.86'
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'
@@ -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.
@@ -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.3.0')
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
 
@@ -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
@@ -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(CIPHER))
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Diffcrypt
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
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.1
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-08 00:00:00.000000000 Z
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.3.0
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.0.3
96
+ rubygems_version: 3.1.2
96
97
  signing_key:
97
98
  specification_version: 4
98
99
  summary: Diffable encrypted configuration files