bard_static 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,21 @@ module BardStatic
5
5
 
6
6
  def mockups
7
7
  env["bard_static.prototype"] = true
8
- render "mockups/#{params[:file_path]}", :layout => false
8
+ with_404_handler { render "mockups/#{params[:file_path]}", :layout => false }
9
9
  end
10
10
 
11
11
  def static
12
- render "static/#{params[:file_path]}"
12
+ with_404_handler { render "static/#{params[:file_path]}" }
13
+ end
14
+
15
+ private
16
+
17
+ def with_404_handler
18
+ begin
19
+ yield
20
+ rescue ActionView::MissingTemplate
21
+ head 404
22
+ end
13
23
  end
14
24
  end
15
25
  end
@@ -1,3 +1,3 @@
1
1
  module BardStatic
2
- VERSION = "1.1.1"
2
+ VERSION = "1.2.0"
3
3
  end
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: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 1
9
- - 1
10
- version: 1.1.1
8
+ - 2
9
+ - 0
10
+ version: 1.2.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: 2011-11-21 00:00:00 Z
24
+ date: 2012-02-14 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.11
74
+ rubygems_version: 1.8.15
75
75
  signing_key:
76
76
  specification_version: 3
77
77
  summary: Protoyping engine for Rails.