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 +4 -4
- data/lib/jeanine.rb +17 -1
- data/lib/jeanine/app.rb +0 -1
- data/lib/jeanine/version.rb +1 -1
- metadata +1 -2
- data/lib/jeanine/environment.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1c60f940af49afd44e3165d198a21b43c0d4121
|
4
|
+
data.tar.gz: f9bcc4c7e7498416d01f62208c3f46ccf51f9bef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5ad15e4daf7f229b475db2c6d57e16e6487cada74446a2db89e7cbc6c70c7e9c34ede24b8beb7a9a912d2657b6d599bd275140e7a3d1b81144768c62bec40cd
|
7
|
+
data.tar.gz: 7a8b8ac8a5a159d872adf5953b533a054e5c2753b10df213c09595e28591c6ef92d10ea32598b995a4c912aed366bdefd81a0de12d501974157fa42295652853
|
data/lib/jeanine.rb
CHANGED
@@ -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,
|
43
|
+
autoload :App, 'jeanine/app'
|
28
44
|
end
|
data/lib/jeanine/app.rb
CHANGED
data/lib/jeanine/version.rb
CHANGED
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.
|
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
|
data/lib/jeanine/environment.rb
DELETED
@@ -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
|