simple_discussion 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +44 -0
  3. data/Appraisals +16 -0
  4. data/CHANGELOG.md +10 -0
  5. data/Gemfile +8 -1
  6. data/README.md +5 -3
  7. data/Rakefile +25 -3
  8. data/app/controllers/simple_discussion/application_controller.rb +1 -1
  9. data/app/controllers/simple_discussion/forum_categories_controller.rb +5 -5
  10. data/app/controllers/simple_discussion/forum_posts_controller.rb +12 -12
  11. data/app/controllers/simple_discussion/forum_threads_controller.rb +9 -9
  12. data/app/controllers/simple_discussion/notifications_controller.rb +3 -3
  13. data/app/helpers/simple_discussion/forum_posts_helper.rb +7 -1
  14. data/app/helpers/simple_discussion/forum_threads_helper.rb +4 -4
  15. data/app/jobs/simple_discussion/forum_post_notification_job.rb +3 -3
  16. data/app/jobs/simple_discussion/forum_thread_notification_job.rb +2 -2
  17. data/app/mailers/simple_discussion/user_mailer.rb +4 -4
  18. data/app/models/forum_category.rb +1 -1
  19. data/app/models/forum_post.rb +1 -2
  20. data/app/models/forum_subscription.rb +4 -4
  21. data/app/models/forum_thread.rb +12 -12
  22. data/app/views/simple_discussion/forum_posts/_forum_post.html.erb +1 -1
  23. data/bin/rails +14 -0
  24. data/config/locales/en.yml +1 -0
  25. data/db/migrate/20170417012930_create_forum_categories.rb +5 -5
  26. data/db/migrate/20170417012932_create_forum_posts.rb +2 -2
  27. data/db/migrate/20170417012933_create_forum_subscriptions.rb +1 -1
  28. data/gemfiles/.bundle/config +2 -0
  29. data/gemfiles/rails_5_2.gemfile +12 -0
  30. data/gemfiles/rails_5_2.gemfile.lock +191 -0
  31. data/gemfiles/rails_6.gemfile +12 -0
  32. data/gemfiles/rails_6.gemfile.lock +207 -0
  33. data/gemfiles/rails_6_1.gemfile +12 -0
  34. data/gemfiles/rails_6_1.gemfile.lock +210 -0
  35. data/gemfiles/rails_master.gemfile +12 -0
  36. data/gemfiles/rails_master.gemfile.lock +222 -0
  37. data/lib/generators/simple_discussion/controllers_generator.rb +2 -2
  38. data/lib/generators/simple_discussion/helpers_generator.rb +2 -2
  39. data/lib/generators/simple_discussion/views_generator.rb +2 -2
  40. data/lib/simple_discussion.rb +8 -9
  41. data/lib/simple_discussion/engine.rb +1 -1
  42. data/lib/simple_discussion/slack.rb +6 -6
  43. data/lib/simple_discussion/version.rb +1 -1
  44. data/lib/simple_discussion/will_paginate.rb +12 -12
  45. data/simple_discussion.gemspec +15 -17
  46. metadata +17 -19
@@ -15,7 +15,7 @@
15
15
  class: "text-muted",
16
16
  method: :delete,
17
17
  data: { toggle: "tooltip", placement: "left", confirm: "Are you sure you want to delete this post?" },
18
- title: t('edit_this_post')
18
+ title: t('delete_this_post')
19
19
  %>
20
20
  </div>
21
21
  <% end %>
data/bin/rails ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails gems
3
+ # installed from the root of your application.
4
+
5
+ ENGINE_ROOT = File.expand_path('..', __dir__)
6
+ ENGINE_PATH = File.expand_path('../lib/pay/engine', __dir__)
7
+ APP_PATH = File.expand_path('../test/dummy/config/application', __dir__)
8
+
9
+ # Set up gems listed in the Gemfile.
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
11
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
12
+
13
+ require 'rails/all'
14
+ require 'rails/engine/commands'
@@ -8,6 +8,7 @@ en:
8
8
  commented_on: Commented on
9
9
  community: Community
10
10
  edit_this_post: Edit this post
11
+ delete_this_post: Delete this post
11
12
  edit_this_thread: Edit this thread
12
13
  edit_thread: Edit thread
13
14
  filters: Filters
@@ -1,9 +1,9 @@
1
1
  class CreateForumCategories < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :forum_categories do |t|
4
- t.string :name, null: false
5
- t.string :slug, null: false
6
- t.string :color, default: "000000"
4
+ t.string :name, null: false
5
+ t.string :slug, null: false
6
+ t.string :color, default: "000000"
7
7
 
