gearup 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/gearup/server.rb +28 -1
  2. data/lib/gearup/version.rb +1 -1
  3. metadata +175 -158
data/lib/gearup/server.rb CHANGED
@@ -8,7 +8,34 @@ module Gearup
8
8
  end
9
9
 
10
10
  def start
11
- Rack::Handler::WEBrick.run(@env, :Port => @port)
11
+ Rack::Handler::WEBrick.run(app, :Port => @port)
12
+ end
13
+
14
+ private
15
+
16
+ def app
17
+ env = @env
18
+ Rack::Builder.new do
19
+ use Rack::Deflater
20
+ use GzRewrite
21
+
22
+ run env
23
+ end
24
+ end
25
+
26
+ class GzRewrite
27
+ def initialize app
28
+ @app = app
29
+ end
30
+
31
+ def call env
32
+ if env["PATH_INFO"] =~ /\.gz$/
33
+ env["PATH_INFO"] = env["PATH_INFO"].sub(/\.gz$/, "")
34
+ env["REQUEST_PATH"] = env["REQUEST_PATH"].sub(/\.gz$/, "")
35
+ env["REQUEST_URI"] = env["REQUEST_URI"].sub(/\.gz$/, "")
36
+ end
37
+ @app.call(env)
38
+ end
12
39
  end
13
40
  end
14
41
  end
@@ -1,3 +1,3 @@
1
1
  module Gearup
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,177 +1,194 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gearup
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.6
4
5
  prerelease:
5
- version: 0.0.5
6
6
  platform: ruby
7
- authors:
8
- - Andrew Kiellor
7
+ authors:
8
+ - Andrew Kiellor
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-09-20 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: rake
17
- version_requirements: &id001 !ruby/object:Gem::Requirement
18
- none: false
19
- requirements:
20
- - - ~>
21
- - !ruby/object:Gem::Version
22
- version: 0.9.2.2
23
- requirement: *id001
24
- prerelease: false
25
- type: :development
26
- - !ruby/object:Gem::Dependency
27
- name: rack
28
- version_requirements: &id002 !ruby/object:Gem::Requirement
29
- none: false
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: 1.4.1
34
- requirement: *id002
35
- prerelease: false
36
- type: :runtime
37
- - !ruby/object:Gem::Dependency
38
- name: sprockets
39
- version_requirements: &id003 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ~>
43
- - !ruby/object:Gem::Version
44
- version: 2.4.5
45
- requirement: *id003
46
- prerelease: false
47
- type: :runtime
48
- - !ruby/object:Gem::Dependency
49
- name: coffee-script
50
- version_requirements: &id004 !ruby/object:Gem::Requirement
51
- none: false
52
- requirements:
53
- - - ~>
54
- - !ruby/object:Gem::Version
55
- version: 2.2.0
56
- requirement: *id004
57
- prerelease: false
58
- type: :runtime
59
- - !ruby/object:Gem::Dependency
60
- name: haml
61
- version_requirements: &id005 !ruby/object:Gem::Requirement
62
- none: false
63
- requirements:
64
- - - ~>
65
- - !ruby/object:Gem::Version
66
- version: 3.1.7
67
- requirement: *id005
68
- prerelease: false
69
- type: :runtime
70
- - !ruby/object:Gem::Dependency
71
- name: sass
72
- version_requirements: &id006 !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: 3.2.1
78
- requirement: *id006
79
- prerelease: false
80
- type: :runtime
81
- - !ruby/object:Gem::Dependency
82
- name: less
83
- version_requirements: &id007 !ruby/object:Gem::Requirement
84
- none: false
85
- requirements:
86
- - - ~>
87
- - !ruby/object:Gem::Version
88
- version: 2.2.1
89
- requirement: *id007
90
- prerelease: false
91
- type: :runtime
92
- - !ruby/object:Gem::Dependency
93
- name: therubyrhino
94
- version_requirements: &id008 !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
97
- - - ~>
98
- - !ruby/object:Gem::Version
99
- version: 2.0.1
100
- requirement: *id008
101
- prerelease: false
102
- type: :runtime
103
- - !ruby/object:Gem::Dependency
104
- name: jruby-openssl
105
- version_requirements: &id009 !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ~>
109
- - !ruby/object:Gem::Version
110
- version: 0.7.7
111
- requirement: *id009
112
- prerelease: false
113
- type: :development
12
+ date: 2013-08-16 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.9.2.2
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.9.2.2
30
+ - !ruby/object:Gem::Dependency
31
+ name: rack
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 1.4.1
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.4.1
46
+ - !ruby/object:Gem::Dependency
47
+ name: sprockets
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 2.4.5
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 2.4.5
62
+ - !ruby/object:Gem::Dependency
63
+ name: coffee-script
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 2.2.0
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.2.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: haml
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 3.1.7
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 3.1.7
94
+ - !ruby/object:Gem::Dependency
95
+ name: sass
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 3.2.1
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 3.2.1
110
+ - !ruby/object:Gem::Dependency
111
+ name: less
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 2.2.1
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 2.2.1
126
+ - !ruby/object:Gem::Dependency
127
+ name: therubyracer
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: 0.10.2
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: 0.10.2
114
142
  description: Sprockets + Thin to get you going with static content.
