paul_revere 2.1.0.rc1 → 3.2.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: 67bead16b259db44eecaee819e57d55dc798f66b
4
- data.tar.gz: ea04b1fc9b5a8b35aeddfdfaf7c901569f378a4a
2
+ SHA256:
3
+ metadata.gz: 3170ec55a7981db87306e8dfb1f7e818f772af67293cb5053153ec79c20658a4
4
+ data.tar.gz: b8c7e1cf774785f0f53231609a2596432a53b1628f496fb6fce2cdcf1435d522
5
5
  SHA512:
6
- metadata.gz: 8581f3128f12d8ac5bcccb1dee805fe4f192911700276b29e8437fc311c60839706516d85499cb67bdaaaad00eb1ad2436cdd5a05fb0c6242947dffe051c06f7
7
- data.tar.gz: 358c59de9d6ab6ec1a5aa008e5ea8344d9b84db50f05b643dc3c9a18504908a73035fd96c5e6de33900165494a801b99ac5a31c0995907ba2bec9c17ac8e7e15
6
+ metadata.gz: 1b90c7ac3c1c8dd154a262d1eeadedb8960f373796ca58c42e14863c80606f7675f246eacb30385b2534a240f01c645ed693a8031fde8f5ac29d21aca2814a0d
7
+ data.tar.gz: 14977c8b4d3c26efd9cb7255747cbeba7a9bf3055f81d4516a1726eba0df88e6a6030fdc2b6aaceec560be8613dee5da55d2274556436e250ae0c68b9d5e457a
data/.travis.yml CHANGED
@@ -1,18 +1,24 @@
1
1
  language: ruby
2
+
2
3
  rvm:
3
- - 2.1.8
4
- - 2.2.4
5
- - 2.3.0
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
12
+ - gemfiles/rails_5.1.gemfile
7
13
  - gemfiles/rails_5.0.gemfile
8
- - gemfiles/rails_4.2.gemfile
9
- - gemfiles/rails_4.1.gemfile
14
+
10
15
  install:
11
16
  - 'travis_retry bundle install'
17
+
12
18
  notifications:
13
19
  email: false
14
- sudo: false
20
+
15
21
  matrix:
16
- exclude:
17
- - rvm: 2.1.8
18
- gemfile: gemfiles/rails_5.0.gemfile
22
+ allow_failures:
23
+ - gemfile: gemfiles/rails_6.0.gemfile
24
+ rvm: 2.4.9
data/Appraisals CHANGED
@@ -1,5 +1,19 @@
1
- ["5.0.0.rc1", "4.2.0", "4.1.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
+ )
8
+
9
+ rails_versions.each do |version|
10
+ appraise "rails_#{version}" do
11
+ gem "rails", "~> #{version}.0"
12
+
13
+ if Gem::Version.new(version) >= Gem::Version.new("6.0")
14
+ gem "sqlite3", "~> 1.4.0"
15
+ else
16
+ gem "sqlite3", "~> 1.3.13"
17
+ end
4
18
  end
5
19
  end
