From fa2aa4913ded303e4c3c83fe872fe1555f778324 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 20 Jan 2013 23:43:22 -0500 Subject: [PATCH] Added Octopress.env --- lib/octopress.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/octopress.rb b/lib/octopress.rb index 99e607d..903825a 100644 --- a/lib/octopress.rb +++ b/lib/octopress.rb @@ -1,7 +1,12 @@ $:.unshift File.dirname(__FILE__) # For use/testing when no gem is installed -module Octopress -end - require "octopress/core_ext" require "octopress/configuration" + +module Octopress + + # Static: Fetches the Octopress environment + def self.env + ENV["OCTOPRESS_ENV"] || Configuration.read_config("defaults/jekyll.yml")[:env] + end +end