115
- email:
116
- - akiellor@thoughtworks.com
117
- executables:
118
- - gearup
119
- - gearup-package
143
+ email:
144
+ - akiellor@thoughtworks.com
145
+ executables:
146
+ - gearup
147
+ - gearup-package
120
148
  extensions: []
121
-
122
149
  extra_rdoc_files: []
123
-
124
- files:
125
- - .gitignore
126
- - Gemfile
127
- - LICENSE
128
- - README.md
129
- - Rakefile
130
- - bin/gearup
131
- - bin/gearup-package
132
- - gearup.gemspec
133
- - lib/gearup.rb
134
- - lib/gearup/context.rb
135
- - lib/gearup/environment.rb
136
- - lib/gearup/server.rb
137
- - lib/gearup/version.rb
138
- - test/application.css.less
139
- - test/application.js.coffee
140
- - test/index.html.haml
141
- homepage: ""
150
+ files:
151
+ - .gitignore
152
+ - Gemfile
153
+ - LICENSE
154
+ - README.md
155
+ - Rakefile
156
+ - bin/gearup
157
+ - bin/gearup-package
158
+ - gearup.gemspec
159
+ - lib/gearup.rb
160
+ - lib/gearup/context.rb
161
+ - lib/gearup/environment.rb
162
+ - lib/gearup/server.rb
163
+ - lib/gearup/version.rb
164
+ - test/application.css.less
165
+ - test/application.js.coffee
166
+ - test/index.html.haml
167
+ homepage: ''
142
168
  licenses: []
143
-
144
169
  post_install_message:
145
170
  rdoc_options: []
146
-
147
- require_paths:
148
- - lib
149
- required_ruby_version: !ruby/object:Gem::Requirement
171
+ require_paths:
172
+ - lib
173
+ required_ruby_version: !ruby/object:Gem::Requirement
150
174
  none: false
151
- requirements:
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- hash: 2
155
- segments:
156
- - 0
157
- version: "0"
158
- required_rubygems_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ! '>='
177
+ - !ruby/object:Gem::Version
178
+ version: '0'
179
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
180
  none: false
160
- requirements:
161
- - - ">="
162
- - !ruby/object:Gem::Version
163
- hash: 2
164
- segments:
165
- - 0
166
- version: "0"
181
+ requirements:
182
+ - - ! '>='
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
167
185
  requirements: []
168
-
169
186
  rubyforge_project:
170
- rubygems_version: 1.8.24
187
+ rubygems_version: 1.8.23
171
188
  signing_key:
172
189
  specification_version: 3
173
190
  summary: Sprockets + Thin to get you going with static content.
174
- test_files:
175
- - test/application.css.less
176
- - test/application.js.coffee
177
- - test/index.html.haml
191
+ test_files:
192
+ - test/application.css.less
193
+ - test/application.js.coffee
194
+ - test/index.html.haml