secret_config 0.3.0 → 0.3.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: 67325636265a59114b4ff33575572d931c337a0796def120ca68ef7ebfbd340e
4
- data.tar.gz: 0b3280f1aab15a4301af120dcf1001757d998fc76b0141eebe66c778e8e6b665
3
+ metadata.gz: 91d5d3ac77971215c58fd3738fab99f0a80df34535b31f46eb1f51e8b33f6a49
4
+ data.tar.gz: 002a92d28752f9d7f6677c90233dd4362e84ff2dba961d42e3f12f3a8c6ad746
5
5
  SHA512:
6
- metadata.gz: f06a83adb1211924f4fca6e73976e8f23bf9bf2784da3bd98a6428327acccfa831b2dd9d1ab735f636e239f8db730210a0fd0d5c8370344145b86a22b47fe66e
7
- data.tar.gz: 674f8ea7d0f0b7340d462f8d90992edd6c93fe14e2979ad6b347992a472ef2fae75e9ea184291281368e45c407e61c661b1b309b4877f168339eb22909836143
6
+ metadata.gz: 81a5075b68b5e13d2c541c03787e91691f4d3f41b63547e0d1240150bd187d50ef4f6ddaebf350cc157c0fa0c6297cf503e3b4c106397568934b8d8dcdf902a4
7
+ data.tar.gz: 7cd829cc7ae114d96f96402956f178a40d9df0a66fecc948902bed60696968ed9da1c5cf4d6c4e35eccc711d4aa6487775e86daf430110df6b833b558275f19e
@@ -1,4 +1,8 @@
1
- require 'aws-sdk-ssm'
1
+ begin
2
+ require 'aws-sdk-ssm'
3
+ rescue LoadError => exc
4
+ raise(LoadError, "Install gem 'aws-sdk-ssm' to use AWS Parameter Store: #{exc.message}")
5
+ end
2
6
 
3
7
  module SecretConfig
4
8
  module Providers
@@ -1,3 +1,3 @@
1
1
  module SecretConfig
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
data/lib/secret_config.rb CHANGED
@@ -35,6 +35,7 @@ module SecretConfig
35
35
  def self.root
36
36
  @root ||= begin
37
37
  root = ENV["SECRET_CONFIG_ROOT"] || ENV["RAILS_ENV"]
38
+ root = Rails.env if root.nil? && defined?(Rails) && Rails.respond_to?(:env)
38
39
  raise(UndefinedRootError, "Either set env var 'SECRET_CONFIG_ROOT' or call SecretConfig.use") unless root
39
40
  root = "/#{root}" unless root.start_with?('/')
40
41
  root
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secret_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reid Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-16 00:00:00.000000000 Z
11
+ date: 2019-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: aws-sdk-ssm
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  description:
42
28
  email:
43
29
  - reidmo@gmail.com