rails-creds 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 869c29c1e36634cdcf8a8ebb845adefec90b04e01ca50f4009dc2b5c994a8d95
4
- data.tar.gz: e7df049073d9d67617ab65eebc893734ca29942848483b0afd28e9aa87ecab84
3
+ metadata.gz: 40124de94d65a2e25a882b374d2219a9ff1dd4dcb76137e0980b2feb019ae6d6
4
+ data.tar.gz: b62b394fb95ccf3c9a137e24ece3b7d66ab5e608b1849ff84520aa274ac41f1b
5
5
  SHA512:
6
- metadata.gz: '01209c664af0dfc8040b7376461a6850f23296ef289ef09fb7a465d06531bde89f46bc33b1380b714e0bb439d43f6c599ed6dc2a6d066499b75fd83d9f77f8dc'
7
- data.tar.gz: a06fe617ba442d248fc1c07217b8fdb0f3cdbf88e3efc378660d498dd13cde67637a36e674a20a8eb1a51a7de778af6b5121c1c55eb31fa3d99f607b6b751cdd
6
+ metadata.gz: e414c59f764671031750424edb6fe3ad2e60c28a178ee6c54402b015ebef12798e02091aad78bc19254c763d9c61440d76bf50716ce365a9efb31fa331320442
7
+ data.tar.gz: 41f7578e0dab44b9f8649cf9d310867098223835c729d9a9e99749c5a53a61b80daa4a24c05cd0dd006e06b25329a4d71cfd2cd34b2389d6245f9e9cb2682442
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.2.1
2
+
3
+ Changed:
4
+
5
+ - Credentials are now memoized after successful read.
6
+
1
7
  # 0.2.0
2
8
 
3
9
  Changed:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails-creds (0.2.0)
4
+ rails-creds (0.2.1)
5
5
  rails (~> 5.2)
6
6
 
7
7
  GEM
data/lib/creds.rb CHANGED
@@ -39,6 +39,8 @@ class Creds
39
39
  end
40
40
 
41
41
  def credentials
42
+ return @credentials if @credentials
43
+
42
44
  unless encrypted_credentials_exist?
43
45
  Rails.logger.warn MissingCredentialsWarning
44
46
  return NullCredentials.new
@@ -46,7 +48,7 @@ class Creds
46
48
 
47
49
  raise MissingMasterKeyError unless master_key_present?
48
50
 
49
- fetch_credentials_for_current_env
51
+ @credentials = fetch_credentials_for_current_env
50
52
  end
51
53
 
52
54
  private
data/lib/creds/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Creds
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-creds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Malmberg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-28 00:00:00.000000000 Z
11
+ date: 2018-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails