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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78a4c9e71779849edb302177c95bbf742467fe00
4
- data.tar.gz: 02c4760f2b2c722bbc11e8f9fd3452b0a23cf30f
3
+ metadata.gz: ba91dddbb6d0916c216dd99c746ddbf813978634
4
+ data.tar.gz: 5a7021b7c0280867bdd89d0ab4e3333294d6301a
5
5
  SHA512:
6
- metadata.gz: 4c26f96ad2cc082f203f02f80bd348b1ea15f37fd0581b25b42ed4e33bbc538ccd37b1ed33023308a7279b00c76beb97f82ae9fcc66bfa798c29da9240295f57
7
- data.tar.gz: cba9ae8d16dec5dd944bc6e6b3d39da44a7fa3f1561258eedf112290d436c24f3d598e450f9fba764f7fa68f2f228d277b440edd00d41cee687791496deca32b
6
+ metadata.gz: 381824755ca34bcaf12233deb3b59928e6cdfc8f3f4879669487647ca1822282f93012584eaa6d3a4ed661a1cbe47ef2094907ae68763be785a51edcf4cc2d15
7
+ data.tar.gz: 325a74c4e8a7de535d0281bc603e2ad924d9b5a1d801cafed912d8ebc3883fd317585edc42a2aa1a84d053f9b1eb47c3ec9539543f7e1c8d29c8beeb6aad41de
@@ -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, 'jeanine/app'
42
+ autoload :App, 'jeanine/app'
28
43
  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,5 +1,5 @@
1
1
  require 'jeanine/view'
2
-
2
+ require 'tilt'
3
3
  module Jeanine
4
4
  def self.view_paths
5
5
  @_view_paths ||= Set.new(["views"])
@@ -1,3 +1,3 @@
1
1
  module Jeanine
2
- VERSION = "0.7.5"
2
+ VERSION = "0.8.1"
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.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
@@ -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