carpentry 1.0.0 → 1.0.1
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/README.md +16 -0
- data/app/controllers/carpentry/prototypes_controller.rb +8 -0
- data/lib/carpentry/version.rb +1 -1
- metadata +3 -3
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
|
+
[](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
|
data/lib/carpentry/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: carpentry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.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-
|
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: -
|
51
|
+
hash: -4311851174712421241
|
52
52
|
segments:
|
53
53
|
- 0
|
54
54
|
version: "0"
|