Permalink
Browse files

Remove restrictions on environments

This commit removes the restriction on environment names, allowing
the use of custom environments names
  • Loading branch information...
1 parent 3be0818 commit 94fc17b938da93a3cf2114fa4873ff6fd4b8269f @seenmyfate committed Apr 26, 2012
Showing with 2 additions and 9 deletions.
  1. +2 −9 lib/goliath/goliath.rb
@@ -8,8 +8,6 @@
module Goliath
module_function
- ENVIRONMENTS = [:development, :production, :test, :staging]
-
# Retrieves the current goliath environment
#
# @return [String] the current environment
@@ -19,19 +17,14 @@ def env
# Sets the current goliath environment
#
- # @param [String|Symbol] env the environment symbol of [dev | development | prod | production | test]
+ # @param [String|Symbol] the environment symbol
def env=(e)
es = case(e.to_sym)
when :dev then :development
when :prod then :production
else e.to_sym
end
-
- if ENVIRONMENTS.include?(es)
- @env = es
- else
- fail "did not recognize environment: #{e}, expected one of: #{ENVIRONMENTS.join(', ')}"
- end
+ @env = es
end
# Determines if we are in the production environment

0 comments on commit 94fc17b

Please sign in to comment.