high_voltage 3.1.2 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +77 -43
- data/CONTRIBUTING.md +43 -18
- data/README.md +22 -12
- data/lib/high_voltage/engine.rb +0 -7
- data/lib/high_voltage/version.rb +1 -1
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e81ee6ec6cbe06fb36ae869c6e8780214df5376def41a4ff68c1250bc07345ff
|
4
|
+
data.tar.gz: 7d4d461d3ba752648aad580c92d5a125c2332522346ed4c702305a8bd00aca21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cf810f37bb8a72e7358f3f810df1a8e077cc7361d0c20d42f38340c66d61ff2d98962f1088220db33a66531c2bfdd3dc94b12382c92fbd4ca52304fa7158472
|
7
|
+
data.tar.gz: adced58160506f984572f9287306b78e2319bc100b970d480226204c3cc471fc85ebd82e0657c387a4c870f1c8aad4ef7bda9d4a5abb490e5d988537329cae2d
|
data/CHANGELOG.md
CHANGED
@@ -1,95 +1,130 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [4.0.0] - 2024-05-31
|
4
|
+
|
5
|
+
This project is in maintenance-mode. We’re not actively adding new features, but we’ll fix bugs and keep it up to date, and compatible with the latest Ruby and Rails versions.
|
6
|
+
|
7
|
+
Main changes:
|
8
|
+
|
9
|
+
- Remove support for EOL'd Rails version 4.2
|
10
|
+
- Remove support for EOL'd Rails versions 5.x
|
11
|
+
- Remove support for Travis CI and replaced with Github Actions
|
12
|
+
- Add support for Rails 7.1
|
13
|
+
- Add Ruby's minimum version required to >= 3.0
|
14
|
+
|
15
|
+
## New Contributors
|
16
|
+
|
17
|
+
* @denissellu made their first contribution in https://github.com/thoughtbot/high_voltage/pull/302
|
18
|
+
* @keegnotrub made their first contribution in https://github.com/thoughtbot/high_voltage/pull/306
|
19
|
+
* @stefannibrasil made their first contribution in https://github.com/thoughtbot/high_voltage/pull/311
|
20
|
+
* @dependabot made their first contribution in https://github.com/thoughtbot/high_voltage/pull/313
|
21
|
+
|
22
|
+
## [4.0.0.rc1] - 2024-03-25
|
23
|
+
|
24
|
+
This is a release candidate. Please report any [issues](https://github.com/thoughtbot/high_voltage/issues/new) you might encounter when installing this version.
|
25
|
+
|
26
|
+
This project is in maintenance-mode. We’re not actively adding new features, but we’ll fix bugs and keep it up to date, and compatible with the latest Ruby and Rails versions.
|
27
|
+
|
28
|
+
Main changes:
|
29
|
+
|
30
|
+
- Remove support for EOL'd Rails version 4.2
|
31
|
+
- Remove support for EOL'd Rails versions 5.x
|
32
|
+
- Remove support for Travis CI and replaced with Github Actions
|
33
|
+
- Add support for Rails 7.1
|
34
|
+
- Add Ruby's minimum version required to >= 3.0
|
35
|
+
|
3
36
|
## [3.1.2] - 2019-05-20
|
4
37
|
|
5
38
|
### Fixed
|
6
39
|
|
7
|
-
|
40
|
+
- The previous release unintentionally included a `setup` script meant for
|
8
41
|
development only in the packaged gem. This has been removed.
|
9
42
|
|
10
43
|
## [3.1.1] - 2019-05-13
|
11
44
|
|
12
45
|
### Fixed
|
13
46
|
|
14
|
-
|
47
|
+
- Fix UTF-8 encoding error being raised on page requests - [#273]
|
15
48
|
|
16
49
|
## [3.1.0] - 2018-05-04
|
17
50
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
51
|
+
- Fix bugs around finding pages via page_ids's that contain non-ASCII characters
|
52
|
+
- Trailing slash is no longer required for finding pages
|
53
|
+
- Some other improvements around page lookups
|
54
|
+
- Don't require format in extension for looking up page id's HAML and Slim do
|
22
55
|
not require them.
|
23
|
-
|
24
|
-
|
56
|
+
- Test against Rails 5, 5.1, 5.2
|
57
|
+
- Test against Ruby 2.4, 2.5
|
25
58
|
|
26
59
|
## [3.0.0] - 2016-04-15
|
27
60
|
|
28
|
-
|
29
|
-
|
30
|
-
|
61
|
+
- HighVoltage now supports Rails 5.0.0.beta3 and up.
|
62
|
+
- Properly handle extensions in root route constraint requests.
|
63
|
+
- Removes caching in preparation for Rails 5.
|
31
64
|
|
32
65
|
## [2.4.0] - 2015-07-17
|
33
66
|
|
34
|
-
|
35
|
-
|
36
|
-
|
67
|
+
- Retrieve a list of available static pages via `HighVoltage.page_ids`.
|
68
|
+
- Properly handle page ids which are blank when being sanitized.
|
69
|
+
- Only provide deprecation warnings around caching when caching is enabled.
|
37
70
|
|
38
71
|
## [2.3.0] - 2015-04-17
|
39
72
|
|
40
|
-
|
41
|
-
|
42
|
-
|
73
|
+
- Ruby 2.2 and Rails 4.2 testing
|
74
|
+
- Raise InvalidPageIdError when visiting a page with invalid characters
|
75
|
+
- Code of Conduct added to Contributing guide
|
43
76
|
|
44
77
|
## [2.2.1] - 2014-07-23
|
45
78
|
|
46
|
-
|
79
|
+
- Resolve issue with require statements for Rails 3.x projects
|
47
80
|
|
48
81
|
## [2.2.0] - 2014-06-24
|
49
82
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
83
|
+
- Deprecate caching because page and action caching was removed in Rails 4
|
84
|
+
- Refactor test suite to use rspec `expect` syntax consistently.
|
85
|
+
- Added Rails 4.1 to test suite.
|
86
|
+
- Remove Ruby 1.9.2 from test suite.
|
87
|
+
- Remove Capybara from test suite.
|
88
|
+
- Support dependency injection for Rails engine to define routes on
|
56
89
|
|
57
90
|
## [2.1.0] - 2013-12-30
|
58
91
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
92
|
+
- Extract configuration options into a module
|
93
|
+
- Add ability to configure whether layout is cached with action_caching
|
94
|
+
- Add ability to configure a `home_page` for root routing to High Voltage
|
95
|
+
- Update README with new block style config
|
63
96
|
|
64
97
|
## [2.0.0] - 2013-10-05
|
65
98
|
|
66
|
-
|
67
|
-
|
99
|
+
- Extract PagesController into a module
|
100
|
+
- Update README with module usage instructions
|
68
101
|
|
69
102
|
## [1.2.4] - 2013-07-19
|
70
103
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
104
|
+
- Add page and action caching
|
105
|
+
- Remove redundant link style `page_path(id: 'about')` from README
|
106
|
+
- Clean up Appraisals for Travis-CI
|
107
|
+
- Remove Ruby 1.8.7 from test suite
|
75
108
|
|
76
109
|
## [1.2.3] - 2013-07-04
|
77
110
|
|
78
|
-
|
79
|
-
|
80
|
-
|
111
|
+
- Updates for Rails 4 compatibility.
|
112
|
+
- Fix for Rails 4 circular dependency error.
|
113
|
+
- Add ability to load High Voltage outside of rails. Require `attribute_accessors`
|
81
114
|
|
82
115
|
## [1.2.2] - 2013-07-04
|
83
116
|
|
84
|
-
|
85
|
-
|
117
|
+
- Bug fix for RootRoute constraint. Support haml, slim, etc.
|
118
|
+
- README updated for root routes.
|
86
119
|
|
87
120
|
## [1.2.1] - 2013-10-30
|
88
121
|
|
89
|
-
|
90
|
-
|
91
|
-
|
122
|
+
- Ability to disable HighVoltage routes.
|
123
|
+
- New RootRoute constraint.
|
124
|
+
- Updated README, with new TravisCI url.
|
92
125
|
|
126
|
+
[4.0.0]: https://github.com/thoughtbot/high_voltage/compare/v3.1.2...v4.0.0
|
127
|
+
[4.0.0.rc1]: https://github.com/thoughtbot/high_voltage/compare/v3.1.2...4.0.0.rc1
|
93
128
|
[3.1.2]: https://github.com/thoughtbot/high_voltage/compare/v3.1.1...v3.1.2
|
94
129
|
[3.1.1]: https://github.com/thoughtbot/high_voltage/compare/v3.1.0...v3.1.1
|
95
130
|
[3.1.0]: https://github.com/thoughtbot/high_voltage/compare/v3.0.0...v3.1.0
|
@@ -104,5 +139,4 @@
|
|
104
139
|
[1.2.3]: https://github.com/thoughtbot/high_voltage/compare/v1.2.2...v1.2.3
|
105
140
|
[1.2.2]: https://github.com/thoughtbot/high_voltage/compare/v1.2.1...v1.2.2
|
106
141
|
[1.2.1]: https://github.com/thoughtbot/high_voltage/compare/v1.2.0...v1.2.1
|
107
|
-
|
108
142
|
[#273]: https://github.com/thoughtbot/high_voltage/pull/273
|
data/CONTRIBUTING.md
CHANGED
@@ -1,22 +1,47 @@
|
|
1
|
+
# Contributing Guide
|
2
|
+
|
3
|
+
## Code of Conduct
|
4
|
+
|
5
|
+
We welcome pull requests from everyone. By participating in this project, you
|
6
|
+
agree to abide by the thoughtbot [code of conduct].
|
7
|
+
|
8
|
+
Note that this project is in maintenance-mode. We’re not actively adding new features. Bug
|
9
|
+
fixes and other contributions to keep it compatible with the latest Ruby and Rails versions
|
10
|
+
are welcomed.
|
11
|
+
|
12
|
+
We expect everyone to follow the code of conduct anywhere in thoughtbot's
|
13
|
+
project codebases, issue trackers, chat-rooms, and mailing lists.
|
14
|
+
|
15
|
+
[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
|
16
|
+
|
17
|
+
### Running the application locally
|
18
|
+
|
19
|
+
```sh
|
20
|
+
bundle
|
21
|
+
```
|
22
|
+
|
23
|
+
Run the tests:
|
24
|
+
|
25
|
+
```sh
|
26
|
+
bundle exec rake
|
27
|
+
```
|
28
|
+
|
29
|
+
## Opening a PR
|
30
|
+
|
1
31
|
We love pull requests from everyone. By participating in this project, you
|
2
32
|
agree to abide by the thoughtbot [code of conduct].
|
3
33
|
|
4
34
|
[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
|
5
35
|
|
6
36
|
1. Fork the repo.
|
7
|
-
|
8
37
|
2. Run the tests. We only take pull requests with passing tests, and it's great
|
9
|
-
to know that you have a clean slate: `bundle && rake`
|
10
|
-
|
38
|
+
to know that you have a clean slate: `bundle && rake`
|
11
39
|
3. Add a test for your change. Only refactoring and documentation changes
|
12
|
-
require no new tests. If you are adding functionality or fixing a bug, we need
|
13
|
-
a test!
|
14
|
-
|
40
|
+
require no new tests. If you are adding functionality or fixing a bug, we need
|
41
|
+
a test!
|
15
42
|
4. Make the test pass.
|
16
|
-
|
17
43
|
5. Push to your fork and submit a pull request.
|
18
44
|
|
19
|
-
|
20
45
|
At this point you're waiting on us. We like to at least comment on, if not
|
21
46
|
accept, pull requests within three business days (and, typically, one business
|
22
47
|
day). We may suggest some changes or improvements or alternatives.
|
@@ -24,18 +49,18 @@ day). We may suggest some changes or improvements or alternatives.
|
|
24
49
|
Some things that will increase the chance that your pull request is accepted,
|
25
50
|
taken straight from the Ruby on Rails guide:
|
26
51
|
|
27
|
-
|
28
|
-
|
29
|
-
|
52
|
+
- Use Rails idioms and helpers
|
53
|
+
- Include tests that fail without your code, and pass with it
|
54
|
+
- Update the documentation, the surrounding one, examples elsewhere, guides,
|
30
55
|
whatever is affected by your contribution
|
31
56
|
|
32
|
-
Syntax
|
57
|
+
### Syntax
|
33
58
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
59
|
+
- Two spaces, no tabs.
|
60
|
+
- No trailing whitespace. Blank lines should not have any space.
|
61
|
+
- Prefer &&/|| over and/or.
|
62
|
+
- MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
63
|
+
- a = b and not a=b.
|
64
|
+
- Follow the conventions you see used in the source already.
|
40
65
|
|
41
66
|
And in case we didn't emphasize it enough: we love tests!
|
data/README.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
# High Voltage [![Build Status](https://
|
1
|
+
# High Voltage [![Build Status](https://github.com/thoughtbot/high_voltage/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/thoughtbot/high_voltage/actions) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
|
2
|
+
|
3
|
+
> [!NOTE]
|
4
|
+
> `high_voltage` is in maintenance-mode. We’re not actively adding new features,
|
5
|
+
but we’ll fix bugs and keep it up to date, and compatible with the latest Ruby
|
6
|
+
and Rails versions.
|
2
7
|
|
3
8
|
Rails engine for static pages.
|
4
9
|
|
@@ -10,16 +15,16 @@ Yeah, like "About us", "Directions", marketing pages, etc.
|
|
10
15
|
|
11
16
|
## Installation
|
12
17
|
|
13
|
-
There are two ways to install High Voltage.
|
18
|
+
There are two ways to install High Voltage.
|
14
19
|
|
15
|
-
You can run:
|
20
|
+
You can run:
|
16
21
|
|
17
22
|
$ gem install high_voltage
|
18
23
|
|
19
24
|
Or you can include in your Gemfile:
|
20
25
|
|
21
26
|
```ruby
|
22
|
-
gem 'high_voltage', '~>
|
27
|
+
gem 'high_voltage', '~> 4.0.0'
|
23
28
|
```
|
24
29
|
|
25
30
|
## Usage
|
@@ -152,6 +157,7 @@ Then print the contents of `:title` into the layout:
|
|
152
157
|
# app/views/layouts/application.html.erb
|
153
158
|
<title><%= yield(:page_title) %></title>
|
154
159
|
```
|
160
|
+
|
155
161
|
#### Content path
|
156
162
|
|
157
163
|
High Voltage uses a default path and folder of 'pages', i.e. 'url.com/pages/contact',
|
@@ -179,10 +185,10 @@ HighVoltage controller as described [below](#override).
|
|
179
185
|
|
180
186
|
Most common reasons to override?
|
181
187
|
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
188
|
+
- You need authentication around the pages to make sure a user is signed in.
|
189
|
+
- You need to render different layouts for different pages.
|
190
|
+
- You need to render a partial from the `app/views/pages` directory.
|
191
|
+
- You need to use your own Page resource and would like to use StaticPage resource for high voltage
|
186
192
|
|
187
193
|
Create a `PagesController` of your own:
|
188
194
|
|
@@ -214,7 +220,7 @@ Then modify new `PagesController` to include the High Voltage static page concer
|
|
214
220
|
class PagesController < ApplicationController
|
215
221
|
include HighVoltage::StaticPage
|
216
222
|
|
217
|
-
|
223
|
+
before_action :authenticate
|
218
224
|
layout :layout_for_page
|
219
225
|
|
220
226
|
private
|
@@ -369,16 +375,17 @@ Thank you, [contributors]!
|
|
369
375
|
|
370
376
|
## License
|
371
377
|
|
372
|
-
High Voltage is copyright © 2009
|
378
|
+
High Voltage is copyright © 2009 thoughtbot. It is free software, and may
|
373
379
|
be redistributed under the terms specified in the [`LICENSE`] file.
|
374
380
|
|
375
381
|
[`LICENSE`]: /MIT-LICENSE
|
376
382
|
|
383
|
+
<!-- START /templates/footer.md -->
|
377
384
|
## About thoughtbot
|
378
385
|
|
379
|
-
![thoughtbot](
|
386
|
+
![thoughtbot](https://thoughtbot.com/thoughtbot-logo-for-readmes.svg)
|
380
387
|
|
381
|
-
|
388
|
+
This repo is maintained and funded by thoughtbot, inc.
|
382
389
|
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
383
390
|
|
384
391
|
We love open source software!
|
@@ -387,3 +394,6 @@ We are [available for hire][hire].
|
|
387
394
|
|
388
395
|
[community]: https://thoughtbot.com/community?utm_source=github
|
389
396
|
[hire]: https://thoughtbot.com/hire-us?utm_source=github
|
397
|
+
|
398
|
+
|
399
|
+
<!-- END /templates/footer.md -->
|
data/lib/high_voltage/engine.rb
CHANGED
@@ -11,12 +11,5 @@ module HighVoltage
|
|
11
11
|
app.paths.add(concerns_path)
|
12
12
|
end
|
13
13
|
end
|
14
|
-
|
15
|
-
initializer "Require for Rails 3" do |app|
|
16
|
-
if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
17
|
-
require "concerns/high_voltage/static_page"
|
18
|
-
require "high_voltage/pages_controller"
|
19
|
-
end
|
20
|
-
end
|
21
14
|
end
|
22
15
|
end
|
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:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Jankowski
|
@@ -13,10 +13,10 @@ authors:
|
|
13
13
|
- Tammer Saleh
|
14
14
|
- Mike Burns
|
15
15
|
- Tristan Dunn
|
16
|
-
autorequire:
|
16
|
+
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date:
|
19
|
+
date: 2024-05-31 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: activesupport
|
@@ -24,14 +24,14 @@ dependencies:
|
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: '6.0'
|
28
28
|
type: :development
|
29
29
|
prerelease: false
|
30
30
|
version_requirements: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: '6.0'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: appraisal
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,14 +80,14 @@ dependencies:
|
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
83
|
+
version: 5.1.2
|
84
84
|
type: :development
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: 5.1.2
|
91
91
|
description: Fire in the disco. Fire in the ... taco bell.
|
92
92
|
email:
|
93
93
|
- support@thoughtbot.com
|
@@ -116,7 +116,7 @@ homepage: http://github.com/thoughtbot/high_voltage
|
|
116
116
|
licenses:
|
117
117
|
- MIT
|
118
118
|
metadata: {}
|
119
|
-
post_install_message:
|
119
|
+
post_install_message:
|
120
120
|
rdoc_options: []
|
121
121
|
require_paths:
|
122
122
|
- lib
|
@@ -124,16 +124,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
124
|
requirements:
|
125
125
|
- - ">="
|
126
126
|
- !ruby/object:Gem::Version
|
127
|
-
version: '0'
|
127
|
+
version: '3.0'
|
128
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
|
-
|
135
|
-
|
136
|
-
signing_key:
|
134
|
+
rubygems_version: 3.5.6
|
135
|
+
signing_key:
|
137
136
|
specification_version: 4
|
138
137
|
summary: Simple static page rendering controller
|
139
138
|
test_files: []
|