carpentry 2.0.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/carpentry.rb +2 -1
- data/lib/carpentry/engine.rb +0 -4
- data/lib/carpentry/rails/routes.rb +10 -0
- data/lib/carpentry/version.rb +1 -1
- data/lib/generators/carpentry/install/install_generator.rb +1 -1
- metadata +4 -4
- data/config/routes.rb +0 -4
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Installation
|
|
9
9
|
|
10
10
|
Add Carpentry to Gemfile:
|
11
11
|
|
12
|
-
gem "carpentry"
|
12
|
+
gem "carpentry", "~> 2.1.1"
|
13
13
|
|
14
14
|
Run the generator to create the prototypes folder (and inject the Carpentry route):
|
15
15
|
|
@@ -39,7 +39,7 @@ to `app/views/layouts/carpentry/prototypes.html.[format]`.
|
|
39
39
|
You can customize the prototype URI prefix (`/p`) by editing the engine mount in your `roures.rb` file, for example:
|
40
40
|
|
41
41
|
```
|
42
|
-
|
42
|
+
mount_carpentry_at "/prototype"
|
43
43
|
```
|
44
44
|
|
45
45
|
Hooks
|
data/lib/carpentry.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# require "carpentry/no_robots_middleware"
|
2
2
|
require "carpentry/engine"
|
3
|
+
require "carpentry/rails/routes"
|
4
|
+
require "carpentry/no_robots_middleware"
|
3
5
|
|
4
6
|
module Carpentry
|
5
7
|
class Engine < ::Rails::Engine
|
6
|
-
# config.app_middleware.use NoRobotsMiddleware
|
7
8
|
end
|
8
9
|
end
|
data/lib/carpentry/engine.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
module ActionDispatch::Routing
|
2
|
+
class Mapper
|
3
|
+
def mount_carpentry_at(mount_location)
|
4
|
+
scope mount_location do
|
5
|
+
root to: "carpentry/prototypes#serve", file_path: "index", as: "carpentry_root"
|
6
|
+
match "/*file_path" => "carpentry/prototypes#serve", via: :get
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/carpentry/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carpentry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-
|
15
|
+
date: 2013-11-04 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: railties
|
@@ -126,11 +126,11 @@ files:
|
|
126
126
|
- app/controllers/carpentry/prototypes_controller.rb
|
127
127
|
- lib/carpentry/engine.rb
|
128
128
|
- lib/carpentry/no_robots_middleware.rb
|
129
|
+
- lib/carpentry/rails/routes.rb
|
129
130
|
- lib/carpentry/version.rb
|
130
131
|
- lib/carpentry.rb
|
131
132
|
- lib/generators/carpentry/install/install_generator.rb
|
132
133
|
- lib/tasks/carpentry_tasks.rake
|
133
|
-
- config/routes.rb
|
134
134
|
- Rakefile
|
135
135
|
- Gemfile
|
136
136
|
- README.md
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
version: '0'
|
156
156
|
segments:
|
157
157
|
- 0
|
158
|
-
hash: -
|
158
|
+
hash: -2787984229922370110
|
159
159
|
requirements: []
|
160
160
|
rubyforge_project:
|
161
161
|
rubygems_version: 1.8.25
|
data/config/routes.rb
DELETED