high_voltage 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +3 -3
- data/Appraisals +2 -2
- data/Gemfile.lock +1 -1
- data/MIT-LICENSE +1 -1
- data/NEWS.md +7 -0
- data/README.md +4 -1
- data/gemfiles/{rails-3.0.15.gemfile → rails_3.0.18.gemfile} +1 -1
- data/gemfiles/{rails-3.1.6.gemfile → rails_3.1.9.gemfile} +1 -1
- data/gemfiles/{rails-3.2.6.gemfile → rails_3.2.10.gemfile} +1 -1
- data/lib/high_voltage/constraints/root_route.rb +1 -3
- data/lib/high_voltage/version.rb +1 -1
- metadata +7 -11
data/.travis.yml
CHANGED
data/Appraisals
CHANGED
data/Gemfile.lock
CHANGED
data/MIT-LICENSE
CHANGED
data/NEWS.md
ADDED
data/README.md
CHANGED
@@ -131,6 +131,9 @@ Override the default route:
|
|
131
131
|
# in config/routes.rb
|
132
132
|
match "/pages/*id" => 'pages#show', :as => :page, :format => false
|
133
133
|
|
134
|
+
# if routing the root path, update for your controller
|
135
|
+
root :to => 'pages#show', :id => 'home'
|
136
|
+
|
134
137
|
Then modify it to subclass from High Voltage, adding whatever you need:
|
135
138
|
|
136
139
|
class PagesController < HighVoltage::PagesController
|
@@ -222,5 +225,5 @@ The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
|
222
225
|
License
|
223
226
|
-------
|
224
227
|
|
225
|
-
High Voltage is Copyright © 2009-
|
228
|
+
High Voltage is Copyright © 2009-2013 thoughtbot. It is free software, and may
|
226
229
|
be redistributed under the terms specified in the MIT-LICENSE file.
|
@@ -2,8 +2,6 @@ module HighVoltage
|
|
2
2
|
module Constraints
|
3
3
|
# Routing constraint to validate request.path has a corresponding view
|
4
4
|
class RootRoute
|
5
|
-
VIEW_EXTENSIONS = 'html.erb,html.haml,html'
|
6
|
-
|
7
5
|
def self.matches?(request)
|
8
6
|
pattern = file_pattern(request.path)
|
9
7
|
|
@@ -13,7 +11,7 @@ module HighVoltage
|
|
13
11
|
private
|
14
12
|
|
15
13
|
def self.file_pattern(page_id)
|
16
|
-
"#{content_path}#{page_id}.
|
14
|
+
"#{content_path}#{page_id}.html*"
|
17
15
|
end
|
18
16
|
|
19
17
|
def self.content_path
|
data/lib/high_voltage/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: high_voltage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
|
-
date:
|
20
|
+
date: 2013-02-17 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: appraisal
|
@@ -97,13 +97,14 @@ files:
|
|
97
97
|
- Gemfile
|
98
98
|
- Gemfile.lock
|
99
99
|
- MIT-LICENSE
|
100
|
+
- NEWS.md
|
100
101
|
- README.md
|
101
102
|
- Rakefile
|
102
103
|
- app/controllers/high_voltage/pages_controller.rb
|
103
104
|
- config/routes.rb
|
104
|
-
- gemfiles/
|
105
|
-
- gemfiles/
|
106
|
-
- gemfiles/
|
105
|
+
- gemfiles/rails_3.0.18.gemfile
|
106
|
+
- gemfiles/rails_3.1.9.gemfile
|
107
|
+
- gemfiles/rails_3.2.10.gemfile
|
107
108
|
- high_voltage.gemspec
|
108
109
|
- lib/high_voltage.rb
|
109
110
|
- lib/high_voltage/constraints/root_route.rb
|
@@ -177,18 +178,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
178
|
- - ! '>='
|
178
179
|
- !ruby/object:Gem::Version
|
179
180
|
version: '0'
|
180
|
-
segments:
|
181
|
-
- 0
|
182
|
-
hash: 4008834492193111030
|
183
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
182
|
none: false
|
185
183
|
requirements:
|
186
184
|
- - ! '>='
|
187
185
|
- !ruby/object:Gem::Version
|
188
186
|
version: '0'
|
189
|
-
segments:
|
190
|
-
- 0
|
191
|
-
hash: 4008834492193111030
|
192
187
|
requirements: []
|
193
188
|
rubyforge_project:
|
194
189
|
rubygems_version: 1.8.24
|
@@ -249,3 +244,4 @@ test_files:
|
|
249
244
|
- spec/integration/navigation_spec.rb
|
250
245
|
- spec/routing/routes_spec.rb
|
251
246
|
- spec/spec_helper.rb
|
247
|
+
has_rdoc:
|