data/CHANGELOG.md ADDED
@@ -0,0 +1,103 @@
1
+ # Changelog
2
+
3
+ ## [3.2.0]
4
+
5
+ ### Added
6
+
7
+ - Add support for Rails version 6.1.0
8
+
9
+ ## [3.1.0]
10
+
11
+ ### Added
12
+
13
+ - Add support for Rails version 6.0.0
14
+
15
+ ## [3.0.0]
16
+
17
+ ### Added
18
+
19
+ - Add support for Rails version 5.2.x
20
+
21
+ ### Removed
22
+
23
+ - Drop explicit support for ruby versions under 2.3.x
24
+ - Drop support for Rails versions under 5.0.x
25
+
26
+ ## [2.1.0]
27
+
28
+ ### Added
29
+
30
+ - Relax version requirements to support Rails version 5.0.x
31
+
32
+ ### Removed
33
+
34
+ - Drop explicit support for ruby versions under 2.1.0
35
+ - Drop support for Rails versions prior to 4.1.0
36
+
37
+ ## [2.0.0]
38
+
39
+ ### Added
40
+
41
+ - Install the javascripts into vendor/assets
42
+
43
+ ### Changed
44
+
45
+ - Remove deprecated should macros
46
+ - Switch to using `change` in generated Rails migrations
47
+ - Clean up the README and installation instructions
48
+ - Rename helper methods and view partials
49
+
50
+ ## [1.4]
51
+
52
+ ### Removed
53
+
54
+ - Drop support for ruby 1.9.3
55
+ - Remove deprecated Rails method `link_to_function`
56
+
57
+ ### Changed
58
+
59
+ - Reference the MIT license from the gemspec
60
+ - Update migration to avoid Rails deprecation warning about timestamps `null :false`
61
+ - Use ISO 8601 format when creating the Announcement cookie name
62
+
63
+ ## [1.3]
64
+
65
+ ### Fixed
66
+
67
+ - Fix for ActiveRecord migration/generator error on Rails 4+.
68
+
69
+ ## [1.2]
70
+
71
+ ### Added
72
+
73
+ - Rails 4 support.
74
+
75
+ ## [1.1]
76
+
77
+ ### Added
78
+
79
+ - Support for the Rails asset pipeline.
80
+ - More clear installation instructions for both newer and older Rails.
81
+ - The Announcement body is attr_accessible.
82
+
83
+ ## [1.0]
84
+
85
+ ### Added
86
+
87
+ - Support for Rails 3.2.3, 3.1.4, and 3.0.12.
88
+ - The announcement hiding cookie expires after a year.
89
+
90
+ ### Fixed
91
+
92
+ - Fix the JavaScript that hides the announcements to work out of the box.
93
+
94
+ [3.2.0]: https://github.com/thoughtbot/paul_revere/compare/v3.1.0...v3.2.0
95
+ [3.1.0]: https://github.com/thoughtbot/paul_revere/compare/v3.0.0...v3.1.0
96
+ [3.0.0]: https://github.com/thoughtbot/paul_revere/compare/v2.1.0...v3.0.0
97
+ [2.1.0]: https://github.com/thoughtbot/paul_revere/compare/v2.0.0...v2.1.0
98
+ [2.0.0]: https://github.com/thoughtbot/paul_revere/compare/v1.4...v2.0.0
99
+ [1.4]: https://github.com/thoughtbot/paul_revere/compare/v1.3...v1.4
100
+ [1.3]: https://github.com/thoughtbot/paul_revere/compare/v1.2...v1.3
101
+ [1.2]: https://github.com/thoughtbot/paul_revere/compare/v1.1...v1.2
102
+ [1.1]: https://github.com/thoughtbot/paul_revere/compare/v1.0...v1.1
103
+ [1.0]: https://github.com/thoughtbot/paul_revere/compare/v0.2.1...v1.0
data/Gemfile.lock CHANGED
@@ -1,157 +1,187 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paul_revere (2.1.0.rc1)
5
- rails (>= 4.1, < 5.1)
4
+ paul_revere (3.2.0)
5
+ rails (>= 5.0, < 6.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionmailer (4.2.6)
11
- actionpack (= 4.2.6)
12
- actionview (= 4.2.6)
13
- activejob (= 4.2.6)
10
+ actioncable (6.0.3.2)
11
+ actionpack (= 6.0.3.2)
12
+ nio4r (~> 2.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)
14
25
  mail (~> 2.5, >= 2.5.4)
15
- rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.6)
17
- actionview (= 4.2.6)
18
- activesupport (= 4.2.6)
19
- rack (~> 1.6)
20
- rack-test (~> 0.6.2)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (4.2.6)
24
- activesupport (= 4.2.6)
26
+ rails-dom-testing (~> 2.0)
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)
32
+ rails-dom-testing (~> 2.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)
25
42
  builder (~> 3.1)
26
- erubis (~> 2.7.0)
27
- rails-dom-testing (~> 1.0, >= 1.0.5)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- activejob (4.2.6)
30
- activesupport (= 4.2.6)
31
- globalid (>= 0.3.0)
32
- activemodel (4.2.6)
33
- activesupport (= 4.2.6)
34
- builder (~> 3.1)
35
- activerecord (4.2.6)
36
- activemodel (= 4.2.6)
37
- activesupport (= 4.2.6)
38
- arel (~> 6.0)
39
- activesupport (4.2.6)
40
- i18n (~> 0.7)
41
- json (~> 1.7, >= 1.7.7)
43
+ erubi (~> 1.4)
44
+ rails-dom-testing (~> 2.0)
45
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
+ activejob (6.0.3.2)
47
+ activesupport (= 6.0.3.2)
48
+ globalid (>= 0.3.6)
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)
60
+ concurrent-ruby (~> 1.0, >= 1.0.2)
61
+ i18n (>= 0.7, < 2)
42
62
  minitest (~> 5.1)
