frank 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/frank.gemspec +5 -5
- data/lib/frank/base.rb +3 -3
- data/lib/frank/rescue.rb +6 -6
- metadata +8 -6
data/Gemfile
CHANGED
data/frank.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{frank}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["blahed", "nwah"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-09}
|
13
13
|
s.default_executable = %q{frank}
|
14
14
|
s.description = %q{Rapidly develop static sites using any supported templating language}
|
15
15
|
s.email = %q{travis.dunn@thisismedium.com}
|
@@ -121,7 +121,7 @@ Gem::Specification.new do |s|
|
|
121
121
|
|
122
122
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
123
123
|
s.add_runtime_dependency(%q<rack>, [">= 1.0"])
|
124
|
-
s.add_runtime_dependency(%q<mongrel>, [">= 1.0"])
|
124
|
+
s.add_runtime_dependency(%q<mongrel>, [">= 1.2.0.pre2"])
|
125
125
|
s.add_runtime_dependency(%q<haml>, [">= 3.0"])
|
126
126
|
s.add_runtime_dependency(%q<tilt>, ["= 0.9"])
|
127
127
|
s.add_runtime_dependency(%q<net-ssh>, [">= 2.0"])
|
@@ -142,7 +142,7 @@ Gem::Specification.new do |s|
|
|
142
142
|
s.add_development_dependency(%q<ruby-debug>, [">= 0"])
|
143
143
|
else
|
144
144
|
s.add_dependency(%q<rack>, [">= 1.0"])
|
145
|
-
s.add_dependency(%q<mongrel>, [">= 1.0"])
|
145
|
+
s.add_dependency(%q<mongrel>, [">= 1.2.0.pre2"])
|
146
146
|
s.add_dependency(%q<haml>, [">= 3.0"])
|
147
147
|
s.add_dependency(%q<tilt>, ["= 0.9"])
|
148
148
|
s.add_dependency(%q<net-ssh>, [">= 2.0"])
|
@@ -164,7 +164,7 @@ Gem::Specification.new do |s|
|
|
164
164
|
end
|
165
165
|
else
|
166
166
|
s.add_dependency(%q<rack>, [">= 1.0"])
|
167
|
-
s.add_dependency(%q<mongrel>, [">= 1.0"])
|
167
|
+
s.add_dependency(%q<mongrel>, [">= 1.2.0.pre2"])
|
168
168
|
s.add_dependency(%q<haml>, [">= 3.0"])
|
169
169
|
s.add_dependency(%q<tilt>, ["= 0.9"])
|
170
170
|
s.add_dependency(%q<net-ssh>, [">= 2.0"])
|
data/lib/frank/base.rb
CHANGED
@@ -6,7 +6,7 @@ require 'frank/middleware/statik'
|
|
6
6
|
require 'frank/middleware/refresh'
|
7
7
|
|
8
8
|
module Frank
|
9
|
-
VERSION = '1.0.
|
9
|
+
VERSION = '1.0.6'
|
10
10
|
extend Frank::Upgrades
|
11
11
|
|
12
12
|
module Render; end
|
@@ -39,9 +39,9 @@ module Frank
|
|
39
39
|
@response['Content-Type'] = Rack::Mime.mime_type(File.extname(@request.path), 'text/html')
|
40
40
|
@response.write render(@request.path)
|
41
41
|
rescue Frank::TemplateError
|
42
|
-
render_404
|
42
|
+
@response.write render_404
|
43
43
|
rescue Exception => e
|
44
|
-
render_500
|
44
|
+
@response.write render_500(e)
|
45
45
|
end
|
46
46
|
|
47
47
|
# prints requests and errors to STDOUT
|
data/lib/frank/rescue.rb
CHANGED
@@ -2,6 +2,7 @@ module Frank
|
|
2
2
|
module Rescue
|
3
3
|
|
4
4
|
def render_404
|
5
|
+
log_request('404')
|
5
6
|
template = File.expand_path(File.dirname(__FILE__)) + '/templates/404.haml'
|
6
7
|
locals = { :request => @env,
|
7
8
|
:dynamic_folder => Frank.dynamic_folder,
|
@@ -10,13 +11,13 @@ module Frank
|
|
10
11
|
|
11
12
|
@response['Content-Type'] = 'text/html'
|
12
13
|
@response.status = 404
|
13
|
-
obj = Object.new.extend(TemplateHelpers)
|
14
|
-
@response.body = Tilt::HamlTemplate.new(template).render(obj, locals = locals)
|
15
14
|
|
16
|
-
|
15
|
+
obj = Object.new.extend(TemplateHelpers)
|
16
|
+
Tilt::HamlTemplate.new(template).render(obj, locals = locals)
|
17
17
|
end
|
18
18
|
|
19
19
|
def render_500(excp)
|
20
|
+
log_request('500', excp)
|
20
21
|
template = File.expand_path(File.dirname(__FILE__)) + '/templates/500.haml'
|
21
22
|
locals = { :request => @env,
|
22
23
|
:params => @request.params,
|
@@ -24,10 +25,9 @@ module Frank
|
|
24
25
|
|
25
26
|
@response['Content-Type'] = 'text/html'
|
26
27
|
@response.status = 500
|
27
|
-
obj = Object.new.extend(TemplateHelpers)
|
28
|
-
@response.body = Tilt::HamlTemplate.new(template).render(obj, locals = locals)
|
29
28
|
|
30
|
-
|
29
|
+
obj = Object.new.extend(TemplateHelpers)
|
30
|
+
Tilt::HamlTemplate.new(template).render(obj, locals = locals)
|
31
31
|
end
|
32
32
|
|
33
33
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frank
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 6
|
10
|
+
version: 1.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- blahed
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-12-
|
19
|
+
date: 2010-12-09 00:00:00 -05:00
|
20
20
|
default_executable: frank
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -40,11 +40,13 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
43
|
+
hash: -1876988191
|
44
44
|
segments:
|
45
45
|
- 1
|
46
|
+
- 2
|
46
47
|
- 0
|
47
|
-
|
48
|
+
- pre2
|
49
|
+
version: 1.2.0.pre2
|
48
50
|
type: :runtime
|
49
51
|
name: mongrel
|
50
52
|
prerelease: false
|