useless 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,9 @@ require 'low/rack/request_logger'
5
5
  require 'low/rack/subdomain_map'
6
6
  require 'low/scoped_logger'
7
7
 
8
+ require 'useless/fs'
9
+ require 'useless/mongo'
10
+
8
11
  require 'useless/rack/middleware/exceptions'
9
12
  require 'useless/rack/middleware/assets'
10
13
  require 'useless/rack/middleware/mongo'
@@ -17,11 +20,11 @@ module Useless
17
20
  class Rack
18
21
 
19
22
  def self.mongo
20
- @mongo ||= Mongo.for_env
23
+ @mongo ||= Useless::Mongo.for_env
21
24
  end
22
25
 
23
26
  def self.fs
24
- @fs ||= FS.new(mongo)
27
+ @fs ||= Useless::FS.new(mongo)
25
28
  end
26
29
 
27
30
  def initialize(map = nil, &block)
@@ -35,6 +38,8 @@ module Useless
35
38
  end
36
39
 
37
40
  def call(env)
41
+ map = @map
42
+
38
43
  ::Rack::Builder.app do
39
44
  use Middleware::Exceptions
40
45
  use Low::Rack::RequestId
@@ -48,7 +53,7 @@ module Useless
48
53
  use Middleware::Authentication::QueryString
49
54
  use Middleware::Authentication::RequestHeader
50
55
 
51
- run Low::Rack::SubdomainMap.new(Base.new, @map)
56
+ run Low::Rack::SubdomainMap.new(Base.new, map)
52
57
  end.call(env)
53
58
  end
54
59
 
@@ -1,3 +1,3 @@
1
1
  module Useless
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: useless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-20 00:00:00.000000000 Z
12
+ date: 2013-02-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack