Sha256: 9582e478bca3d4dbb26ca81a6dbbc2ffa62f3af3ee80ff1f21dfba136eb2c1c1

Contents?: true

Size: 391 Bytes

Versions: 1

Compression:

Stored size: 391 Bytes

Contents

module Middleman
  module Dotenv
    class << self
      def registered(app, options_hash={})
        env = options_hash[:env] || '.env'
        require 'dotenv' unless defined?(::Dotenv)
        ::Dotenv.load File.join(Dir.pwd, env)
        app.before do
          ::Dotenv.load File.join(self.class.inst.root, env)
        end
      end
      alias :included :registered
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
middleman-dotenv-0.0.2 lib/middleman-dotenv/extension.rb