bard_static 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -5
- data/app/controllers/bard_static/static_controller.rb +11 -3
- data/lib/bard_static/version.rb +1 -1
- metadata +5 -5
data/Gemfile
CHANGED
@@ -5,11 +5,11 @@ module BardStatic
|
|
5
5
|
|
6
6
|
def mockups
|
7
7
|
env["bard_static.prototype"] = true
|
8
|
-
with_404_handler {
|
8
|
+
with_404_handler { render_with_index "mockups/#{params[:file_path]}", :layout => false }
|
9
9
|
end
|
10
10
|
|
11
11
|
def static
|
12
|
-
with_404_handler {
|
12
|
+
with_404_handler { render_with_index "static/#{params[:file_path]}" }
|
13
13
|
end
|
14
14
|
|
15
15
|
private
|
@@ -18,7 +18,15 @@ module BardStatic
|
|
18
18
|
begin
|
19
19
|
yield
|
20
20
|
rescue ActionView::MissingTemplate
|
21
|
-
|
21
|
+
render :text => "Not Found", :status => 404
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def render_with_index path, options = {}
|
26
|
+
begin
|
27
|
+
render path, options.dup # render is destructive to the options hash!
|
28
|
+
rescue ActionView::MissingTemplate
|
29
|
+
render "#{path}/index", options
|
22
30
|
end
|
23
31
|
end
|
24
32
|
end
|
data/lib/bard_static/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bard_static
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 3
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Micah Geisel
|
@@ -21,7 +21,7 @@ autorequire:
|
|
21
21
|
bindir: bin
|
22
22
|
cert_chain: []
|
23
23
|
|
24
|
-
date: 2012-
|
24
|
+
date: 2012-08-28 00:00:00 Z
|
25
25
|
dependencies: []
|
26
26
|
|
27
27
|
description: Handcrafted prototypes for Rails.
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
requirements: []
|
72
72
|
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 1.8.
|
74
|
+
rubygems_version: 1.8.24
|
75
75
|
signing_key:
|
76
76
|
specification_version: 3
|
77
77
|
summary: Protoyping engine for Rails.
|