43
- thread_safe (~> 0.3, >= 0.3.4)
44
63
  tzinfo (~> 1.1)
45
- appraisal (2.1.0)
64
+ zeitwerk (~> 2.2, >= 2.2.2)
65
+ appraisal (2.3.0)
46
66
  bundler
47
67
  rake
48
68
  thor (>= 0.14.0)
49
- arel (6.0.3)
50
- builder (3.2.2)
51
- concurrent-ruby (1.0.2)
52
- diff-lcs (1.2.5)
53
- erubis (2.7.0)
54
- factory_girl (4.7.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)
55
75
  activesupport (>= 3.0.0)
56
- factory_girl_rails (4.7.0)
57
- factory_girl (~> 4.7.0)
76
+ factory_bot_rails (4.11.1)
77
+ factory_bot (~> 4.11.1)
58
78
  railties (>= 3.0.0)
59
- generator_spec (0.9.3)
79
+ generator_spec (0.9.4)
60
80
  activesupport (>= 3.0.0)
61
81
  railties (>= 3.0.0)
62
- globalid (0.3.6)
63
- activesupport (>= 4.1.0)
64
- i18n (0.7.0)
65
- jasmine (2.4.0)
66
- jasmine-core (~> 2.4)
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)
67
88
  phantomjs
68
89
  rack (>= 1.2.1)
69
90
  rake
70
- jasmine-core (2.4.1)
71
- json (1.8.3)
72
- loofah (2.0.3)
91
+ jasmine-core (3.6.0)
92
+ loofah (2.7.0)
93
+ crass (~> 1.0.2)
73
94
  nokogiri (>= 1.5.9)
74
- mail (2.6.4)
75
- mime-types (>= 1.16, < 4)
76
- mime-types (3.1)
77
- mime-types-data (~> 3.2015)
78
- mime-types-data (3.2016.0521)
79
- mini_portile2 (2.1.0)
80
- minitest (5.9.0)
81
- nokogiri (1.6.8)
82
- mini_portile2 (~> 2.1.0)
83
- pkg-config (~> 1.1.7)
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.4.0)
105
+ minitest (5.14.1)
106
+ nio4r (2.5.8)
107
+ nokogiri (1.10.10)
108
+ mini_portile2 (~> 2.4.0)
84
109
  phantomjs (2.1.1.0)
85
- pkg-config (1.1.7)
86
- rack (1.6.4)
87
- rack-test (0.6.3)
88
- rack (>= 1.0)
89
- rails (4.2.6)
90
- actionmailer (= 4.2.6)
91
- actionpack (= 4.2.6)
92
- actionview (= 4.2.6)
93
- activejob (= 4.2.6)
94
- activemodel (= 4.2.6)
95
- activerecord (= 4.2.6)
96
- activesupport (= 4.2.6)
97
- bundler (>= 1.3.0, < 2.0)
98
- railties (= 4.2.6)
99
- sprockets-rails
100
- rails-deprecated_sanitizer (1.0.3)
101
- activesupport (>= 4.2.0.alpha)
102
- rails-dom-testing (1.0.7)
103
- activesupport (>= 4.2.0.beta, < 5.0)
104
- nokogiri (~> 1.6.0)
105
- rails-deprecated_sanitizer (>= 1.0.1)
106
- rails-html-sanitizer (1.0.3)
107
- loofah (~> 2.0)
108
- railties (4.2.6)
109
- actionpack (= 4.2.6)
110
- activesupport (= 4.2.6)
110
+ rack (2.2.3)
111
+ rack-test (1.1.0)
112
+ rack (>= 1.0, < 3)
113
+ rails (6.0.3.2)
114
+ actioncable (= 6.0.3.2)
115
+ actionmailbox (= 6.0.3.2)
116
+ actionmailer (= 6.0.3.2)
117
+ actionpack (= 6.0.3.2)
118
+ actiontext (= 6.0.3.2)
119
+ actionview (= 6.0.3.2)
120
+ activejob (= 6.0.3.2)
121
+ activemodel (= 6.0.3.2)
122
+ activerecord (= 6.0.3.2)
123
+ activestorage (= 6.0.3.2)
124
+ activesupport (= 6.0.3.2)
125
+ bundler (>= 1.3.0)
126
+ railties (= 6.0.3.2)
127
+ sprockets-rails (>= 2.0.0)
128
+ rails-dom-testing (2.0.3)
129
+ activesupport (>= 4.2.0)
130
+ nokogiri (>= 1.6)
131
+ rails-html-sanitizer (1.3.0)
132
+ loofah (~> 2.3)
133
+ railties (6.0.3.2)
134
+ actionpack (= 6.0.3.2)
135
+ activesupport (= 6.0.3.2)
136
+ method_source
111
137
  rake (>= 0.8.7)
