jeanine 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78a4c9e71779849edb302177c95bbf742467fe00
4
- data.tar.gz: 02c4760f2b2c722bbc11e8f9fd3452b0a23cf30f
3
+ metadata.gz: d1c60f940af49afd44e3165d198a21b43c0d4121
4
+ data.tar.gz: f9bcc4c7e7498416d01f62208c3f46ccf51f9bef
5
5
  SHA512:
6
- metadata.gz: 4c26f96ad2cc082f203f02f80bd348b1ea15f37fd0581b25b42ed4e33bbc538ccd37b1ed33023308a7279b00c76beb97f82ae9fcc66bfa798c29da9240295f57
7
- data.tar.gz: cba9ae8d16dec5dd944bc6e6b3d39da44a7fa3f1561258eedf112290d436c24f3d598e450f9fba764f7fa68f2f228d277b440edd00d41cee687791496deca32b
6
+ metadata.gz: d5ad15e4daf7f229b475db2c6d57e16e6487cada74446a2db89e7cbc6c70c7e9c34ede24b8beb7a9a912d2657b6d599bd275140e7a3d1b81144768c62bec40cd
7
+ data.tar.gz: 7a8b8ac8a5a159d872adf5953b533a054e5c2753b10df213c09595e28591c6ef92d10ea32598b995a4c912aed366bdefd81a0de12d501974157fa42295652853
@@ -5,8 +5,24 @@ require 'logger'
5
5
 
6
6
  require "jeanine/version"
7
7
  require 'jeanine/core_ext'
8
+ require 'jeanine/environment'
8
9
 
9
10
  module Jeanine
11
+ def env
12
+ @_env ||= (ENV["RACK_ENV"].presence || "development")
13
+ end
14
+
15
+ def groups(*groups)
16
+ hash = groups.extract_options!
17
+ env = Jeanine.env
18
+ groups.unshift(:default, env)
19
+ groups.concat ENV["JEANINE_GROUPS"].to_s.split(",")
20
+ groups.concat hash.map { |k, v| k if v.map(&:to_s).include?(env) }
21
+ groups.compact!
22
+ groups.uniq!
23
+ groups
24
+ end
25
+
10
26
  def self._installed_plugins
11
27
  @_installed_plugins ||= []
12
28
  end
@@ -24,5 +40,5 @@ module Jeanine
24
40
  end
25
41
 
26
42
  autoload :Router, 'jeanine/router'
27
- autoload :App, 'jeanine/app'
43
+ autoload :App, 'jeanine/app'
28
44
  end
@@ -1,4 +1,3 @@
1
- require 'jeanine/environment'
2
1
  require 'jeanine/mimes'
3
2
  require 'jeanine/request'
4
3
  require 'jeanine/response'
@@ -1,3 +1,3 @@
1
1
  module Jeanine
2
- VERSION = "0.7.5"
2
+ VERSION = "0.7.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jeanine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Brody
@@ -127,7 +127,6 @@ files:
127
127
  - lib/jeanine/core_ext/hash.rb
128
128
  - lib/jeanine/core_ext/nil_class.rb
129
129
  - lib/jeanine/core_ext/string.rb
130
- - lib/jeanine/environment.rb
131
130
  - lib/jeanine/generator/new/Gemfile.tt
132
131
  - lib/jeanine/generator/new/README.md.tt
133
132
  - lib/jeanine/generator/new/app.rb.tt
@@ -1,16 +0,0 @@
1
- module Jeanine
2
- def env
3
- @_env ||= (ENV["RACK_ENV"].presence || "development")
4
- end
5
-
6
- def groups(*groups)
7
- hash = groups.extract_options!
8
- env = Jeanine.env
9
- groups.unshift(:default, env)
10
- groups.concat ENV["BRODY_GROUPS"].to_s.split(",")
11
- groups.concat hash.map { |k, v| k if v.map(&:to_s).include?(env) }
12
- groups.compact!
13
- groups.uniq!
14
- groups
15
- end
16
- end