Sha256: 268df298e68f99c288e5f29df4cf19fc5b7de7628c598bb18c386f13ceb6d938

Contents?: true

Size: 386 Bytes

Versions: 9

Compression:

Stored size: 386 Bytes

Contents

module Broding
  def env
    @_env ||= (ENV["RACK_ENV"].presence || "development")
  end

  def groups(*groups)
    hash = groups.extract_options!
    env = Jeanine.env
    groups.unshift(:default, env)
    groups.concat ENV["BRODY_GROUPS"].to_s.split(",")
    groups.concat hash.map { |k, v| k if v.map(&:to_s).include?(env) }
    groups.compact!
    groups.uniq!
    groups
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jeanine-0.7.4 lib/jeanine/environment.rb
jeanine-0.7.3.2 lib/jeanine/environment.rb
jeanine-0.7.3.1 lib/jeanine/environment.rb
jeanine-0.7.3 lib/jeanine/environment.rb
jeanine-0.7.2 lib/jeanine/environment.rb
jeanine-0.7.1 lib/jeanine/environment.rb
jeanine-0.7.0 lib/jeanine/environment.rb
jeanine-0.6.0 lib/jeanine/environment.rb
jeanine-0.5.0 lib/jeanine/environment.rb