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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: '09b6daffc473e1e499786d6799cd3490efedb728'
4
- data.tar.gz: 01ba60d0334509b308487da26da6bb77f8a0552a
2
+ SHA256:
3
+ metadata.gz: f797e457ea9108477dc6043bf26cbc8ab9aa25a28ea42a2c219700939953c593
4
+ data.tar.gz: 40745f4755d12acacffd7eb7faaa06f77cf145944a3581d682c63a014bd3cdff
5
5
  SHA512:
6
- metadata.gz: a57145e97c82a91ee2126024e8a2da6006a98bacdab8d914ed25e897a506de00d60def0b9e8713e29fd9726693403df94d18f4f97f65ee364efede5e860b7c53
7
- data.tar.gz: 58a4f796c90f99287d26d49400fa32e731e053719b235d83ab48bf61c014215eacfe4000f0cf316d48dd39b3f188e60288b48fee4226e20cca30b251348ab6e2
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.2.4
4
- - 2.3.4
5
- - 2.4.1
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
- sudo: false
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
- ["5.1.0", "5.0.0"].each do |rails_version|
2
- appraise "rails_#{rails_version[0..2]}" do
3
- gem "rails", "~> #{rails_version}"
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.1.0)
5
- rails (>= 5.0, < 5.2)
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 (5.1.0)
11
- actionpack (= 5.1.0)
10
+ actioncable (6.0.3.2)
11
+ actionpack (= 6.0.3.2)
12
12
  nio4r (~> 2.0)
13
- websocket-driver (~> 0.6.1)
14
- actionmailer (5.1.0)
15
- actionpack (= 5.1.0)
16
- actionview (= 5.1.0)
17
- activejob (= 5.1.0)
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 (5.1.0)
21
- actionview (= 5.1.0)
22
- activesupport (= 5.1.0)
23
- rack (~> 2.0)
24
- rack-test (~> 0.6.3)
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.2)
27
- actionview (5.1.0)
28
- activesupport (= 5.1.0)
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.0, >= 1.0.3)
33
- activejob (5.1.0)
34
- activesupport (= 5.1.0)
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 (5.1.0)
37
- activesupport (= 5.1.0)
38
- activerecord (5.1.0)
39
- activemodel (= 5.1.0)
40
- activesupport (= 5.1.0)
41
- arel (~> 8.0)
42
- activesupport (5.1.0)
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 (~> 0.7)
61
+ i18n (>= 0.7, < 2)
45
62
  minitest (~> 5.1)
46
63
  tzinfo (~> 1.1)
47
- appraisal (2.2.0)
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
- arel (8.0.0)
52
- builder (3.2.3)
53
- concurrent-ruby (1.0.5)
54
- diff-lcs (1.3)
55
- erubi (1.6.0)
56
- factory_girl (4.8.0)
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
- factory_girl_rails (4.8.0)
59
- factory_girl (~> 4.8.0)
76
+ factory_bot_rails (4.11.1)
77
+ factory_bot (~> 4.11.1)
60
78
  railties (>= 3.0.0)
61
- generator_spec (0.9.3)
79
+ generator_spec (0.9.4)
62
80
  activesupport (>= 3.0.0)
63
81
  railties (>= 3.0.0)
