glog 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/glog/env.rb +24 -0
  2. metadata +3 -2
data/lib/glog/env.rb ADDED
@@ -0,0 +1,24 @@
1
+ module Glog
2
+ class Env
3
+
4
+ def initialize(env)
5
+ @env = env
6
+ end
7
+
8
+ def path
9
+ @env['PATH_INFO']
10
+ end
11
+
12
+ def path?(other)
13
+ path == other
14
+ end
15
+
16
+ def development?
17
+ ENV['RACK_ENV'] == 'development'
18
+ end
19
+
20
+ def production?
21
+ ENV['RACK_ENV'] == 'production'
22
+ end
23
+ end
24
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Antono Vasiljev
@@ -114,6 +114,7 @@ files:
114
114
  - lib/glog/page.rb
115
115
  - lib/glog/server.rb
116
116
  - lib/glog/template.rb
117
+ - lib/glog/env.rb
117
118
  has_rdoc: true
118
119
  homepage: http://github.com/antono/glog
119
120
  licenses: []