paul_revere 2.1.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +15 -4
- data/Appraisals +18 -3
- data/CHANGELOG.md +109 -0
- data/Gemfile.lock +134 -105
- data/README.md +5 -1
- data/gemfiles/rails_5.0.gemfile +2 -1
- data/gemfiles/rails_5.1.gemfile +2 -1
- data/gemfiles/rails_5.2.gemfile +8 -0
- data/gemfiles/rails_6.0.gemfile +8 -0
- data/gemfiles/rails_6.1.gemfile +8 -0
- data/gemfiles/rails_7.0.gemfile +8 -0
- data/lib/generators/paul_revere/views_generator.rb +18 -0
- data/lib/paul_revere/version.rb +1 -1
- data/paul_revere.gemspec +5 -4
- data/spec/dummy/application.rb +23 -0
- data/spec/factories.rb +2 -2
- data/spec/rails_helper.rb +14 -6
- metadata +22 -17
- data/NEWS.md +0 -41
- data/spec/fake_app.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f797e457ea9108477dc6043bf26cbc8ab9aa25a28ea42a2c219700939953c593
|
4
|
+
data.tar.gz: 40745f4755d12acacffd7eb7faaa06f77cf145944a3581d682c63a014bd3cdff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 036aecdd57cd928c2667b771e38e8bb894a3ebf286051d9c96b4d3c92418f09010a293f767d93886fe3f5add0620a1f29bd206c1e5d7c26b89201a8bd7bb6f90
|
7
|
+
data.tar.gz: aa435e75883a8a0b0d0b546e4155ec48f36f29425b4a67e883bb8df62bde4bdc70a28e599ebea19f75c5e036f11c6da138263c6aceebd83ec6a936aa21512dee
|
data/.travis.yml
CHANGED
@@ -1,13 +1,24 @@
|
|
1
1
|
language: ruby
|
2
|
+
|
2
3
|
rvm:
|
3
|
-
- 2.
|
4
|
-
- 2.
|
5
|
-
- 2.
|
4
|
+
- 2.4.9
|
5
|
+
- 2.5.7
|
6
|
+
- 2.6.5
|
7
|
+
- 2.7.0
|
8
|
+
|
6
9
|
gemfile:
|
10
|
+
- gemfiles/rails_6.0.gemfile
|
11
|
+
- gemfiles/rails_5.2.gemfile
|
7
12
|
- gemfiles/rails_5.1.gemfile
|
8
13
|
- gemfiles/rails_5.0.gemfile
|
14
|
+
|
9
15
|
install:
|
10
16
|
- 'travis_retry bundle install'
|
17
|
+
|
11
18
|
notifications:
|
12
19
|
email: false
|
13
|
-
|
20
|
+
|
21
|
+
matrix:
|
22
|
+
allow_failures:
|
23
|
+
- gemfile: gemfiles/rails_6.0.gemfile
|
24
|
+
rvm: 2.4.9
|
data/Appraisals
CHANGED
@@ -1,5 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
rails_versions = %w(
|
2
|
+
5.0
|
3
|
+
5.1
|
4
|
+
5.2
|
5
|
+
6.0
|
6
|
+
6.1
|
7
|
+
7.0
|
8
|
+
)
|
9
|
+
|
10
|
+
rails_versions.each do |version|
|
11
|
+
appraise "rails_#{version}" do
|
12
|
+
gem "rails", "~> #{version}.0"
|
13
|
+
|
14
|
+
if Gem::Version.new(version) >= Gem::Version.new("6.0")
|
15
|
+
gem "sqlite3", "~> 1.4.0"
|
16
|
+
else
|
17
|
+
gem "sqlite3", "~> 1.3.13"
|
18
|
+
end
|
4
19
|
end
|
5
20
|
end
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [3.3.0]
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- Add support for Rails version 7.0
|
8
|
+
|
9
|
+
## [3.2.0]
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- Add support for Rails version 6.1.0
|
14
|
+
|
15
|
+
## [3.1.0]
|
16
|
+
|
17
|
+
### Added
|
18
|
+
|
19
|
+
- Add support for Rails version 6.0.0
|
20
|
+
|
21
|
+
## [3.0.0]
|
22
|
+
|
23
|
+
### Added
|
24
|
+
|
25
|
+
- Add support for Rails version 5.2.x
|
26
|
+
|
27
|
+
### Removed
|
28
|
+
|
29
|
+
- Drop explicit support for ruby versions under 2.3.x
|
30
|
+
- Drop support for Rails versions under 5.0.x
|
31
|
+
|
32
|
+
## [2.1.0]
|
33
|
+
|
34
|
+
### Added
|
35
|
+
|
36
|
+
- Relax version requirements to support Rails version 5.0.x
|
37
|
+
|
38
|
+
### Removed
|
39
|
+
|
40
|
+
- Drop explicit support for ruby versions under 2.1.0
|
41
|
+
- Drop support for Rails versions prior to 4.1.0
|
42
|
+
|
43
|
+
## [2.0.0]
|
44
|
+
|
45
|
+
### Added
|
46
|
+
|
47
|
+
- Install the javascripts into vendor/assets
|
48
|
+
|
49
|
+
### Changed
|
50
|
+
|
51
|
+
- Remove deprecated should macros
|
52
|
+
- Switch to using `change` in generated Rails migrations
|
53
|
+
- Clean up the README and installation instructions
|
54
|
+
- Rename helper methods and view partials
|
55
|
+
|
56
|
+
## [1.4]
|
57
|
+
|
58
|
+
### Removed
|
59
|
+
|
60
|
+
- Drop support for ruby 1.9.3
|
61
|
+
- Remove deprecated Rails method `link_to_function`
|
62
|
+
|
63
|
+
### Changed
|
64
|
+
|
65
|
+
- Reference the MIT license from the gemspec
|
66
|
+
- Update migration to avoid Rails deprecation warning about timestamps `null :false`
|
67
|
+
- Use ISO 8601 format when creating the Announcement cookie name
|
68
|
+
|
69
|
+
## [1.3]
|
70
|
+
|
71
|
+
### Fixed
|
72
|
+
|
73
|
+
- Fix for ActiveRecord migration/generator error on Rails 4+.
|
74
|
+
|
75
|
+
## [1.2]
|
76
|
+
|
77
|
+
### Added
|
78
|
+
|
79
|
+
- Rails 4 support.
|
80
|
+
|
81
|
+
## [1.1]
|
82
|
+
|
83
|
+
### Added
|
84
|
+
|
85
|
+
- Support for the Rails asset pipeline.
|
86
|
+
- More clear installation instructions for both newer and older Rails.
|
87
|
+
- The Announcement body is attr_accessible.
|
88
|
+
|
89
|
+
## [1.0]
|
90
|
+
|
91
|
+
### Added
|
92
|
+
|
93
|
+
- Support for Rails 3.2.3, 3.1.4, and 3.0.12.
|
94
|
+
- The announcement hiding cookie expires after a year.
|
95
|
+
|
96
|
+
### Fixed
|
97
|
+
|
98
|
+
- Fix the JavaScript that hides the announcements to work out of the box.
|
99
|
+
|
100
|
+
[3.2.0]: https://github.com/thoughtbot/paul_revere/compare/v3.1.0...v3.2.0
|
101
|
+
[3.1.0]: https://github.com/thoughtbot/paul_revere/compare/v3.0.0...v3.1.0
|
102
|
+
[3.0.0]: https://github.com/thoughtbot/paul_revere/compare/v2.1.0...v3.0.0
|
103
|
+
[2.1.0]: https://github.com/thoughtbot/paul_revere/compare/v2.0.0...v2.1.0
|
104
|
+
[2.0.0]: https://github.com/thoughtbot/paul_revere/compare/v1.4...v2.0.0
|
105
|
+
[1.4]: https://github.com/thoughtbot/paul_revere/compare/v1.3...v1.4
|
106
|
+
[1.3]: https://github.com/thoughtbot/paul_revere/compare/v1.2...v1.3
|
107
|
+
[1.2]: https://github.com/thoughtbot/paul_revere/compare/v1.1...v1.2
|
108
|
+
[1.1]: https://github.com/thoughtbot/paul_revere/compare/v1.0...v1.1
|
109
|
+
[1.0]: https://github.com/thoughtbot/paul_revere/compare/v0.2.1...v1.0
|
data/Gemfile.lock
CHANGED
@@ -1,160 +1,189 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
paul_revere (2.
|
5
|
-
rails (>= 5.0, <
|
4
|
+
paul_revere (3.2.0)
|
5
|
+
rails (>= 5.0, < 7.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (
|
11
|
-
actionpack (=
|
10
|
+
actioncable (6.0.3.2)
|
11
|
+
actionpack (= 6.0.3.2)
|
12
12
|
nio4r (~> 2.0)
|
13
|
-
websocket-driver (
|
14
|
-
|
15
|
-
actionpack (=
|
16
|
-
|
17
|
-
|
13
|
+
websocket-driver (>= 0.6.1)
|
14
|
+
actionmailbox (6.0.3.2)
|
15
|
+
actionpack (= 6.0.3.2)
|
16
|
+
activejob (= 6.0.3.2)
|
17
|
+
activerecord (= 6.0.3.2)
|
18
|
+
activestorage (= 6.0.3.2)
|
19
|
+
activesupport (= 6.0.3.2)
|
20
|
+
mail (>= 2.7.1)
|
21
|
+
actionmailer (6.0.3.2)
|
22
|
+
actionpack (= 6.0.3.2)
|
23
|
+
actionview (= 6.0.3.2)
|
24
|
+
activejob (= 6.0.3.2)
|
18
25
|
mail (~> 2.5, >= 2.5.4)
|
19
26
|
rails-dom-testing (~> 2.0)
|
20
|
-
actionpack (
|
21
|
-
actionview (=
|
22
|
-
activesupport (=
|
23
|
-
rack (~> 2.0)
|
24
|
-
rack-test (
|
27
|
+
actionpack (6.0.3.2)
|
28
|
+
actionview (= 6.0.3.2)
|
29
|
+
activesupport (= 6.0.3.2)
|
30
|
+
rack (~> 2.0, >= 2.0.8)
|
31
|
+
rack-test (>= 0.6.3)
|
25
32
|
rails-dom-testing (~> 2.0)
|
26
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
27
|
-
|
28
|
-
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
34
|
+
actiontext (6.0.3.2)
|
35
|
+
actionpack (= 6.0.3.2)
|
36
|
+
activerecord (= 6.0.3.2)
|
37
|
+
activestorage (= 6.0.3.2)
|
38
|
+
activesupport (= 6.0.3.2)
|
39
|
+
nokogiri (>= 1.8.5)
|
40
|
+
actionview (6.0.3.2)
|
41
|
+
activesupport (= 6.0.3.2)
|
29
42
|
builder (~> 3.1)
|
30
43
|
erubi (~> 1.4)
|
31
44
|
rails-dom-testing (~> 2.0)
|
32
|
-
rails-html-sanitizer (~> 1.
|
33
|
-
activejob (
|
34
|
-
activesupport (=
|
45
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
46
|
+
activejob (6.0.3.2)
|
47
|
+
activesupport (= 6.0.3.2)
|
35
48
|
globalid (>= 0.3.6)
|
36
|
-
activemodel (
|
37
|
-
activesupport (=
|
38
|
-
activerecord (
|
39
|
-
activemodel (=
|
40
|
-
activesupport (=
|
41
|
-
|
42
|
-
|
49
|
+
activemodel (6.0.3.2)
|
50
|
+
activesupport (= 6.0.3.2)
|
51
|
+
activerecord (6.0.3.2)
|
52
|
+
activemodel (= 6.0.3.2)
|
53
|
+
activesupport (= 6.0.3.2)
|
54
|
+
activestorage (6.0.3.2)
|
55
|
+
actionpack (= 6.0.3.2)
|
56
|
+
activejob (= 6.0.3.2)
|
57
|
+
activerecord (= 6.0.3.2)
|
58
|
+
marcel (~> 0.3.1)
|
59
|
+
activesupport (6.0.3.2)
|
43
60
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
44
|
-
i18n (
|
61
|
+
i18n (>= 0.7, < 2)
|
45
62
|
minitest (~> 5.1)
|
46
63
|
tzinfo (~> 1.1)
|
47
|
-
|
64
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
65
|
+
appraisal (2.3.0)
|
48
66
|
bundler
|
49
67
|
rake
|
50
68
|
thor (>= 0.14.0)
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
diff-lcs (1.
|
55
|
-
erubi (1.
|
56
|
-
|
69
|
+
builder (3.2.4)
|
70
|
+
concurrent-ruby (1.1.7)
|
71
|
+
crass (1.0.6)
|
72
|
+
diff-lcs (1.4.4)
|
73
|
+
erubi (1.9.0)
|
74
|
+
factory_bot (4.11.1)
|
57
75
|
activesupport (>= 3.0.0)
|
58
|
-
|
59
|
-
|
76
|
+
factory_bot_rails (4.11.1)
|
77
|
+
factory_bot (~> 4.11.1)
|
60
78
|
railties (>= 3.0.0)
|
61
|
-
generator_spec (0.9.
|
79
|
+
generator_spec (0.9.4)
|
62
80
|
activesupport (>= 3.0.0)
|
63
81
|
railties (>= 3.0.0)
|
64
|
-
globalid (0.
|
65
|
-
activesupport (>=
|
66
|
-
i18n (
|
67
|
-
|
68
|
-
|
82
|
+
globalid (0.5.2)
|
83
|
+
activesupport (>= 5.0)
|
84
|
+
i18n (1.8.5)
|
85
|
+
concurrent-ruby (~> 1.0)
|
86
|
+
jasmine (3.6.0)
|
87
|
+
jasmine-core (~> 3.6.0)
|
69
88
|
phantomjs
|
70
89
|
rack (>= 1.2.1)
|
71
90
|
rake
|
72
|
-
jasmine-core (
|
73
|
-
loofah (2.0
|
91
|
+
jasmine-core (3.6.0)
|
92
|
+
loofah (2.7.0)
|
93
|
+
crass (~> 1.0.2)
|
74
94
|
nokogiri (>= 1.5.9)
|
75
|
-
mail (2.
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
95
|
+
mail (2.7.1)
|
96
|
+
mini_mime (>= 0.1.1)
|
97
|
+
marcel (0.3.3)
|
98
|
+
mimemagic (~> 0.3.2)
|
99
|
+
method_source (1.0.0)
|
100
|
+
mimemagic (0.3.10)
|
101
|
+
nokogiri (~> 1)
|
102
|
+
rake
|
103
|
+
mini_mime (1.1.2)
|
104
|
+
mini_portile2 (2.6.1)
|
105
|
+
minitest (5.14.1)
|
106
|
+
nio4r (2.5.8)
|
107
|
+
nokogiri (1.12.5)
|
108
|
+
mini_portile2 (~> 2.6.1)
|
109
|
+
racc (~> 1.4)
|
86
110
|
phantomjs (2.1.1.0)
|
87
|
-
|
88
|
-
rack
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
111
|
+
racc (1.6.0)
|
112
|
+
rack (2.2.3)
|
113
|
+
rack-test (1.1.0)
|
114
|
+
rack (>= 1.0, < 3)
|
115
|
+
rails (6.0.3.2)
|
116
|
+
actioncable (= 6.0.3.2)
|
117
|
+
actionmailbox (= 6.0.3.2)
|
118
|
+
actionmailer (= 6.0.3.2)
|
119
|
+
actionpack (= 6.0.3.2)
|
120
|
+
actiontext (= 6.0.3.2)
|
121
|
+
actionview (= 6.0.3.2)
|
122
|
+
activejob (= 6.0.3.2)
|
123
|
+
activemodel (= 6.0.3.2)
|
124
|
+
activerecord (= 6.0.3.2)
|
125
|
+
activestorage (= 6.0.3.2)
|
126
|
+
activesupport (= 6.0.3.2)
|
127
|
+
bundler (>= 1.3.0)
|
128
|
+
railties (= 6.0.3.2)
|
101
129
|
sprockets-rails (>= 2.0.0)
|
102
|
-
rails-dom-testing (2.0.
|
103
|
-
activesupport (>= 4.2.0
|
104
|
-
nokogiri (
|
105
|
-
rails-html-sanitizer (1.0
|
106
|
-
loofah (~> 2.
|
107
|
-
railties (
|
108
|
-
actionpack (=
|
109
|
-
activesupport (=
|
130
|
+
rails-dom-testing (2.0.3)
|
131
|
+
activesupport (>= 4.2.0)
|
132
|
+
nokogiri (>= 1.6)
|
133
|
+
rails-html-sanitizer (1.3.0)
|
134
|
+
loofah (~> 2.3)
|
135
|
+
railties (6.0.3.2)
|
136
|
+
actionpack (= 6.0.3.2)
|
137
|
+
activesupport (= 6.0.3.2)
|
110
138
|
method_source
|
111
139
|
rake (>= 0.8.7)
|
112
|
-
thor (>= 0.
|
113
|
-
rake (
|
114
|
-
rspec-core (3.
|
115
|
-
rspec-support (~> 3.
|
116
|
-
rspec-expectations (3.
|
140
|
+
thor (>= 0.20.3, < 2.0)
|
141
|
+
rake (13.0.1)
|
142
|
+
rspec-core (3.9.2)
|
143
|
+
rspec-support (~> 3.9.3)
|
144
|
+
rspec-expectations (3.9.2)
|
117
145
|
diff-lcs (>= 1.2.0, < 2.0)
|
118
|
-
rspec-support (~> 3.
|
119
|
-
rspec-mocks (3.
|
146
|
+
rspec-support (~> 3.9.0)
|
147
|
+
rspec-mocks (3.9.1)
|
120
148
|
diff-lcs (>= 1.2.0, < 2.0)
|
121
|
-
rspec-support (~> 3.
|
122
|
-
rspec-rails (3.
|
149
|
+
rspec-support (~> 3.9.0)
|
150
|
+
rspec-rails (3.9.1)
|
123
151
|
actionpack (>= 3.0)
|
124
152
|
activesupport (>= 3.0)
|
125
153
|
railties (>= 3.0)
|
126
|
-
rspec-core (~> 3.
|
127
|
-
rspec-expectations (~> 3.
|
128
|
-
rspec-mocks (~> 3.
|
129
|
-
rspec-support (~> 3.
|
130
|
-
rspec-support (3.
|
131
|
-
sprockets (
|
154
|
+
rspec-core (~> 3.9.0)
|
155
|
+
rspec-expectations (~> 3.9.0)
|
156
|
+
rspec-mocks (~> 3.9.0)
|
157
|
+
rspec-support (~> 3.9.0)
|
158
|
+
rspec-support (3.9.3)
|
159
|
+
sprockets (4.0.2)
|
132
160
|
concurrent-ruby (~> 1.0)
|
133
161
|
rack (> 1, < 3)
|
134
|
-
sprockets-rails (3.
|
135
|
-
actionpack (>=
|
136
|
-
activesupport (>=
|
162
|
+
sprockets-rails (3.4.1)
|
163
|
+
actionpack (>= 5.2)
|
164
|
+
activesupport (>= 5.2)
|
137
165
|
sprockets (>= 3.0.0)
|
138
|
-
sqlite3 (1.
|
139
|
-
thor (0.
|
166
|
+
sqlite3 (1.4.2)
|
167
|
+
thor (1.0.1)
|
140
168
|
thread_safe (0.3.6)
|
141
|
-
tzinfo (1.2.
|
169
|
+
tzinfo (1.2.7)
|
142
170
|
thread_safe (~> 0.1)
|
143
|
-
websocket-driver (0.
|
171
|
+
websocket-driver (0.7.5)
|
144
172
|
websocket-extensions (>= 0.1.0)
|
145
|
-
websocket-extensions (0.1.
|
173
|
+
websocket-extensions (0.1.5)
|
174
|
+
zeitwerk (2.4.0)
|
146
175
|
|
147
176
|
PLATFORMS
|
148
177
|
ruby
|
149
178
|
|
150
179
|
DEPENDENCIES
|
151
180
|
appraisal (~> 2.1)
|
152
|
-
|
181
|
+
factory_bot_rails (~> 4.8)
|
153
182
|
generator_spec (~> 0.9)
|
154
|
-
jasmine (~>
|
183
|
+
jasmine (~> 3.1)
|
155
184
|
paul_revere!
|
156
|
-
rspec-rails (~> 3.
|
185
|
+
rspec-rails (~> 3.7)
|
157
186
|
sqlite3 (~> 1.3)
|
158
187
|
|
159
188
|
BUNDLED WITH
|
160
|
-
1.
|
189
|
+
2.1.4
|
data/README.md
CHANGED
@@ -25,6 +25,10 @@ Finally, create the announcements table by running the migration:
|
|
25
25
|
|
26
26
|
rake db:migrate
|
27
27
|
|
28
|
+
Copy built-in partials into your Rails application by running:
|
29
|
+
|
30
|
+
rails generate paul_revere:views
|
31
|
+
|
28
32
|
## Background
|
29
33
|
|
30
34
|
Paul Revere provides...
|
@@ -79,5 +83,5 @@ The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
|
79
83
|
|
80
84
|
## License
|
81
85
|
|
82
|
-
Paul Revere is Copyright © 2009 thoughtbot, inc. It is free software, and may be
|
86
|
+
Paul Revere is Copyright © 2009-2020 thoughtbot, inc. It is free software, and may be
|
83
87
|
redistributed under the terms specified in the MIT-LICENSE file.
|
data/gemfiles/rails_5.0.gemfile
CHANGED
data/gemfiles/rails_5.1.gemfile
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module PaulRevere
|
2
|
+
module Generators
|
3
|
+
class ViewsGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path(
|
5
|
+
"../../../../app/views/announcements",
|
6
|
+
__FILE__,
|
7
|
+
)
|
8
|
+
|
9
|
+
desc "Copy built-in partials to Rails application"
|
10
|
+
def copy_partials
|
11
|
+
filename_pattern = File.join self.class.source_root, "*.erb"
|
12
|
+
Dir.glob(filename_pattern).map { |f| File.basename f }.each do |f|
|
13
|
+
copy_file f, "app/views/announcements/#{f}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/paul_revere/version.rb
CHANGED
data/paul_revere.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
'Ben Orenstein',
|
22
22
|
'Prem Sichanugrist',
|
23
23
|
'Amrit Ayalur',
|
24
|
+
'Geoff Harcourt',
|
24
25
|
]
|
25
26
|
s.email = "support@thoughtbot.com"
|
26
27
|
s.homepage = "https://github.com/thoughtbot/paul_revere"
|
@@ -32,12 +33,12 @@ Gem::Specification.new do |s|
|
|
32
33
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
33
34
|
s.require_paths = ["lib"]
|
34
35
|
|
35
|
-
s.add_dependency("rails", ">= 5.0", "<
|
36
|
+
s.add_dependency("rails", ">= 5.0", "< 7.1")
|
36
37
|
|
37
38
|
s.add_development_dependency("appraisal", "~> 2.1")
|
38
|
-
s.add_development_dependency("
|
39
|
+
s.add_development_dependency("factory_bot_rails", "~> 4.8")
|
39
40
|
s.add_development_dependency("generator_spec", "~> 0.9")
|
40
|
-
s.add_development_dependency("jasmine", "~>
|
41
|
-
s.add_development_dependency("rspec-rails", "~> 3.
|
41
|
+
s.add_development_dependency("jasmine", "~> 3.1")
|
42
|
+
s.add_development_dependency("rspec-rails", "~> 3.7")
|
42
43
|
s.add_development_dependency("sqlite3", "~> 1.3")
|
43
44
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Used by specs
|
2
|
+
module ApplicationHelper
|
3
|
+
def current_user; raise; end
|
4
|
+
end
|
5
|
+
|
6
|
+
# Used by specs
|
7
|
+
class User; end
|
8
|
+
|
9
|
+
# Minimal Rails application for specs
|
10
|
+
module Dummy
|
11
|
+
class Application < Rails::Application
|
12
|
+
config.secret_key_base = "test"
|
13
|
+
config.paths["config/database"] = ["spec/support/database.yml"]
|
14
|
+
config.cache_classes = true
|
15
|
+
config.eager_load = false
|
16
|
+
|
17
|
+
if config.active_record.sqlite3.respond_to?(:represent_boolean_as_integer)
|
18
|
+
if Rails.gem_version < Gem::Version.new("6.0")
|
19
|
+
config.active_record.sqlite3.represent_boolean_as_integer = true
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/spec/factories.rb
CHANGED
data/spec/rails_helper.rb
CHANGED
@@ -3,19 +3,27 @@ ENV["RAILS_ENV"] = "test"
|
|
3
3
|
|
4
4
|
require "spec_helper"
|
5
5
|
|
6
|
-
require "rails
|
7
|
-
require "
|
6
|
+
require "rails"
|
7
|
+
require "active_record/railtie"
|
8
|
+
|
9
|
+
require "dummy/application"
|
8
10
|
|
9
|
-
require "
|
11
|
+
require "rspec/rails"
|
12
|
+
require "factory_bot"
|
13
|
+
require "factories"
|
10
14
|
|
11
15
|
# Load support files
|
12
16
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
13
17
|
|
14
|
-
|
15
|
-
|
18
|
+
# Initialize fake app
|
19
|
+
Dummy::Application.initialize!
|
20
|
+
|
21
|
+
# Run migrations
|
22
|
+
require_relative "../lib/generators/paul_revere/templates/migration"
|
23
|
+
CreateAnnouncements.suppress_messages { CreateAnnouncements.new.change }
|
16
24
|
|
17
25
|
RSpec.configure do |config|
|
18
|
-
config.include
|
26
|
+
config.include FactoryBot::Syntax::Methods
|
19
27
|
config.include Rails.application.routes.url_helpers
|
20
28
|
config.infer_spec_type_from_file_location!
|
21
29
|
config.before(:each) do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paul_revere
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Jankowski
|
@@ -18,10 +18,11 @@ authors:
|
|
18
18
|
- Ben Orenstein
|
19
19
|
- Prem Sichanugrist
|
20
20
|
- Amrit Ayalur
|
21
|
-
|
21
|
+
- Geoff Harcourt
|
22
|
+
autorequire:
|
22
23
|
bindir: bin
|
23
24
|
cert_chain: []
|
24
|
-
date:
|
25
|
+
date: 2022-01-12 00:00:00.000000000 Z
|
25
26
|
dependencies:
|
26
27
|
- !ruby/object:Gem::Dependency
|
27
28
|
name: rails
|
@@ -32,7 +33,7 @@ dependencies:
|
|
32
33
|
version: '5.0'
|
33
34
|
- - "<"
|
34
35
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
36
|
+
version: '7.1'
|
36
37
|
type: :runtime
|
37
38
|
prerelease: false
|
38
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +43,7 @@ dependencies:
|
|
42
43
|
version: '5.0'
|
43
44
|
- - "<"
|
44
45
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
46
|
+
version: '7.1'
|
46
47
|
- !ruby/object:Gem::Dependency
|
47
48
|
name: appraisal
|
48
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,7 +59,7 @@ dependencies:
|
|
58
59
|
- !ruby/object:Gem::Version
|
59
60
|
version: '2.1'
|
60
61
|
- !ruby/object:Gem::Dependency
|
61
|
-
name:
|
62
|
+
name: factory_bot_rails
|
62
63
|
requirement: !ruby/object:Gem::Requirement
|
63
64
|
requirements:
|
64
65
|
- - "~>"
|
@@ -91,28 +92,28 @@ dependencies:
|
|
91
92
|
requirements:
|
92
93
|
- - "~>"
|
93
94
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
95
|
+
version: '3.1'
|
95
96
|
type: :development
|
96
97
|
prerelease: false
|
97
98
|
version_requirements: !ruby/object:Gem::Requirement
|
98
99
|
requirements:
|
99
100
|
- - "~>"
|
100
101
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
102
|
+
version: '3.1'
|
102
103
|
- !ruby/object:Gem::Dependency
|
103
104
|
name: rspec-rails
|
104
105
|
requirement: !ruby/object:Gem::Requirement
|
105
106
|
requirements:
|
106
107
|
- - "~>"
|
107
108
|
- !ruby/object:Gem::Version
|
108
|
-
version: '3.
|
109
|
+
version: '3.7'
|
109
110
|
type: :development
|
110
111
|
prerelease: false
|
111
112
|
version_requirements: !ruby/object:Gem::Requirement
|
112
113
|
requirements:
|
113
114
|
- - "~>"
|
114
115
|
- !ruby/object:Gem::Version
|
115
|
-
version: '3.
|
116
|
+
version: '3.7'
|
116
117
|
- !ruby/object:Gem::Dependency
|
117
118
|
name: sqlite3
|
118
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,10 +138,10 @@ files:
|
|
137
138
|
- ".rspec"
|
138
139
|
- ".travis.yml"
|
139
140
|
- Appraisals
|
141
|
+
- CHANGELOG.md
|
140
142
|
- Gemfile
|
141
143
|
- Gemfile.lock
|
142
144
|
- MIT-LICENSE
|
143
|
-
- NEWS.md
|
144
145
|
- README.md
|
145
146
|
- Rakefile
|
146
147
|
- app/assets/javascripts/announcements.js
|
@@ -151,13 +152,18 @@ files:
|
|
151
152
|
- app/views/announcements/_public_announcement.html.erb
|
152
153
|
- gemfiles/rails_5.0.gemfile
|
153
154
|
- gemfiles/rails_5.1.gemfile
|
155
|
+
- gemfiles/rails_5.2.gemfile
|
156
|
+
- gemfiles/rails_6.0.gemfile
|
157
|
+
- gemfiles/rails_6.1.gemfile
|
158
|
+
- gemfiles/rails_7.0.gemfile
|
154
159
|
- lib/generators/paul_revere/paul_revere_generator.rb
|
155
160
|
- lib/generators/paul_revere/templates/migration.rb
|
161
|
+
- lib/generators/paul_revere/views_generator.rb
|
156
162
|
- lib/paul_revere.rb
|
157
163
|
- lib/paul_revere/version.rb
|
158
164
|
- paul_revere.gemspec
|
165
|
+
- spec/dummy/application.rb
|
159
166
|
- spec/factories.rb
|
160
|
-
- spec/fake_app.rb
|
161
167
|
- spec/helpers/announcements_helper_spec.rb
|
162
168
|
- spec/javascripts/announcements_spec.js
|
163
169
|
- spec/javascripts/helpers/.gitkeep
|
@@ -176,7 +182,7 @@ homepage: https://github.com/thoughtbot/paul_revere
|
|
176
182
|
licenses:
|
177
183
|
- MIT
|
178
184
|
metadata: {}
|
179
|
-
post_install_message:
|
185
|
+
post_install_message:
|
180
186
|
rdoc_options: []
|
181
187
|
require_paths:
|
182
188
|
- lib
|
@@ -191,15 +197,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
197
|
- !ruby/object:Gem::Version
|
192
198
|
version: '0'
|
193
199
|
requirements: []
|
194
|
-
|
195
|
-
|
196
|
-
signing_key:
|
200
|
+
rubygems_version: 3.2.33
|
201
|
+
signing_key:
|
197
202
|
specification_version: 4
|
198
203
|
summary: Simple announcement plugin to include `one off` style announcements in Rails
|
199
204
|
web apps.
|
200
205
|
test_files:
|
206
|
+
- spec/dummy/application.rb
|
201
207
|
- spec/factories.rb
|
202
|
-
- spec/fake_app.rb
|
203
208
|
- spec/helpers/announcements_helper_spec.rb
|
204
209
|
- spec/javascripts/announcements_spec.js
|
205
210
|
- spec/javascripts/helpers/.gitkeep
|
data/NEWS.md
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
New in 2.1.0:
|
2
|
-
|
3
|
-
* Drop explicit support for ruby versions under 2.1.0
|
4
|
-
* Drop support for Rails versions prior to 4.1.0
|
5
|
-
* Relax version requirements to support Rails version 5.0.x
|
6
|
-
|
7
|
-
New in 2.0.0:
|
8
|
-
|
9
|
-
* Remove deprecated should macros
|
10
|
-
* Switch to using `change` in generated Rails migrations
|
11
|
-
* Clean up the README and installation instructions
|
12
|
-
* Install the javascripts into vendor/assets
|
13
|
-
* Rename helper methods and view partials
|
14
|
-
|
15
|
-
New in 1.4:
|
16
|
-
|
17
|
-
* Reference the MIT license from the gemspec
|
18
|
-
* Update migration to avoid Rails deprecation warning about timestamps `null :false`
|
19
|
-
* Drop support for ruby 1.9.3
|
20
|
-
* Remove deprecated Rails method `link_to_function`
|
21
|
-
* Use ISO 8601 format when creating the Announcement cookie name
|
22
|
-
|
23
|
-
New in 1.3:
|
24
|
-
|
25
|
-
* Fix for ActiveRecord migration/generator error on Rails 4+.
|
26
|
-
|
27
|
-
New in 1.2:
|
28
|
-
|
29
|
-
* Rails 4 support.
|
30
|
-
|
31
|
-
New in 1.1:
|
32
|
-
|
33
|
-
* Support for the asset pipeline.
|
34
|
-
* More clear installation instructions for both newer and older Rails.
|
35
|
-
* The Announcement body is attr_accessible.
|
36
|
-
|
37
|
-
New in 1.0:
|
38
|
-
|
39
|
-
* Support for Rails 3.2.3, 3.1.4, and 3.0.12.
|
40
|
-
* Fix the JavaScript that hides the announcements to work out of the box.
|
41
|
-
* The announcement hiding cookie expires after a year.
|
data/spec/fake_app.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Classes required for the tests
|
2
|
-
class User; end
|
3
|
-
module ApplicationHelper; def current_user; raise; end; end
|
4
|
-
|
5
|
-
# Create a rails app
|
6
|
-
module PaulRevere
|
7
|
-
class Application < Rails::Application
|
8
|
-
config.secret_key_base = "test"
|
9
|
-
config.paths["config/database"] = ["spec/support/database.yml"]
|
10
|
-
config.eager_load = false
|
11
|
-
end
|
12
|
-
end
|
13
|
-
PaulRevere::Application.initialize!
|
14
|
-
|
15
|
-
# Run migrations
|
16
|
-
require_relative "../lib/generators/paul_revere/templates/migration"
|
17
|
-
CreateAnnouncements.suppress_messages { CreateAnnouncements.new.change }
|