64
- globalid (0.4.0)
65
- activesupport (>= 4.2.0)
66
- i18n (0.8.1)
67
- jasmine (2.6.0)
68
- jasmine-core (>= 2.6.0, < 3.0.0)
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 (2.6.1)
73
- loofah (2.0.3)
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.6.5)
76
- mime-types (>= 1.16, < 4)
77
- method_source (0.8.2)
78
- mime-types (3.1)
79
- mime-types-data (~> 3.2015)
80
- mime-types-data (3.2016.0521)
81
- mini_portile2 (2.1.0)
82
- minitest (5.10.1)
83
- nio4r (2.0.0)
84
- nokogiri (1.7.1)
85
- mini_portile2 (~> 2.1.0)
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
- rack (2.0.1)
88
- rack-test (0.6.3)
89
- rack (>= 1.0)
90
- rails (5.1.0)
91
- actioncable (= 5.1.0)
92
- actionmailer (= 5.1.0)
93
- actionpack (= 5.1.0)
94
- actionview (= 5.1.0)
95
- activejob (= 5.1.0)
96
- activemodel (= 5.1.0)
97
- activerecord (= 5.1.0)
98
- activesupport (= 5.1.0)
99
- bundler (>= 1.3.0, < 2.0)
100
- railties (= 5.1.0)
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.2)
103
- activesupport (>= 4.2.0, < 6.0)
104
- nokogiri (~> 1.6)
105
- rails-html-sanitizer (1.0.3)
106
- loofah (~> 2.0)
107
- railties (5.1.0)
108
- actionpack (= 5.1.0)
109
- activesupport (= 5.1.0)
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.18.1, < 2.0)
113
- rake (12.0.0)
114
- rspec-core (3.5.4)
115
- rspec-support (~> 3.5.0)
116
- rspec-expectations (3.5.0)
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.5.0)
119
- rspec-mocks (3.5.0)
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.5.0)
122
- rspec-rails (3.5.2)
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.5.0)
127
- rspec-expectations (~> 3.5.0)
128
- rspec-mocks (~> 3.5.0)
129
- rspec-support (~> 3.5.0)
130
- rspec-support (3.5.0)
131
- sprockets (3.7.1)
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.2.0)
135
- actionpack (>= 4.0)
136
- activesupport (>= 4.0)
162
+ sprockets-rails (3.4.1)
163
+ actionpack (>= 5.2)
164
+ activesupport (>= 5.2)
137
165
  sprockets (>= 3.0.0)
138
- sqlite3 (1.3.13)
139
- thor (0.19.4)
166
+ sqlite3 (1.4.2)
167
+ thor (1.0.1)
140
168
  thread_safe (0.3.6)
141
- tzinfo (1.2.3)
169
+ tzinfo (1.2.7)
142
170
  thread_safe (~> 0.1)
143
- websocket-driver (0.6.5)
171
+ websocket-driver (0.7.5)
144
172
  websocket-extensions (>= 0.1.0)
145
- websocket-extensions (0.1.2)
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
- factory_girl_rails (~> 4.8)
181
+ factory_bot_rails (~> 4.8)
153
182
  generator_spec (~> 0.9)
154
- jasmine (~> 2.6)
183
+ jasmine (~> 3.1)
155
184
  paul_revere!
156
- rspec-rails (~> 3.5)
185
+ rspec-rails (~> 3.7)
157
186
  sqlite3 (~> 1.3)
158
187
 
159
188
  BUNDLED WITH
160
- 1.14.6
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.
@@ -3,5 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 5.0.0"
6
+ gem "sqlite3", "~> 1.3.13"
6
7
 
7
- gemspec :path => "../"
8
+ gemspec path: "../"
@@ -3,5 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 5.1.0"
6
+ gem "sqlite3", "~> 1.3.13"
6
7
 
7
- gemspec :path => "../"
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.2.0"
6
+ gem "sqlite3", "~> 1.3.13"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 6.0.0"
6
+ gem "sqlite3", "~> 1.4.0"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 6.1.0"
6
+ gem "sqlite3", "~> 1.4.0"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 7.0.0"
6
+ gem "sqlite3", "~> 1.4.0"
7
+
8
+ gemspec path: "../"
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PaulRevere
2
- VERSION = "2.1.0".freeze
2
+ VERSION = "3.3.0".freeze
3
3
  end
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", "< 5.2")
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("factory_girl_rails", "~> 4.8")
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", "~> 2.6")
41
- s.add_development_dependency("rspec-rails", "~> 3.5")
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
@@ -1,5 +1,5 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :announcement do
3
- body "Announcement"
3
+ body { "Announcement" }
4
4
  end
5
5
  end
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/all"
7
- require "rspec/rails"
6
+ require "rails"
7
+ require "active_record/railtie"
8
+
9
+ require "dummy/application"
8
10
 
9
- require "fake_app"
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
- require "factory_girl"
15
- require "factories"
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 FactoryGirl::Syntax::Methods
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: 2.1.0
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
- autorequire:
21
+ - Geoff Harcourt
22
+ autorequire:
22
23
  bindir: bin
23
24
  cert_chain: []
24
- date: 2017-05-01 00:00:00.000000000 Z
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: '5.2'
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: '5.2'
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: factory_girl_rails
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: '2.6'
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: '2.6'
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.5'
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.5'
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
- rubyforge_project:
195
- rubygems_version: 2.6.12
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 }