112
- thor (>= 0.18.1, < 2.0)
113
- rake (11.2.2)
114
- rspec-core (3.5.0.beta4)
115
- rspec-support (= 3.5.0.beta4)
116
- rspec-expectations (3.5.0.beta4)
138
+ thor (>= 0.20.3, < 2.0)
139
+ rake (13.0.1)
140
+ rspec-core (3.9.2)
141
+ rspec-support (~> 3.9.3)
142
+ rspec-expectations (3.9.2)
117
143
  diff-lcs (>= 1.2.0, < 2.0)
118
- rspec-support (= 3.5.0.beta4)
119
- rspec-mocks (3.5.0.beta4)
144
+ rspec-support (~> 3.9.0)
145
+ rspec-mocks (3.9.1)
120
146
  diff-lcs (>= 1.2.0, < 2.0)
121
- rspec-support (= 3.5.0.beta4)
122
- rspec-rails (3.5.0.beta4)
147
+ rspec-support (~> 3.9.0)
148
+ rspec-rails (3.9.1)
123
149
  actionpack (>= 3.0)
124
150
  activesupport (>= 3.0)
125
151
  railties (>= 3.0)
126
- rspec-core (= 3.5.0.beta4)
127
- rspec-expectations (= 3.5.0.beta4)
128
- rspec-mocks (= 3.5.0.beta4)
129
- rspec-support (= 3.5.0.beta4)
130
- rspec-support (3.5.0.beta4)
131
- sprockets (3.6.2)
152
+ rspec-core (~> 3.9.0)
153
+ rspec-expectations (~> 3.9.0)
154
+ rspec-mocks (~> 3.9.0)
155
+ rspec-support (~> 3.9.0)
156
+ rspec-support (3.9.3)
157
+ sprockets (4.0.2)
132
158
  concurrent-ruby (~> 1.0)
133
159
  rack (> 1, < 3)
134
- sprockets-rails (3.0.4)
135
- actionpack (>= 4.0)
136
- activesupport (>= 4.0)
160
+ sprockets-rails (3.4.1)
161
+ actionpack (>= 5.2)
162
+ activesupport (>= 5.2)
137
163
  sprockets (>= 3.0.0)
138
- sqlite3 (1.3.11)
139
- thor (0.19.1)
140
- thread_safe (0.3.5)
141
- tzinfo (1.2.2)
164
+ sqlite3 (1.4.2)
165
+ thor (1.0.1)
166
+ thread_safe (0.3.6)
167
+ tzinfo (1.2.7)
142
168
  thread_safe (~> 0.1)
169
+ websocket-driver (0.7.5)
170
+ websocket-extensions (>= 0.1.0)
171
+ websocket-extensions (0.1.5)
172
+ zeitwerk (2.4.0)
143
173
 
144
174
  PLATFORMS
145
175
  ruby
146
176
 
147
177
  DEPENDENCIES
148
178
  appraisal (~> 2.1)
149
- factory_girl_rails (~> 4.6)
179
+ factory_bot_rails (~> 4.8)
150
180
  generator_spec (~> 0.9)
151
- jasmine (~> 2.2)
181
+ jasmine (~> 3.1)
152
182
  paul_revere!
