jeanine 0.7.5 → 0.8.1
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 +16 -1
- data/lib/jeanine/app.rb +0 -1
- data/lib/jeanine/rendering.rb +1 -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: ba91dddbb6d0916c216dd99c746ddbf813978634
|
4
|
+
data.tar.gz: 5a7021b7c0280867bdd89d0ab4e3333294d6301a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 381824755ca34bcaf12233deb3b59928e6cdfc8f3f4879669487647ca1822282f93012584eaa6d3a4ed661a1cbe47ef2094907ae68763be785a51edcf4cc2d15
|
7
|
+
data.tar.gz: 325a74c4e8a7de535d0281bc603e2ad924d9b5a1d801cafed912d8ebc3883fd317585edc42a2aa1a84d053f9b1eb47c3ec9539543f7e1c8d29c8beeb6aad41de
|
data/lib/jeanine.rb
CHANGED
@@ -7,6 +7,21 @@ require "jeanine/version"
|
|
7
7
|
require 'jeanine/core_ext'
|
8
8
|
|
9
9
|
module Jeanine
|
10
|
+
def self.env
|
11
|
+
@_env ||= (ENV["RACK_ENV"].presence || "development")
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.groups(*groups)
|
15
|
+
hash = groups.extract_options!
|
16
|
+
env = Jeanine.env
|
17
|
+
groups.unshift(:default, env)
|
18
|
+
groups.concat ENV["JEANINE_GROUPS"].to_s.split(",")
|
19
|
+
groups.concat hash.map { |k, v| k if v.map(&:to_s).include?(env) }
|
20
|
+
groups.compact!
|
21
|
+
groups.uniq!
|
22
|
+
groups
|
23
|
+
end
|
24
|
+
|
10
25
|
def self._installed_plugins
|
11
26
|
@_installed_plugins ||= []
|
12
27
|
end
|
@@ -24,5 +39,5 @@ module Jeanine
|
|
24
39
|
end
|
25
40
|
|
26
41
|
autoload :Router, 'jeanine/router'
|
27
|
-
autoload :App,
|
42
|
+
autoload :App, 'jeanine/app'
|
28
43
|
end
|
data/lib/jeanine/app.rb
CHANGED
data/lib/jeanine/rendering.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.
|
4
|
+
version: 0.8.1
|
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
|