8
8
  t.timestamps
9
9
  end
@@ -12,12 +12,12 @@ class CreateForumCategories < ActiveRecord::Migration[4.2]
12
12
 
13
13
  ForumCategory.create(
14
14
  name: "General",
15
- color: "#4ea1d3",
15
+ color: "#4ea1d3"
16
16
  )
17
17
 
18
18
  ForumCategory.create(
19
19
  name: "Feedback",
20
- color: "#16bc9c",
20
+ color: "#16bc9c"
21
21
  )
22
22
  end
23
23
  end
@@ -3,8 +3,8 @@ class CreateForumPosts < ActiveRecord::Migration[4.2]
3
3
  create_table :forum_posts do |t|
4
4
  t.references :forum_thread, foreign_key: true
5
5
  t.references :user, foreign_key: true
6
- t.text :body
7
- t.boolean :solved, default: false
6
+ t.text :body
7
+ t.boolean :solved, default: false
8
8
 
9
9
  t.timestamps
10
10
  end
@@ -3,7 +3,7 @@ class CreateForumSubscriptions < ActiveRecord::Migration[4.2]
3
3
  create_table :forum_subscriptions do |t|
4
4
  t.references :forum_thread, foreign_key: true
5
5
  t.references :user, foreign_key: true
6
- t.string :subscription_type
6
+ t.string :subscription_type
7
7
 
8
8
  t.timestamps