153
- rspec-rails (= 3.5.0.beta4)
183
+ rspec-rails (~> 3.7)
154
184
  sqlite3 (~> 1.3)
155
185
 
156
186
  BUNDLED WITH
157
- 1.12.5
187
+ 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.
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 5.0.0.rc1"
5
+ gem "rails", "~> 5.0.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.1.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", "~> 5.2.0"
6
+ gem "sqlite3", "~> 1.3.13"
7
+
8
+ gemspec path: "../"
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.1.0"
5
+ gem "rails", "~> 6.0.0"
6
+ gem "sqlite3", "~> 1.4.0"
6
7
 
7
- gemspec :path => "../"
8
+ gemspec path: "../"
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.2.0"
5
+ gem "rails", "~> 6.1.0"
6
+ gem "sqlite3", "~> 1.4.0"
6
7
 
7
- gemspec :path => "../"
8
+ gemspec path: "../"
@@ -1,4 +1,4 @@
1
- class CreateAnnouncements < ActiveRecord::Migration
1
+ class CreateAnnouncements < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
  create_table :announcements do |t|
4
4
  t.text :body
@@ -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.rc1".freeze
2
+ VERSION = "3.2.0".freeze
3
3
  end
data/paul_revere.gemspec CHANGED
@@ -6,7 +6,23 @@ Gem::Specification.new do |s|
6
6
  s.version = PaulRevere::VERSION.dup
7
7
  s.licenses = ["MIT"]
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = `git shortlog -ns | cut -c8-`.split("\n")
9
+ s.authors = [
10
+ 'Matt Jankowski',
11
+ 'Nick Quaranto',
12
+ 'Mike Burns',
13
+ 'Joe Ferris',
14
+ 'Christopher Meiklejohn',
15
+ 'Tammer Saleh',
16
+ 'Gabe Berke-Williams',
17
+ 'Adarsh Pandit',
18
+ 'Cameron Desautels',
19
+ 'Jason Morrison',
20
+ 'Dan Croak',
21
+ 'Ben Orenstein',
22
+ 'Prem Sichanugrist',
23
+ 'Amrit Ayalur',
24
+ 'Geoff Harcourt',
25
+ ]
10
26
  s.email = "support@thoughtbot.com"
11
27
  s.homepage = "https://github.com/thoughtbot/paul_revere"
12
28
  s.summary = "Simple announcement plugin to include `one off` style announcements in Rails web apps."
@@ -17,12 +33,12 @@ Gem::Specification.new do |s|
17
33
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
34
  s.require_paths = ["lib"]
19
35
 
20
- s.add_dependency("rails", ">= 4.1", "< 5.1")
36
+ s.add_dependency("rails", ">= 5.0", "< 6.2")
21
37
 
22
38
  s.add_development_dependency("appraisal", "~> 2.1")
23
- s.add_development_dependency("factory_girl_rails", "~> 4.6")
39
+ s.add_development_dependency("factory_bot_rails", "~> 4.8")
24
40
  s.add_development_dependency("generator_spec", "~> 0.9")
25
- s.add_development_dependency("jasmine", "~> 2.2")
26
- s.add_development_dependency("rspec-rails", "3.5.0.beta4")
41
+ s.add_development_dependency("jasmine", "~> 3.1")
42
+ s.add_development_dependency("rspec-rails", "~> 3.7")
27
43
  s.add_development_dependency("sqlite3", "~> 1.3")
28
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.rc1
4
+ version: 3.2.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: 2016-06-22 00:00:00.000000000 Z
25
+ date: 2021-11-24 00:00:00.000000000 Z
25
26
  dependencies:
26
27
  - !ruby/object:Gem::Dependency
27
28
  name: rails
@@ -29,20 +30,20 @@ dependencies:
29
30
  requirements:
30
31
  - - ">="
31
32
  - !ruby/object:Gem::Version
32
- version: '4.1'
33
+ version: '5.0'
33
34
  - - "<"
34
35
  - !ruby/object:Gem::Version
35
- version: '5.1'
36
+ version: '6.2'
36
37
  type: :runtime
37
38
  prerelease: false
38
39
  version_requirements: !ruby/object:Gem::Requirement
