encrypt_env 0.1.3 → 1.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/encrypt_env.rb +3 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bf044cf99b46d754b86bc3b53077e6140b30c65608e1a256bfcbea2b7a15e59
4
- data.tar.gz: b3b760784a818df508f6911641546da248af6fa4130c54ab8f94fa203c1da023
3
+ metadata.gz: 8e693dd23d4628870c64fd6709d83263b8c47ce1adbb38a894be301b9352d9d9
4
+ data.tar.gz: 2b0d99cd7ebee8c8696be54d3aedb3a9b0932570b180b5096263b4ec7de591ca
5
5
  SHA512:
6
- metadata.gz: 7ecfabe4453fcab0dc27287b2f5e880833167d86609b0748edd48c29d7d0200bfd1167b190382f70041d9f62503ddffe2d4333a88a18fa59b6acc762e79af629
7
- data.tar.gz: c700d23be85c414ba82a19b6c22bedf9ba13334443cc1e5d786c2935882a0ff2233641836961b24a59f79cfc29ce8607cd1a38de487e5561e1934d554dd6c87e
6
+ metadata.gz: e2f5ae62315c67e5263c832c265143b63f4606372b6696bae32d97664aa292015469be681be58f453b2dd6a81210394f83bdc8a4d7850fe4eb871f6cea877de1
7
+ data.tar.gz: 647cce7fadde39fb6365ac920da670173f956ec851b09c98122fe7df24a40a98d0fa9165910dca36af41a128887282230d0653ad03dfeb820f0a04faf8ea17d8
data/lib/encrypt_env.rb CHANGED
@@ -27,7 +27,8 @@ class EncryptEnv
27
27
  iv = cipher.random_iv
28
28
  encrypted = cipher.update(content) + cipher.final
29
29
  tag = cipher.auth_tag
30
- hex_string = (encrypted + iv + tag).unpack1('H*')
30
+ # rubocop: disable all
31
+ hex_string = (encrypted + iv + tag).unpack('H*').first
31
32
  File.open("#{@path_root}/config/secrets.yml.enc", 'w') { |file| file.write(hex_string) }
32
33
  end
33
34
 
@@ -58,7 +59,7 @@ class EncryptEnv
58
59
  @secret_file = File.expand_path("#{@path_root}/config/secrets.yml")
59
60
  key = OpenSSL::Random.random_bytes(16)
60
61
  # save key in master.key file
61
- File.open("#{@path_root}/config/master.key", 'w') { |file| file.write(key.unpack1('H*')) }
62
+ File.open("#{@path_root}/config/master.key", 'w') { |file| file.write(key.unpack('H*').first) }
62
63
  encrypt(File.read(@secret_file))
63
64
  end
64
65
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: encrypt_env
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nhu Tan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-18 00:00:00.000000000 Z
11
+ date: 2022-08-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Encrypts and decrypts environment variables
14
14
  email: nhutan2001@gmail.com
@@ -32,7 +32,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: 2.6.0
35
+ version: 2.3.0
36
36
  required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="