high_voltage 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 +17 -4
- data/config/routes.rb +1 -1
- metadata +23 -32
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
High Voltage
|
2
|
-
============
|
1
|
+
# High Voltage [](http://travis-ci.org/thoughtbot/high_voltage)
|
3
2
|
|
4
3
|
Rails engine for static pages.
|
5
4
|
|
@@ -19,8 +18,9 @@ Include in your Gemfile:
|
|
19
18
|
|
20
19
|
gem "high_voltage"
|
21
20
|
|
22
|
-
For Rails versions prior to 3.0, use the
|
23
|
-
|
21
|
+
For Rails versions prior to 3.0, use the 0.9.2 tag of high_voltage:
|
22
|
+
|
23
|
+
https://github.com/thoughtbot/high_voltage/tree/v0.9.2
|
24
24
|
|
25
25
|
Usage
|
26
26
|
-----
|
@@ -57,6 +57,14 @@ In that case, you'd need an app/views/pages/home.html.erb file.
|
|
57
57
|
|
58
58
|
Generally speaking, you need to route to the 'show' action with an :id param of the view filename.
|
59
59
|
|
60
|
+
High Voltage will generate a named route method of `page_path` which you can use, as well. If you
|
61
|
+
want to generate a named route (with the :as routing option) for some route which will be handled
|
62
|
+
by High Voltage, make sure not to use :page as the name, because that will conflict with the named
|
63
|
+
route generated by High Voltage itself. For example, this will work for top-level routes (we will
|
64
|
+
get a named route called `static_path` which does not conflict with the generated `page_path` method):
|
65
|
+
|
66
|
+
match '/:id' => 'high_voltage/pages#show', :as => :static, :via => :get
|
67
|
+
|
60
68
|
You can route the root url to a high voltage page like this:
|
61
69
|
|
62
70
|
root :to => 'high_voltage/pages#show', :id => 'home'
|
@@ -119,6 +127,11 @@ If you're not using a custom PagesController be sure to test <code>HighVoltage::
|
|
119
127
|
|
120
128
|
Enjoy!
|
121
129
|
|
130
|
+
Contributing
|
131
|
+
------------
|
132
|
+
|
133
|
+
Please see CONTRIBUTING.md for details.
|
134
|
+
|
122
135
|
Credits
|
123
136
|
-------
|
124
137
|
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,67 +1,58 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: high_voltage
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
4
5
|
prerelease:
|
5
|
-
version: 1.0.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
- Dan Croak
|
7
|
+
authors:
|
9
8
|
- Matt Jankowski
|
10
|
-
-
|
9
|
+
- Dan Croak
|
11
10
|
- Nick Quaranto
|
12
|
-
- Tristan Dunn
|
13
11
|
- Chad Pytel
|
14
12
|
- Joe Ferris
|
13
|
+
- J. Edward Dewyea
|
14
|
+
- Tammer Saleh
|
15
|
+
- Mike Burns
|
16
|
+
- Tristan Dunn
|
15
17
|
autorequire:
|
16
18
|
bindir: bin
|
17
19
|
cert_chain: []
|
18
|
-
|
19
|
-
date: 2011-06-29 00:00:00 -04:00
|
20
|
-
default_executable:
|
20
|
+
date: 2011-09-04 00:00:00.000000000Z
|
21
21
|
dependencies: []
|
22
|
-
|
23
22
|
description: Fire in the disco. Fire in the ... taco bell.
|
24
23
|
email: support@thoughtbot.com
|
25
24
|
executables: []
|
26
|
-
|
27
25
|
extensions: []
|
28
|
-
|
29
26
|
extra_rdoc_files: []
|
30
|
-
|
31
|
-
files:
|
27
|
+
files:
|
32
28
|
- MIT-LICENSE
|
33
29
|
- README.md
|
34
30
|
- app/controllers/high_voltage/pages_controller.rb
|
35
31
|
- config/routes.rb
|
36
32
|
- lib/high_voltage/engine.rb
|
37
33
|
- lib/high_voltage.rb
|
38
|
-
has_rdoc: true
|
39
34
|
homepage: http://github.com/thoughtbot/high_voltage
|
40
35
|
licenses: []
|
41
|
-
|
42
36
|
post_install_message:
|
43
37
|
rdoc_options: []
|
44
|
-
|
45
|
-
require_paths:
|
38
|
+
require_paths:
|
46
39
|
- lib
|
47
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
41
|
none: false
|
49
|
-
requirements:
|
50
|
-
- -
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version:
|
53
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
47
|
none: false
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version:
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
59
52
|
requirements: []
|
60
|
-
|
61
53
|
rubyforge_project:
|
62
|
-
rubygems_version: 1.
|
54
|
+
rubygems_version: 1.8.10
|
63
55
|
signing_key:
|
64
56
|
specification_version: 3
|
65
57
|
summary: Simple static page rendering controller
|
66
58
|
test_files: []
|
67
|
-
|