Sha256: 727656afc09043b0591d26cdf159d33cbc287bbf3b7a476b55962262181e3239
Contents?: true
Size: 717 Bytes
Versions: 1
Compression:
Stored size: 717 Bytes
Contents
require 'dotenv' module Dotenv class Railtie < Rails::Railtie include Rake::DSL if defined?(Rake) rake_tasks do desc 'Load environment settings from .env' task :dotenv do Dotenv.load ".env.#{Rails.env}", '.env' end end class << self def no_warn! @no_warn = true end def no_warn? @no_warn end end initializer 'dotenv', :group => :all do unless self.class.no_warn? warn <<-EOF [DEPRECATION] Autoloading for dotenv has been moved to the `dotenv-rails` gem. Change your Gemfile to: gem 'dotenv-rails', :groups => [:development, :test] EOF end end end end Dotenv.load ".env.#{Rails.env}", '.env'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dotenv-0.6.0 | lib/dotenv/railtie.rb |