kms-env 1.0.2 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kms-env.rb +5 -3
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b85ad2f1d7309debb1000d9b0b11ae76e730321
4
- data.tar.gz: 396305a489181e2c45aed8d00c2f0bed47e1783e
3
+ metadata.gz: 40ae1fe13c7a28174ba7b17d34a244c81ce39a30
4
+ data.tar.gz: 0d4102f287183f7a7ff28a910c322c5cc98c1f66
5
5
  SHA512:
6
- metadata.gz: 107d4f2d5c0961b3c6a54e63db34fee9eb5881d532075cf27a18a99f2e852b170b67ce4420ff4d4fca091a944721ceb8f8be79cdd6261efe5f764eb8578693a9
7
- data.tar.gz: 355aa1601b5ed1d8669e928505d12f09242d6c4d57e1b90e00fbea4919e8401f54543b783a9ea34c229131ac1d8c924c2f4f311fb998d139b317afcf849a690a
6
+ metadata.gz: 2908b13e133f8ec0b7ccb7cb9fe605790852f0a26aa3eec4f86f7527a9a1f157e782ec7b8c241590477f27c3d1395690c50a2732f5ef5962ea0b5c19b86522a5
7
+ data.tar.gz: 0b812170d9bc157de71c7d219c70face17e99811a0d3695a3c47953a044912bc4436dc160cfca0dee9b14fb5f9ba56cf36c784f02b0f74906115275b101ed906
data/lib/kms-env.rb CHANGED
@@ -6,7 +6,11 @@ module KmsEnv
6
6
  module_function
7
7
 
8
8
  def logger
9
- defined?(Rails) ? Rails.logger : Logger.new(STDERR)
9
+ if defined?(Rails) and Rails.logger
10
+ Rails.logger
11
+ else
12
+ Logger.new(STDERR)
13
+ end
10
14
  end
11
15
 
12
16
  ###
@@ -35,8 +39,6 @@ module KmsEnv
35
39
  end
36
40
 
37
41
  def set_decrypted_env_for(key)
38
- # skip values that have already been decrypted
39
- return if ENV[plaintext_key_for(key)]
40
42
  ENV[plaintext_key_for(key)] = kms_decrypt_blob(ciphertext_blob_for(ENV[key])).plaintext
41
43
  end
42
44
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kms-env
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Stokes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-01 00:00:00.000000000 Z
11
+ date: 2015-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '2.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '2.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ extra_rdoc_files: []
74
74
  files:
75
75
  - lib/kms-env.rb
76
76
  - lib/kms-env/railtie.rb
77
- homepage: https://github.com/fullsceen/kms-env
77
+ homepage: https://github.com/Fullsceen/kms-env
78
78
  licenses:
79
79
  - MIT
80
80
  metadata: {}
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.2.2
97
+ rubygems_version: 2.4.8
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Environment decryption with KMS