module DotenvSekrets
Constants
- VERSION
Public Instance Methods
env_files()
click to toggle source
# File lib/dotenv_sekrets.rb, line 18 def env_files [ root.join(".env.#{Rails.env}.local"), (root.join(".env.local") unless Rails.env.test?), root.join(".env.#{Rails.env}"), root.join(".env") ].compact.map { |f| [f, "#{f}.enc"] }.flatten end
read()
click to toggle source
# File lib/dotenv_sekrets/dotenv/environment.rb, line 3 def read if @filename =~ /\.enc$/ Sekrets.read(@filename) || raise(Errno::ENOENT) else File.open(@filename, "rb:bom|utf-8", &:read) end end
root()
click to toggle source
# File lib/dotenv_sekrets.rb, line 14 def root Dotenv::Railtie.root end