dotenv-s3 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 0c807b85d91c79ab63250581f150766edde3f158
4
- data.tar.gz: 7e2ac53d4d4d574804854d37e0372571251139f7
3
+ metadata.gz: 3cf57348b954d5967639595e2e818ce24d44119f
4
+ data.tar.gz: 22e4b07562d4fbae88c3470a645070abb53d3b8a
5
5
  SHA512:
6
- metadata.gz: 87eb2ecc76020714369828085b1c58a4bc101d1d00868b89c4e6df42b4906f919e0b2e68303036ce314ae4f3b645f23035e6f43b907cf11c562774ea80e2d87a
7
- data.tar.gz: cc1ad271e886e743ca3ab2dea0d30d129bba825e9ac7070f1384979e8e30fa46289defc920f555ca85c83009529185dc42c416abc960f8874812aa60f8f884e5
6
+ metadata.gz: 1110e99c7cb76ee9d1303ba4bbab73fbb17873322ed7e0f6820b7062cb0d7e5d7c81757eb8dcfd38550734c9216e8bc51f1bd060d3fb1b3d0450046e85d4d8e6
7
+ data.tar.gz: 496c97ed8ac016a77a96d4942c67fdf8c9ff47d931391d5180ce94c0540436c3d61da9117f12395a778bb969941dd5d038ac44a73949595453df8c3c75b8b3c3
@@ -1,17 +1,19 @@
1
- module Dotenv
2
- module S3
3
- class Railtie < Rails::Railtie
4
- config.before_configuration { load_from_tempfile }
1
+ if defined?(Rails)
2
+ module Dotenv
3
+ module S3
4
+ class Railtie < Rails::Railtie
5
+ config.before_configuration { load_from_tempfile }
5
6
 
6
- def self.load_from_tempfile
7
- if ENV["ENABLE_S3_ENVFILE"]
8
- Dotenv::S3.load(
9
- bucket: ENV["ENVFILE_BUCKET_NAME"],
10
- filename: ENV["ENVFILE_FILE_NAME"],
11
- base64_encoded: ENV["ENVFILE_BASE64ENCODE"].present?,
12
- kms_key_id: ENV["ENVFILE_KMS_KEY_ID"]
13
- ) do |tempfile|
14
- Dotenv.load(tempfile.path)
7
+ def self.load_from_tempfile
8
+ if ENV["ENABLE_S3_ENVFILE"]
9
+ Dotenv::S3.load(
10
+ bucket: ENV["ENVFILE_BUCKET_NAME"],
11
+ filename: ENV["ENVFILE_FILE_NAME"],
12
+ base64_encoded: ENV["ENVFILE_BASE64ENCODE"].present?,
13
+ kms_key_id: ENV["ENVFILE_KMS_KEY_ID"]
14
+ ) do |tempfile|
15
+ Dotenv.load(tempfile.path)
16
+ end
15
17
  end
16
18
  end
17
19
  end
@@ -1,5 +1,5 @@
1
1
  module Dotenv
2
2
  module S3
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenv-s3
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
  - Masashi AKISUE