bard_static 1.2.0 → 1.3.0

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.
data/Gemfile CHANGED
@@ -1,8 +1,6 @@
1
1
  source :rubygems
2
2
 
3
- gem "rails", "3.0.7"
4
- gem "rake", "~> 0.9.2"
5
- gem "capybara", ">= 0.4.0"
6
-
7
- gem "autotest-standalone"
3
+ gem "rails"
4
+ gem "rake"
5
+ gem "capybara"
8
6
  gem "rspec-rails"
@@ -5,11 +5,11 @@ module BardStatic
5
5
 
6
6
  def mockups
7
7
  env["bard_static.prototype"] = true
8
- with_404_handler { render "mockups/#{params[:file_path]}", :layout => false }
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 { render "static/#{params[:file_path]}" }
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
- head 404
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
@@ -1,3 +1,3 @@
1
1
  module BardStatic
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.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: 31
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 1.2.0
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-02-14 00:00:00 Z
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.15
74
+ rubygems_version: 1.8.24
75
75
  signing_key:
76
76
  specification_version: 3
77
77
  summary: Protoyping engine for Rails.