9
9
  end
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_RETRY: "1"
@@ -0,0 +1,12 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "standardrb"
7
+ gem "devise"
8
+ gem "puma"
9
+ gem "sqlite3"
10
+ gem "rails", "~> 5.2.0"
11
+
12
+ gemspec path: "../"
@@ -0,0 +1,191 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ simple_discussion (1.3.0)
5
+ font-awesome-sass (>= 5.13.0)
6
+ friendly_id (>= 5.2.0)
7
+ rails (>= 4.2)
8
+ will_paginate (>= 3.1.0)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actioncable (5.2.5)
14
+ actionpack (= 5.2.5)
15
+ nio4r (~> 2.0)
16
+ websocket-driver (>= 0.6.1)
17
+ actionmailer (5.2.5)
18
+ actionpack (= 5.2.5)
19
+ actionview (= 5.2.5)
20
+ activejob (= 5.2.5)
21
+ mail (~> 2.5, >= 2.5.4)
22
+ rails-dom-testing (~> 2.0)
23
+ actionpack (5.2.5)
24
+ actionview (= 5.2.5)
25
+ activesupport (= 5.2.5)
26
+ rack (~> 2.0, >= 2.0.8)
27
+ rack-test (>= 0.6.3)
28
+ rails-dom-testing (~> 2.0)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
+ actionview (5.2.5)
31
+ activesupport (= 5.2.5)
32
+ builder (~> 3.1)
33
+ erubi (~> 1.4)
34
+ rails-dom-testing (~> 2.0)
35
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
36
+ activejob (5.2.5)
37
+ activesupport (= 5.2.5)
38
+ globalid (>= 0.3.6)
39
+ activemodel (5.2.5)
40
+ activesupport (= 5.2.5)
41
+ activerecord (5.2.5)
42
+ activemodel (= 5.2.5)
43
+ activesupport (= 5.2.5)
44
+ arel (>= 9.0)
45
+ activestorage (5.2.5)
46
+ actionpack (= 5.2.5)
47
+ activerecord (= 5.2.5)
48
+ marcel (~> 1.0.0)
49
+ activesupport (5.2.5)
50
+ concurrent-ruby (~> 1.0, >= 1.0.2)
51
+ i18n (>= 0.7, < 2)
52
+ minitest (~> 5.1)
53
+ tzinfo (~> 1.1)
54
+ appraisal (2.4.0)
55
+ bundler
56
+ rake
57
+ thor (>= 0.14.0)
58
+ arel (9.0.0)
59
+ ast (2.4.2)
60
+ bcrypt (3.1.16)
61
+ builder (3.2.4)
62
+ concurrent-ruby (1.1.8)
63
+ crass (1.0.6)
64
+ devise (4.7.3)
65
+ bcrypt (~> 3.0)
66
+ orm_adapter (~> 0.1)
67
+ railties (>= 4.1.0)
68
+ responders
69
+ warden (~> 1.2.3)
70
+ erubi (1.10.0)
71
+ ffi (1.15.0)
72
+ font-awesome-sass (5.15.1)
73
+ sassc (>= 1.11)
74
+ friendly_id (5.4.2)
75
+ activerecord (>= 4.0.0)
76
+ globalid (0.4.2)
77
+ activesupport (>= 4.2.0)
78
+ i18n (1.8.10)
79
+ concurrent-ruby (~> 1.0)
80
+ loofah (2.9.0)
81
+ crass (~> 1.0.2)
82
+ nokogiri (>= 1.5.9)
83
+ mail (2.7.1)
84
+ mini_mime (>= 0.1.1)
85
+ marcel (1.0.0)
86
+ method_source (1.0.0)
87
+ mini_mime (1.0.3)
88
+ minitest (5.14.4)
89
+ nio4r (2.5.7)
90
+ nokogiri (1.11.2-x86_64-darwin)
91
+ racc (~> 1.4)
92
+ nokogiri (1.11.2-x86_64-linux)
93
+ racc (~> 1.4)
94
+ orm_adapter (0.5.0)
95
+ parallel (1.20.1)
96
+ parser (3.0.0.0)
97
+ ast (~> 2.4.1)
98
+ puma (5.2.2)
99
+ nio4r (~> 2.0)
100
+ racc (1.5.2)
101
+ rack (2.2.3)
102
+ rack-test (1.1.0)
103
+ rack (>= 1.0, < 3)
104
+ rails (5.2.5)
105
+ actioncable (= 5.2.5)
106
+ actionmailer (= 5.2.5)
107
+ actionpack (= 5.2.5)
108
+ actionview (= 5.2.5)
109
+ activejob (= 5.2.5)
110
+ activemodel (= 5.2.5)
111
+ activerecord (= 5.2.5)
112
+ activestorage (= 5.2.5)
113
+ activesupport (= 5.2.5)
114
+ bundler (>= 1.3.0)
115
+ railties (= 5.2.5)
116
+ sprockets-rails (>= 2.0.0)
117
+ rails-dom-testing (2.0.3)
118
+ activesupport (>= 4.2.0)
119
+ nokogiri (>= 1.6)
120
+ rails-html-sanitizer (1.3.0)
121
+ loofah (~> 2.3)
122
+ railties (5.2.5)
123
+ actionpack (= 5.2.5)
124
+ activesupport (= 5.2.5)
125
+ method_source
126
+ rake (>= 0.8.7)
127
+ thor (>= 0.19.0, < 2.0)
128
+ rainbow (3.0.0)
129
+ rake (13.0.3)
130
+ regexp_parser (2.1.1)
131
+ responders (3.0.1)
132
+ actionpack (>= 5.0)
133
+ railties (>= 5.0)
134
+ rexml (3.2.4)
135
+ rubocop (1.11.0)
136
+ parallel (~> 1.10)
137
+ parser (>= 3.0.0.0)
138
+ rainbow (>= 2.2.2, < 4.0)
139
+ regexp_parser (>= 1.8, < 3.0)
140
+ rexml
141
+ rubocop-ast (>= 1.2.0, < 2.0)
142
+ ruby-progressbar (~> 1.7)
143
+ unicode-display_width (>= 1.4.0, < 3.0)
144
+ rubocop-ast (1.4.1)
145
+ parser (>= 2.7.1.5)
146
+ rubocop-performance (1.10.1)
147
+ rubocop (>= 0.90.0, < 2.0)
148
+ rubocop-ast (>= 0.4.0)
149
+ ruby-progressbar (1.11.0)
150
+ sassc (2.4.0)
151
+ ffi (~> 1.9)
152
+ sprockets (4.0.2)
153
+ concurrent-ruby (~> 1.0)
154
+ rack (> 1, < 3)
155
+ sprockets-rails (3.2.2)
156
+ actionpack (>= 4.0)
157
+ activesupport (>= 4.0)
158
+ sprockets (>= 3.0.0)
159
+ sqlite3 (1.4.2)
160
+ standard (1.0.4)
161
+ rubocop (= 1.11.0)
162
+ rubocop-performance (= 1.10.1)
163
+ standardrb (1.0.0)
164
+ standard
165
+ thor (1.1.0)
166
+ thread_safe (0.3.6)
167
+ tzinfo (1.2.9)
168
+ thread_safe (~> 0.1)
169
+ unicode-display_width (2.0.0)
170
+ warden (1.2.9)
171
+ rack (>= 2.0.9)
172
+ websocket-driver (0.7.3)
173
+ websocket-extensions (>= 0.1.0)
174
+ websocket-extensions (0.1.5)
175
+ will_paginate (3.3.0)
176
+
177
+ PLATFORMS
178
+ x86_64-darwin-20
179
+ x86_64-linux
180
+
181
+ DEPENDENCIES
182
+ appraisal
183
+ devise
184
+ puma
185
+ rails (~> 5.2.0)
186
+ simple_discussion!
187
+ sqlite3
188
+ standardrb
189
+
190
+ BUNDLED WITH
191
+ 2.2.15
@@ -0,0 +1,12 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "standardrb"
7
+ gem "devise"
8
+ gem "puma"
9
+ gem "sqlite3"
10
+ gem "rails", "~> 6.0.0"
11
+
12
+ gemspec path: "../"
@@ -0,0 +1,207 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ simple_discussion (1.3.0)
5
+ font-awesome-sass (>= 5.13.0)
6
+ friendly_id (>= 5.2.0)
7
+ rails (>= 4.2)
8
+ will_paginate (>= 3.1.0)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actioncable (6.0.3.6)
14
+ actionpack (= 6.0.3.6)
15
+ nio4r (~> 2.0)
16
+ websocket-driver (>= 0.6.1)
17
+ actionmailbox (6.0.3.6)
18
+ actionpack (= 6.0.3.6)
19
+ activejob (= 6.0.3.6)
20
+ activerecord (= 6.0.3.6)
21
+ activestorage (= 6.0.3.6)
22
+ activesupport (= 6.0.3.6)
23
+ mail (>= 2.7.1)
24
+ actionmailer (6.0.3.6)
25
+ actionpack (= 6.0.3.6)
26
+ actionview (= 6.0.3.6)
27
+ activejob (= 6.0.3.6)
28
+ mail (~> 2.5, >= 2.5.4)
29
+ rails-dom-testing (~> 2.0)
30
+ actionpack (6.0.3.6)
31
+ actionview (= 6.0.3.6)
32
+ activesupport (= 6.0.3.6)
33
+ rack (~> 2.0, >= 2.0.8)
34
+ rack-test (>= 0.6.3)
35
+ rails-dom-testing (~> 2.0)
36
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
+ actiontext (6.0.3.6)
38
+ actionpack (= 6.0.3.6)
39
+ activerecord (= 6.0.3.6)
40
+ activestorage (= 6.0.3.6)
41
+ activesupport (= 6.0.3.6)
42
+ nokogiri (>= 1.8.5)
43
+ actionview (6.0.3.6)
44
+ activesupport (= 6.0.3.6)
45
+ builder (~> 3.1)
46
+ erubi (~> 1.4)
47
+ rails-dom-testing (~> 2.0)
48
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
+ activejob (6.0.3.6)
50
+ activesupport (= 6.0.3.6)
51
+ globalid (>= 0.3.6)
52
+ activemodel (6.0.3.6)
53
+ activesupport (= 6.0.3.6)
54
+ activerecord (6.0.3.6)
55
+ activemodel (= 6.0.3.6)
56
+ activesupport (= 6.0.3.6)
57
+ activestorage (6.0.3.6)
58
+ actionpack (= 6.0.3.6)
59
+ activejob (= 6.0.3.6)
60
+ activerecord (= 6.0.3.6)
61
+ marcel (~> 1.0.0)
62
+ activesupport (6.0.3.6)
63
+ concurrent-ruby (~> 1.0, >= 1.0.2)
64
+ i18n (>= 0.7, < 2)
65
+ minitest (~> 5.1)
66
+ tzinfo (~> 1.1)
67
+ zeitwerk (~> 2.2, >= 2.2.2)
68
+ appraisal (2.4.0)
69
+ bundler
70
+ rake
71
+ thor (>= 0.14.0)
72
+ ast (2.4.2)
73
+ bcrypt (3.1.16)
74
+ builder (3.2.4)
75
+ concurrent-ruby (1.1.8)
76
+ crass (1.0.6)
77
+ devise (4.7.3)
78
+ bcrypt (~> 3.0)
79
+ orm_adapter (~> 0.1)
80
+ railties (>= 4.1.0)
81
+ responders
82
+ warden (~> 1.2.3)
83
+ erubi (1.10.0)
84
+ ffi (1.15.0)
85
+ font-awesome-sass (5.15.1)
86
+ sassc (>= 1.11)
87
+ friendly_id (5.4.2)
88
+ activerecord (>= 4.0.0)
89
+ globalid (0.4.2)
90
+ activesupport (>= 4.2.0)
91
+ i18n (1.8.10)
92
+ concurrent-ruby (~> 1.0)
93
+ loofah (2.9.0)
94
+ crass (~> 1.0.2)
95
+ nokogiri (>= 1.5.9)
96
+ mail (2.7.1)
97
+ mini_mime (>= 0.1.1)
98
+ marcel (1.0.0)
99
+ method_source (1.0.0)
100
+ mini_mime (1.0.3)
101
+ minitest (5.14.4)
102
+ nio4r (2.5.7)
103
+ nokogiri (1.11.2-x86_64-darwin)
104
+ racc (~> 1.4)
105
+ nokogiri (1.11.2-x86_64-linux)
106
+ racc (~> 1.4)
107
+ orm_adapter (0.5.0)
108
+ parallel (1.20.1)
109
+ parser (3.0.0.0)
110
+ ast (~> 2.4.1)
111
+ puma (5.2.2)
112
+ nio4r (~> 2.0)
113
+ racc (1.5.2)
114
+ rack (2.2.3)
115
+ rack-test (1.1.0)
116
+ rack (>= 1.0, < 3)
117
+ rails (6.0.3.6)
118
+ actioncable (= 6.0.3.6)
119
+ actionmailbox (= 6.0.3.6)
120
+ actionmailer (= 6.0.3.6)
121
+ actionpack (= 6.0.3.6)
122
+ actiontext (= 6.0.3.6)
123
+ actionview (= 6.0.3.6)
124
+ activejob (= 6.0.3.6)
125
+ activemodel (= 6.0.3.6)
126
+ activerecord (= 6.0.3.6)
127
+ activestorage (= 6.0.3.6)
128
+ activesupport (= 6.0.3.6)
129
+ bundler (>= 1.3.0)
130
+ railties (= 6.0.3.6)
131
+ sprockets-rails (>= 2.0.0)
132
+ rails-dom-testing (2.0.3)
133
+ activesupport (>= 4.2.0)
134
+ nokogiri (>= 1.6)
135
+ rails-html-sanitizer (1.3.0)
136
+ loofah (~> 2.3)
137
+ railties (6.0.3.6)
138
+ actionpack (= 6.0.3.6)
139
+ activesupport (= 6.0.3.6)
140
+ method_source
141
+ rake (>= 0.8.7)
142
+ thor (>= 0.20.3, < 2.0)
143
+ rainbow (3.0.0)
144
+ rake (13.0.3)
145
+ regexp_parser (2.1.1)
146
+ responders (3.0.1)
147
+ actionpack (>= 5.0)
148
+ railties (>= 5.0)
149
+ rexml (3.2.4)
150
+ rubocop (1.11.0)
151
+ parallel (~> 1.10)
152
+ parser (>= 3.0.0.0)
153
+ rainbow (>= 2.2.2, < 4.0)
154
+ regexp_parser (>= 1.8, < 3.0)
155
+ rexml
156
+ rubocop-ast (>= 1.2.0, < 2.0)
157
+ ruby-progressbar (~> 1.7)
158
+ unicode-display_width (>= 1.4.0, < 3.0)
159
+ rubocop-ast (1.4.1)
160
+ parser (>= 2.7.1.5)
161
+ rubocop-performance (1.10.1)
162
+ rubocop (>= 0.90.0, < 2.0)
163
+ rubocop-ast (>= 0.4.0)
164
+ ruby-progressbar (1.11.0)
165
+ sassc (2.4.0)
166
+ ffi (~> 1.9)
167
+ sprockets (4.0.2)
168
+ concurrent-ruby (~> 1.0)
169
+ rack (> 1, < 3)
170
+ sprockets-rails (3.2.2)
171
+ actionpack (>= 4.0)
172
+ activesupport (>= 4.0)
173
+ sprockets (>= 3.0.0)
174
+ sqlite3 (1.4.2)
175
+ standard (1.0.4)
176
+ rubocop (= 1.11.0)
177
+ rubocop-performance (= 1.10.1)
178
+ standardrb (1.0.0)
179
+ standard
180
+ thor (1.1.0)
181
+ thread_safe (0.3.6)
182
+ tzinfo (1.2.9)
183
+ thread_safe (~> 0.1)
184
+ unicode-display_width (2.0.0)
185
+ warden (1.2.9)
186
+ rack (>= 2.0.9)
187
+ websocket-driver (0.7.3)
188
+ websocket-extensions (>= 0.1.0)
189
+ websocket-extensions (0.1.5)
190
+ will_paginate (3.3.0)
191
+ zeitwerk (2.4.2)
192
+
193
+ PLATFORMS
194
+ x86_64-darwin-20
195
+ x86_64-linux
196
+
197
+ DEPENDENCIES
198
+ appraisal
199
+ devise
200
+ puma
201
+ rails (~> 6.0.0)
202
+ simple_discussion!
203
+ sqlite3
204
+ standardrb
205
+
206
+ BUNDLED WITH
207
+ 2.2.15