39
40
  requirements:
40
41
  - - ">="
41
42
  - !ruby/object:Gem::Version
42
- version: '4.1'
43
+ version: '5.0'
43
44
  - - "<"
44
45
  - !ruby/object:Gem::Version
45
- version: '5.1'
46
+ version: '6.2'
46
47
  - !ruby/object:Gem::Dependency
47
48
  name: appraisal
48
49
  requirement: !ruby/object:Gem::Requirement
@@ -58,19 +59,19 @@ 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
  - - "~>"
65
66
  - !ruby/object:Gem::Version
66
- version: '4.6'
67
+ version: '4.8'
67
68
  type: :development
68
69
  prerelease: false
69
70
  version_requirements: !ruby/object:Gem::Requirement
70
71
  requirements:
71
72
  - - "~>"
72
73
  - !ruby/object:Gem::Version
73
- version: '4.6'
74
+ version: '4.8'
74
75
  - !ruby/object:Gem::Dependency
75
76
  name: generator_spec
76
77
  requirement: !ruby/object:Gem::Requirement
@@ -91,28 +92,28 @@ dependencies:
91
92
  requirements:
92
93
  - - "~>"
93
94
  - !ruby/object:Gem::Version
94
- version: '2.2'
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.2'
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.0.beta4
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.0.beta4
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
@@ -149,16 +150,19 @@ files:
149
150
  - app/views/announcements/_email_announcement.erb
150
151
  - app/views/announcements/_private_announcement.html.erb
151
152
  - app/views/announcements/_public_announcement.html.erb
152
- - gemfiles/rails_4.1.gemfile
153
- - gemfiles/rails_4.2.gemfile
154
153
  - gemfiles/rails_5.0.gemfile
154
+ - gemfiles/rails_5.1.gemfile
155
+ - gemfiles/rails_5.2.gemfile
156
+ - gemfiles/rails_6.0.gemfile
157
+ - gemfiles/rails_6.1.gemfile
155
158
  - lib/generators/paul_revere/paul_revere_generator.rb
156
159
  - lib/generators/paul_revere/templates/migration.rb
160
+ - lib/generators/paul_revere/views_generator.rb
157
161
  - lib/paul_revere.rb
158
162
  - lib/paul_revere/version.rb
159
163
  - paul_revere.gemspec
164
+ - spec/dummy/application.rb
160
165
  - spec/factories.rb
161
- - spec/fake_app.rb
162
166
  - spec/helpers/announcements_helper_spec.rb
163
167
  - spec/javascripts/announcements_spec.js
164
168
  - spec/javascripts/helpers/.gitkeep
@@ -177,7 +181,7 @@ homepage: https://github.com/thoughtbot/paul_revere
177
181
  licenses:
178
182
  - MIT
179
183
  metadata: {}
180
- post_install_message:
184
+ post_install_message:
181
185
  rdoc_options: []
182
186
  require_paths:
183
187
  - lib
@@ -188,19 +192,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
192
  version: '0'
189
193
  required_rubygems_version: !ruby/object:Gem::Requirement
190
194
  requirements:
191
- - - ">"
195
+ - - ">="
192
196
  - !ruby/object:Gem::Version
193
- version: 1.3.1
197
+ version: '0'
194
198
  requirements: []
195
- rubyforge_project:
196
- rubygems_version: 2.6.3
197
- signing_key:
199
+ rubygems_version: 3.1.2
200
+ signing_key:
198
201
  specification_version: 4
199
202
  summary: Simple announcement plugin to include `one off` style announcements in Rails
200
203
  web apps.
201
204
  test_files:
205
+ - spec/dummy/application.rb
202
206
  - spec/factories.rb
203
- - spec/fake_app.rb
204
207
  - spec/helpers/announcements_helper_spec.rb
205
208
  - spec/javascripts/announcements_spec.js
206
209
  - spec/javascripts/helpers/.gitkeep
@@ -215,4 +218,3 @@ test_files:
215
218
  - spec/views/announcements/_email_announcement.erb_spec.rb
216
219
  - spec/views/announcements/_private_announcement.html.erb_spec.rb
217
220
  - spec/views/announcements/_public_announcement.html.erb_spec.rb
218
- has_rdoc:
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 }