carpentry 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -41,6 +41,15 @@ Examples:
41
41
  All available Rails helpers work nicely. Pure prototyping bliss!
42
42
 
43
43
 
44
+ Hooks
45
+ -----
46
+
47
+ Carpentry let's you add a `#before_carpentry` method in
48
+ `ApplicationController`, that will be run before any prototype. You can
49
+ use it, for example, to provide authentication or prevent prototypes
50
+ from being rendered in production.
51
+
52
+
44
53
  Gotchas
45
54
  -------
46
55
 
@@ -53,3 +62,10 @@ License
53
62
  -------
54
63
 
55
64
  MIT License. Copyright 2011 Kisko Labs.
65
+
66
+
67
+ CI Build Status
68
+ ---------------
69
+
70
+ [![Build Status](http://travis-ci.org/kiskolabs/carpentry.png)](http://travis-ci.org/kiskolabs/carpentry)
71
+
@@ -6,6 +6,14 @@ module Carpentry
6
6
  def serve
7
7
  env["carpentry.prototype"] = true
8
8
  render "carpentry/prototypes/#{params[:file_path]}"
9
+ rescue ActionView::MissingTemplate
10
+ if Rails.application.config.consider_all_requests_local
11
+ raise
12
+ else
13
+ render :file => "#{Rails.root}/public/404.html",
14
+ :status => 404,
15
+ :layout => false
16
+ end
9
17
  end
10
18
  end
11
19
  end
@@ -1,3 +1,3 @@
1
1
  module Carpentry
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: carpentry
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Joao Carlos
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2011-06-07 00:00:00 Z
16
+ date: 2011-07-04 00:00:00 Z
17
17
  dependencies: []
18
18
 
19
19
  description: Handcrafted prototypes for Rails.
@@ -48,7 +48,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
48
  requirements:
49
49
  - - ">="
50
50
  - !ruby/object:Gem::Version
51
- hash: -3962878218693987690
51
+ hash: -4311851174712421241
52
52
  segments:
53
53
  - 0
54
54
  version: "0"