acts-as-messageable 0.4.11 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +1 -0
  3. data/.github/dependabot.yml +8 -0
  4. data/.github/workflows/test.yml +152 -0
  5. data/.rubocop.yml +32 -0
  6. data/.rubocop_todo.yml +75 -0
  7. data/.ruby-version +1 -0
  8. data/Appraisals +35 -11
  9. data/Dockerfile +14 -0
  10. data/Gemfile +22 -9
  11. data/Gemfile.lock +210 -90
  12. data/README.md +31 -14
  13. data/Rakefile +10 -1
  14. data/VERSION +1 -1
  15. data/acts-as-messageable.gemspec +225 -59
  16. data/bin/tapioca +29 -0
  17. data/docker-compose.yml +84 -0
  18. data/gemfiles/rails_3.2.gemfile +22 -10
  19. data/gemfiles/rails_4.2.gemfile +29 -0
  20. data/gemfiles/rails_5.2.gemfile +22 -10
  21. data/gemfiles/rails_6.0.gemfile +22 -10
  22. data/gemfiles/rails_7.0.gemfile +29 -0
  23. data/gemfiles/rails_master.gemfile +29 -0
  24. data/lib/acts-as-messageable.rb +3 -17
  25. data/lib/acts_as_messageable/message.rb +136 -0
  26. data/lib/acts_as_messageable/model.rb +229 -0
  27. data/lib/acts_as_messageable/rails3.rb +46 -0
  28. data/lib/acts_as_messageable/rails4.rb +54 -0
  29. data/lib/acts_as_messageable/rails6.rb +63 -0
  30. data/lib/acts_as_messageable/railtie.rb +12 -0
  31. data/lib/acts_as_messageable/relation.rb +35 -0
  32. data/lib/acts_as_messageable/scopes.rb +53 -0
  33. data/lib/acts_as_messageable.rb +41 -0
  34. data/lib/generators/acts_as_messageable/migration/migration_generator.rb +48 -0
  35. data/lib/generators/{acts-as-messageable → acts_as_messageable}/migration/templates/migration.rb +4 -3
  36. data/lib/generators/acts_as_messageable/migration/templates/migration_indexes.rb +12 -0
  37. data/lib/generators/acts_as_messageable/migration/templates/migration_opened_as_datetime.rb +16 -0
  38. data/lib/generators/{acts-as-messageable → acts_as_messageable}/migration/templates/migration_permanent.rb +2 -1
  39. data/sorbet/config +4 -0
  40. data/sorbet/rbi/annotations/actionpack.rbi +428 -0
  41. data/sorbet/rbi/annotations/actionview.rbi +77 -0
  42. data/sorbet/rbi/annotations/activerecord.rbi +18 -0
  43. data/sorbet/rbi/annotations/activesupport.rbi +52 -0
  44. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  45. data/sorbet/rbi/annotations/railties.rbi +58 -0
  46. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  47. data/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi +23 -0
  48. data/sorbet/rbi/dsl/abstract_controller/caching.rbi +30 -0
  49. data/sorbet/rbi/dsl/abstract_controller/callbacks.rbi +23 -0
  50. data/sorbet/rbi/dsl/abstract_controller/helpers.rbi +23 -0
  51. data/sorbet/rbi/dsl/abstract_controller/rendering.rbi +9 -0
  52. data/sorbet/rbi/dsl/abstract_controller/url_for.rbi +23 -0
  53. data/sorbet/rbi/dsl/action_controller/caching.rbi +29 -0
  54. data/sorbet/rbi/dsl/action_controller/conditional_get.rbi +23 -0
  55. data/sorbet/rbi/dsl/action_controller/content_security_policy.rbi +31 -0
  56. data/sorbet/rbi/dsl/action_controller/data_streaming.rbi +9 -0
  57. data/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi +24 -0
  58. data/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi +30 -0
  59. data/sorbet/rbi/dsl/action_controller/flash.rbi +19 -0
  60. data/sorbet/rbi/dsl/action_controller/form_builder.rbi +19 -0
  61. data/sorbet/rbi/dsl/action_controller/helpers.rbi +36 -0
  62. data/sorbet/rbi/dsl/action_controller/params_wrapper.rbi +23 -0
  63. data/sorbet/rbi/dsl/action_controller/redirecting.rbi +24 -0
  64. data/sorbet/rbi/dsl/action_controller/renderers/all.rbi +24 -0
  65. data/sorbet/rbi/dsl/action_controller/renderers.rbi +23 -0
  66. data/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi +31 -0
  67. data/sorbet/rbi/dsl/action_controller/rescue.rbi +24 -0
  68. data/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi +24 -0
  69. data/sorbet/rbi/dsl/action_controller/url_for.rbi +24 -0
  70. data/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi +23 -0
  71. data/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi +10 -0
  72. data/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi +10 -0
  73. data/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi +9 -0
  74. data/sorbet/rbi/dsl/action_view/helpers.rbi +10 -0
  75. data/sorbet/rbi/dsl/action_view/layouts.rbi +24 -0
  76. data/sorbet/rbi/dsl/action_view/rendering.rbi +9 -0
  77. data/sorbet/rbi/dsl/active_model/attribute_methods.rbi +27 -0
  78. data/sorbet/rbi/dsl/active_model/attributes.rbi +34 -0
  79. data/sorbet/rbi/dsl/active_model/dirty.rbi +28 -0
  80. data/sorbet/rbi/dsl/active_model/serializers/json.rbi +22 -0
  81. data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +22 -0
  82. data/sorbet/rbi/dsl/active_model/validations.rbi +27 -0
  83. data/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi +38 -0
  84. data/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi +32 -0
  85. data/sorbet/rbi/dsl/active_record/attribute_methods.rbi +53 -0
  86. data/sorbet/rbi/dsl/active_record/attributes.rbi +19 -0
  87. data/sorbet/rbi/dsl/active_record/callbacks.rbi +22 -0
  88. data/sorbet/rbi/dsl/active_record/core.rbi +55 -0
  89. data/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi +23 -0
  90. data/sorbet/rbi/dsl/active_record/inheritance.rbi +27 -0
  91. data/sorbet/rbi/dsl/active_record/integration.rbi +32 -0
  92. data/sorbet/rbi/dsl/active_record/locking/optimistic.rbi +22 -0
  93. data/sorbet/rbi/dsl/active_record/model_schema.rbi +52 -0
  94. data/sorbet/rbi/dsl/active_record/nested_attributes.rbi +22 -0
  95. data/sorbet/rbi/dsl/active_record/readonly_attributes.rbi +19 -0
  96. data/sorbet/rbi/dsl/active_record/reflection.rbi +32 -0
  97. data/sorbet/rbi/dsl/active_record/scoping/default.rbi +23 -0
  98. data/sorbet/rbi/dsl/active_record/scoping.rbi +23 -0
  99. data/sorbet/rbi/dsl/active_record/serialization.rbi +22 -0
  100. data/sorbet/rbi/dsl/active_record/signed_id.rbi +22 -0
  101. data/sorbet/rbi/dsl/active_record/test_fixtures.rbi +58 -0
  102. data/sorbet/rbi/dsl/active_record/timestamp.rbi +23 -0
  103. data/sorbet/rbi/dsl/active_record/validations.rbi +28 -0
  104. data/sorbet/rbi/dsl/active_support/actionable_error.rbi +23 -0
  105. data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
  106. data/sorbet/rbi/dsl/active_support/rescuable.rbi +23 -0
  107. data/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi +22 -0
  108. data/sorbet/rbi/gems/actionpack@7.0.4.3.rbi +19265 -0
  109. data/sorbet/rbi/gems/actionview@7.0.4.3.rbi +15482 -0
  110. data/sorbet/rbi/gems/activemodel@7.0.4.3.rbi +6025 -0
  111. data/sorbet/rbi/gems/activerecord@7.0.4.3.rbi +37852 -0
  112. data/sorbet/rbi/gems/activesupport@7.0.4.3.rbi +18788 -0
  113. data/sorbet/rbi/gems/addressable@2.4.0.rbi +8 -0
  114. data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
  115. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  116. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  117. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  118. data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
  119. data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
  120. data/sorbet/rbi/gems/coveralls_reborn@0.27.0.rbi +8 -0
  121. data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
  122. data/sorbet/rbi/gems/descendants_tracker@0.0.4.rbi +8 -0
  123. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  124. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  125. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  126. data/sorbet/rbi/gems/faraday@0.9.2.rbi +964 -0
  127. data/sorbet/rbi/gems/git@1.11.0.rbi +2700 -0
  128. data/sorbet/rbi/gems/github_api@0.16.0.rbi +8 -0
  129. data/sorbet/rbi/gems/hashie@5.0.0.rbi +8 -0
  130. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  131. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  132. data/sorbet/rbi/gems/jeweler@2.3.9.rbi +1591 -0
  133. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  134. data/sorbet/rbi/gems/jwt@2.5.0.rbi +8 -0
  135. data/sorbet/rbi/gems/loofah@2.19.1.rbi +904 -0
  136. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  137. data/sorbet/rbi/gems/mime-types@2.99.3.rbi +8 -0
  138. data/sorbet/rbi/gems/minitest@5.18.0.rbi +1491 -0
  139. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
  140. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +8 -0
  141. data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +8 -0
  142. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  143. data/sorbet/rbi/gems/nokogiri@1.14.2.rbi +7244 -0
  144. data/sorbet/rbi/gems/oauth2@1.4.8.rbi +8 -0
  145. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  146. data/sorbet/rbi/gems/pg@1.4.6.rbi +2574 -0
  147. data/sorbet/rbi/gems/polyfill@1.9.0.rbi +8 -0
  148. data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
  149. data/sorbet/rbi/gems/psych@4.0.6.rbi +1819 -0
  150. data/sorbet/rbi/gems/racc@1.6.2.rbi +155 -0
  151. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +943 -0
  152. data/sorbet/rbi/gems/rack@2.2.6.4.rbi +5659 -0
  153. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +455 -0
  154. data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +685 -0
  155. data/sorbet/rbi/gems/railties@7.0.4.3.rbi +4553 -0
  156. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  157. data/sorbet/rbi/gems/rake@13.0.6.rbi +2959 -0
  158. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  159. data/sorbet/rbi/gems/rbs@2.8.0.rbi +8 -0
  160. data/sorbet/rbi/gems/rchardet@1.8.0.rbi +1078 -0
  161. data/sorbet/rbi/gems/rdoc@6.5.0.rbi +12441 -0
  162. data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +8 -0
  163. data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
  164. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10798 -0
  165. data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
  166. data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5296 -0
  167. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
  168. data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
  169. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
  170. data/sorbet/rbi/gems/safe_type@1.1.1.rbi +8 -0
  171. data/sorbet/rbi/gems/semver2@3.4.2.rbi +8 -0
  172. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  173. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +8 -0
  174. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  175. data/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi +8 -0
  176. data/sorbet/rbi/gems/stringio@3.0.2.rbi +8 -0
  177. data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
  178. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
  179. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  180. data/sorbet/rbi/gems/thread_safe@0.3.6.rbi +8 -0
  181. data/sorbet/rbi/gems/timecop@0.9.6.rbi +361 -0
  182. data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
  183. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
  184. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +8 -0
  185. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
  186. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2553 -0
  187. data/sorbet/rbi/gems/yard@0.9.28.rbi +17954 -0
  188. data/sorbet/rbi/gems/zeitwerk@2.6.7.rbi +966 -0
  189. data/sorbet/rbi/models/acts-as-messageable/message.rbi +668 -0
  190. data/sorbet/rbi/models/acts-as-messageable/user.rbi +343 -0
  191. data/sorbet/rbi/rails-rbi/active_record_base.rbi +119 -0
  192. data/sorbet/rbi/rails-rbi/active_record_relation.rbi +180 -0
  193. data/sorbet/rbi/shims/activerecord.rbi +4 -0
  194. data/sorbet/rbi/shims/model.rbi +9 -0
  195. data/sorbet/tapioca/config.yml +10 -0
  196. data/sorbet/tapioca/pre_require.rb +5 -0
  197. data/sorbet/tapioca/require.rb +10 -0
  198. data/spec/{acts-as-messageable_spec.rb → acts_as_messageable_spec.rb} +80 -5
  199. data/spec/{custom-class_spec.rb → custom_class_spec.rb} +15 -5
  200. data/spec/{custom-required_spec.rb → custom_required_spec.rb} +10 -4
  201. data/spec/{group-messages_spec.rb → group_messages_spec.rb} +5 -2
  202. data/spec/migrations_spec.rb +76 -0
  203. data/spec/spec_helper.rb +44 -41
  204. data/spec/support/admin.rb +5 -0
  205. data/spec/support/custom_message.rb +8 -0
  206. data/spec/support/custom_message_uuid.rb +6 -0
  207. data/spec/support/custom_search_user.rb +8 -0
  208. data/spec/support/men.rb +7 -0
  209. data/spec/support/send_message.rb +10 -1
  210. data/spec/support/table_schema.rb +36 -0
  211. data/spec/support/user.rb +5 -3
  212. data/spec/support/uuid_user.rb +9 -0
  213. data/tasks/types.rake +46 -0
  214. metadata +371 -39
  215. data/.travis.yml +0 -19
  216. data/gemfiles/rails_3.2.gemfile.lock +0 -153
  217. data/gemfiles/rails_4.2.11.gemfile +0 -16
  218. data/gemfiles/rails_4.2.11.gemfile.lock +0 -157
  219. data/gemfiles/rails_5.2.gemfile.lock +0 -155
  220. data/gemfiles/rails_6.0.gemfile.lock +0 -155
  221. data/lib/acts-as-messageable/message.rb +0 -62
  222. data/lib/acts-as-messageable/model.rb +0 -181
  223. data/lib/acts-as-messageable/rails3.rb +0 -19
  224. data/lib/acts-as-messageable/rails4.rb +0 -23
  225. data/lib/acts-as-messageable/railtie.rb +0 -13
  226. data/lib/acts-as-messageable/relation.rb +0 -17
  227. data/lib/acts-as-messageable/scopes.rb +0 -38
  228. data/lib/generators/acts-as-messageable/migration/migration_generator.rb +0 -30
data/Gemfile.lock CHANGED
@@ -1,55 +1,71 @@
1
+ GIT
2
+ remote: https://github.com/Shopify/tapioca.git
3
+ revision: a4319794491b54d9db1c06df7f3bdffcdf7bf684
4
+ specs:
5
+ tapioca (0.11.4)
6
+ bundler (>= 2.2.25)
7
+ netrc (>= 0.11.0)
8
+ parallel (>= 1.21.0)
9
+ rbi (~> 0.0.0, >= 0.0.16)
10
+ sorbet-static-and-runtime (>= 0.5.10187)
11
+ spoom (~> 1.2.0, >= 1.2.0)
12
+ thor (>= 1.2.0)
13
+ yard-sorbet
14
+
1
15
  GEM
2
16
  remote: http://rubygems.org/
3
17
  specs:
4
- actionpack (5.2.3)
5
- actionview (= 5.2.3)
6
- activesupport (= 5.2.3)
7
- rack (~> 2.0)
18
+ actionpack (7.0.4.3)
19
+ actionview (= 7.0.4.3)
20
+ activesupport (= 7.0.4.3)
21
+ rack (~> 2.0, >= 2.2.0)
8
22
  rack-test (>= 0.6.3)
9
23
  rails-dom-testing (~> 2.0)
10
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
11
- actionview (5.2.3)
12
- activesupport (= 5.2.3)
24
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
25
+ actionview (7.0.4.3)
26
+ activesupport (= 7.0.4.3)
13
27
  builder (~> 3.1)
14
28
  erubi (~> 1.4)
15
29
  rails-dom-testing (~> 2.0)
16
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
17
- activemodel (5.2.3)
18
- activesupport (= 5.2.3)
19
- activerecord (5.2.3)
20
- activemodel (= 5.2.3)
21
- activesupport (= 5.2.3)
22
- arel (>= 9.0)
23
- activesupport (5.2.3)
30
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
31
+ activemodel (7.0.4.3)
32
+ activesupport (= 7.0.4.3)
33
+ activerecord (7.0.4.3)
34
+ activemodel (= 7.0.4.3)
35
+ activesupport (= 7.0.4.3)
36
+ activesupport (7.0.4.3)
24
37
  concurrent-ruby (~> 1.0, >= 1.0.2)
25
- i18n (>= 0.7, < 2)
26
- minitest (~> 5.1)
27
- tzinfo (~> 1.1)
38
+ i18n (>= 1.6, < 2)
39
+ minitest (>= 5.1)
40
+ tzinfo (~> 2.0)
28
41
  addressable (2.4.0)
29
- ancestry (3.0.6)
30
- activerecord (>= 3.2.0)
31
- appraisal (2.2.0)
42
+ ancestry (4.3.2)
43
+ activerecord (>= 5.2.6)
44
+ appraisal (2.4.1)
32
45
  bundler
33
46
  rake
34
47
  thor (>= 0.14.0)
35
- arel (9.0.0)
36
- builder (3.2.3)
37
- concurrent-ruby (1.1.5)
38
- coveralls (0.8.23)
39
- json (>= 1.8, < 3)
40
- simplecov (~> 0.16.1)
41
- term-ansicolor (~> 1.3)
42
- thor (>= 0.19.4, < 2.0)
43
- tins (~> 1.6)
44
- crass (1.0.4)
48
+ ast (2.4.2)
49
+ builder (3.2.4)
50
+ coderay (1.1.3)
51
+ commander (4.6.0)
52
+ highline (~> 2.0.0)
53
+ concurrent-ruby (1.2.2)
54
+ coveralls_reborn (0.27.0)
55
+ simplecov (~> 0.22.0)
56
+ term-ansicolor (~> 1.7)
57
+ thor (~> 1.2)
58
+ tins (~> 1.32)
59
+ crass (1.0.6)
45
60
  descendants_tracker (0.0.4)
46
61
  thread_safe (~> 0.3, >= 0.3.1)
47
- diff-lcs (1.3)
48
- docile (1.3.1)
49
- erubi (1.8.0)
62
+ diff-lcs (1.5.0)
63
+ docile (1.4.0)
64
+ erubi (1.12.0)
50
65
  faraday (0.9.2)
51
66
  multipart-post (>= 1.2, < 3)
52
- git (1.5.0)
67
+ git (1.11.0)
68
+ rchardet (~> 1.8)
53
69
  github_api (0.16.0)
54
70
  addressable (~> 2.4.0)
55
71
  descendants_tracker (~> 0.0.4)
@@ -57,9 +73,9 @@ GEM
57
73
  hashie (>= 3.4)
58
74
  mime-types (>= 1.16, < 3.0)
59
75
  oauth2 (~> 1.0)
60
- hashie (3.6.0)
61
- highline (2.0.2)
62
- i18n (1.6.0)
76
+ hashie (5.0.0)
77
+ highline (2.0.3)
78
+ i18n (1.12.0)
63
79
  concurrent-ruby (~> 1.0)
64
80
  jeweler (2.3.9)
65
81
  builder
@@ -72,84 +88,188 @@ GEM
72
88
  rake
73
89
  rdoc
74
90
  semver2
75
- json (2.2.0)
76
- jwt (2.2.1)
77
- loofah (2.2.3)
91
+ json (2.6.3)
92
+ jwt (2.5.0)
93
+ loofah (2.19.1)
78
94
  crass (~> 1.0.2)
79
95
  nokogiri (>= 1.5.9)
80
- method_source (0.9.2)
96
+ method_source (1.0.0)
81
97
  mime-types (2.99.3)
82
- mini_portile2 (2.4.0)
83
- minitest (5.11.3)
84
- multi_json (1.13.1)
98
+ minitest (5.18.0)
99
+ multi_json (1.15.0)
85
100
  multi_xml (0.6.0)
86
- multipart-post (2.1.1)
87
- nokogiri (1.10.3)
88
- mini_portile2 (~> 2.4.0)
89
- oauth2 (1.4.1)
90
- faraday (>= 0.8, < 0.16.0)
101
+ multipart-post (2.2.3)
102
+ netrc (0.11.0)
103
+ nokogiri (1.14.2-x86_64-darwin)
104
+ racc (~> 1.4)
105
+ nokogiri (1.14.2-x86_64-linux)
106
+ racc (~> 1.4)
107
+ oauth2 (1.4.8)
108
+ faraday (>= 0.8, < 3.0)
91
109
  jwt (>= 1.0, < 3.0)
92
110
  multi_json (~> 1.3)
93
111
  multi_xml (~> 0.5)
94
112
  rack (>= 1.2, < 3)
95
- psych (3.1.0)
96
- rack (2.0.7)
97
- rack-test (1.1.0)
98
- rack (>= 1.0, < 3)
113
+ parallel (1.22.1)
114
+ parlour (5.0.0)
115
+ commander (~> 4.5)
116
+ parser
117
+ rainbow (~> 3.0)
118
+ sorbet-runtime (>= 0.5)
119
+ parser (3.2.2.0)
120
+ ast (~> 2.4.1)
121
+ pg (1.4.6)
122
+ polyfill (1.9.0)
123
+ pry (0.14.2)
124
+ coderay (~> 1.1)
125
+ method_source (~> 1.0)
126
+ psych (4.0.6)
127
+ stringio
128
+ racc (1.6.2)
129
+ rack (2.2.6.4)
130
+ rack-test (2.0.2)
131
+ rack (>= 1.3)
99
132
  rails-dom-testing (2.0.3)
100
133
  activesupport (>= 4.2.0)
101
134
  nokogiri (>= 1.6)
102
- rails-html-sanitizer (1.0.4)
103
- loofah (~> 2.2, >= 2.2.2)
104
- railties (5.2.3)
105
- actionpack (= 5.2.3)
106
- activesupport (= 5.2.3)
135
+ rails-html-sanitizer (1.5.0)
136
+ loofah (~> 2.19, >= 2.19.1)
137
+ railties (7.0.4.3)
138
+ actionpack (= 7.0.4.3)
139
+ activesupport (= 7.0.4.3)
107
140
  method_source
108
- rake (>= 0.8.7)
109
- thor (>= 0.19.0, < 2.0)
110
- rake (12.3.2)
111
- rdoc (6.1.1)
112
- rspec (3.8.0)
113
- rspec-core (~> 3.8.0)
114
- rspec-expectations (~> 3.8.0)
115
- rspec-mocks (~> 3.8.0)
116
- rspec-core (3.8.0)
117
- rspec-support (~> 3.8.0)
118
- rspec-expectations (3.8.3)
141
+ rake (>= 12.2)
142
+ thor (~> 1.0)
143
+ zeitwerk (~> 2.5)
144
+ rainbow (3.1.1)
145
+ rake (13.0.6)
146
+ rbi (0.0.16)
147
+ ast
148
+ parser (>= 2.6.4.0)
149
+ sorbet-runtime (>= 0.5.9204)
150
+ unparser
151
+ rbs (2.8.0)
152
+ rchardet (1.8.0)
153
+ rdoc (6.5.0)
154
+ psych (>= 4.0.0)
155
+ regexp_parser (2.7.0)
156
+ rexml (3.2.5)
157
+ rspec (3.12.0)
158
+ rspec-core (~> 3.12.0)
159
+ rspec-expectations (~> 3.12.0)
160
+ rspec-mocks (~> 3.12.0)
161
+ rspec-core (3.12.0)
162
+ rspec-support (~> 3.12.0)
163
+ rspec-expectations (3.12.0)
119
164
  diff-lcs (>= 1.2.0, < 2.0)
120
- rspec-support (~> 3.8.0)
121
- rspec-mocks (3.8.0)
165
+ rspec-support (~> 3.12.0)
166
+ rspec-mocks (3.12.0)
122
167
  diff-lcs (>= 1.2.0, < 2.0)
123
- rspec-support (~> 3.8.0)
124
- rspec-support (3.8.0)
168
+ rspec-support (~> 3.12.0)
169
+ rspec-support (3.12.0)
170
+ rubocop (1.49.0)
171
+ json (~> 2.3)
172
+ parallel (~> 1.10)
173
+ parser (>= 3.2.0.0)
174
+ rainbow (>= 2.2.2, < 4.0)
175
+ regexp_parser (>= 1.8, < 3.0)
176
+ rexml (>= 3.2.5, < 4.0)
177
+ rubocop-ast (>= 1.28.0, < 2.0)
178
+ ruby-progressbar (~> 1.7)
179
+ unicode-display_width (>= 2.4.0, < 3.0)
180
+ rubocop-ast (1.28.0)
181
+ parser (>= 3.2.1.0)
182
+ rubocop-sorbet (0.7.0)
183
+ rubocop (>= 0.90.0)
184
+ ruby-progressbar (1.13.0)
185
+ safe_type (1.1.1)
125
186
  semver2 (3.4.2)
126
- simplecov (0.16.1)
187
+ simplecov (0.22.0)
127
188
  docile (~> 1.1)
128
- json (>= 1.8, < 3)
129
- simplecov-html (~> 0.10.0)
130
- simplecov-html (0.10.2)
131
- sqlite3 (1.4.1)
189
+ simplecov-html (~> 0.11)
190
+ simplecov_json_formatter (~> 0.1)
191
+ simplecov-html (0.12.3)
192
+ simplecov_json_formatter (0.1.4)
193
+ sorbet (0.5.10751)
194
+ sorbet-static (= 0.5.10751)
195
+ sorbet-coerce (0.7.0)
196
+ polyfill (~> 1.8)
197
+ safe_type (~> 1.1, >= 1.1.1)
198
+ sorbet-runtime (>= 0.4.4704)
199
+ sorbet-rails (0.7.34)
200
+ method_source (>= 0.9.2)
201
+ parlour (>= 4.0.1)
202
+ parser (>= 2.7)
203
+ sorbet-coerce (>= 0.2.6)
204
+ sorbet-runtime (>= 0.5.9892)
205
+ sorbet-runtime (0.5.10751)
206
+ sorbet-static (0.5.10751-universal-darwin-19)
207
+ sorbet-static (0.5.10751-universal-darwin-21)
208
+ sorbet-static (0.5.10751-x86_64-linux)
209
+ sorbet-static-and-runtime (0.5.10751)
210
+ sorbet (= 0.5.10751)
211
+ sorbet-runtime (= 0.5.10751)
212
+ sord (5.0.0)
213
+ commander (~> 4.5)
214
+ parlour (~> 5.0)
215
+ rbs (~> 2.0)
216
+ sorbet-runtime
217
+ yard
218
+ spoom (1.2.1)
219
+ sorbet (>= 0.5.10187)
220
+ sorbet-runtime (>= 0.5.9204)
221
+ thor (>= 0.19.2)
222
+ sqlite3 (1.6.2-x86_64-darwin)
223
+ sqlite3 (1.6.2-x86_64-linux)
224
+ stringio (3.0.2)
225
+ sync (0.5.0)
132
226
  term-ansicolor (1.7.1)
133
227
  tins (~> 1.0)
134
- thor (0.20.3)
228
+ thor (1.2.1)
135
229
  thread_safe (0.3.6)
136
- tins (1.20.3)
137
- tzinfo (1.2.5)
138
- thread_safe (~> 0.1)
230
+ timecop (0.9.6)
231
+ tins (1.32.1)
232
+ sync
233
+ tzinfo (2.0.6)
234
+ concurrent-ruby (~> 1.0)
235
+ unicode-display_width (2.4.2)
236
+ unparser (0.6.7)
237
+ diff-lcs (~> 1.3)
238
+ parser (>= 3.2.0)
239
+ webrick (1.7.0)
240
+ yard (0.9.28)
241
+ webrick (~> 1.7.0)
242
+ yard-sorbet (0.8.1)
243
+ sorbet-runtime (>= 0.5)
244
+ yard (>= 0.9)
245
+ zeitwerk (2.6.7)
139
246
 
140
247
  PLATFORMS
141
- ruby
248
+ x86_64-darwin-19
249
+ x86_64-darwin-21
250
+ x86_64-linux
142
251
 
143
252
  DEPENDENCIES
144
- activerecord (>= 3.0.0)
145
- activesupport (>= 3.0.0)
146
- ancestry (>= 1.3.0)
253
+ activerecord
254
+ activesupport
255
+ ancestry
147
256
  appraisal
148
- coveralls
257
+ coveralls_reborn
149
258
  jeweler
150
- railties (>= 3.0.0)
259
+ pg
260
+ pry
261
+ railties
151
262
  rspec
263
+ rubocop
264
+ rubocop-sorbet
265
+ sorbet-rails
266
+ sorbet-static-and-runtime
267
+ sord
152
268
  sqlite3
269
+ tapioca!
270
+ timecop
271
+ unparser
272
+ yard
153
273
 
154
274
  BUNDLED WITH
155
- 2.0.1
275
+ 2.2.30
data/README.md CHANGED
@@ -2,8 +2,7 @@ ActsAsMessageable
2
2
  =================
3
3
 
4
4
  The Acts As Messageable allows communication between the models.
5
-
6
- [![Build Status](https://secure.travis-ci.org/LTe/acts-as-messageable.png)](http://travis-ci.org/LTe/acts-as-messageable)
5
+ [![Build Status](https://github.com/LTe/acts-as-messageable/actions/workflows/test.yml/badge.svg)](https://github.com/LTe/acts-as-messageable/actions/workflows/test.yml)
7
6
  [![Code Climate](https://codeclimate.com/github/LTe/acts-as-messageable.png)](https://codeclimate.com/github/LTe/acts-as-messageable)
8
7
  [![Coverage Status](https://coveralls.io/repos/LTe/acts-as-messageable/badge.png?branch=master)](https://coveralls.io/r/LTe/acts-as-messageable?branch=master)
9
8
  [![Gem Version](https://badge.fury.io/rb/acts-as-messageable.png)](http://badge.fury.io/rb/acts-as-messageable)
@@ -33,20 +32,45 @@ Post installation
33
32
  =================
34
33
 
35
34
  ```
36
- rails g acts-as-messageable:migration table_name # default 'messages'
35
+ rails g acts_as_messageable:migration [messages] [--uuid]
37
36
  rake db:migrate
38
37
  ```
39
38
 
39
+ You need to run migration generator to create tables in database. You can do this with `acts_as_messageable:migration`
40
+ generator. Default table name is `messages`, you can pass table name and uuid option to enable `uuid` support (by
41
+ default disabled). UUID support is required in case when your user primary key is `uuid` type.
42
+
43
+ **Create `messages` table without `uuid` support**
44
+ ```
45
+ rails g acts_as_messageable:migration
46
+ ```
47
+
48
+ **Create `messages` table with `uuid` support**
49
+ ```
50
+ rails g acts_as_messageable:migration --uuid
51
+ ```
52
+
53
+ **Create `my_messages` table without `uuid` support**
54
+ ```
55
+ rails g acts_as_messageable:migration my_messages
56
+ ```
57
+
58
+ **Create `my_messages` table with `uuid` support**
59
+ ```
60
+ rails g acts_as_messageable:migration my_messages --uuid
61
+ ```
62
+
40
63
  Usage
41
64
  =====
42
65
 
43
66
  ```ruby
44
67
  class User < ActiveRecord::Base
45
68
  acts_as_messageable :table_name => "table_with_messages", # default 'messages'
46
- :required => :body # default [:topic, :body]
47
- :class_name => "CustomMessages" # default "ActsAsMessageable::Message",
48
- :dependent => :destroy # default :nullify
49
- :group_messages => true # default false
69
+ :required => :body, # default [:topic, :body]
70
+ :class_name => "CustomMessages", # default "ActsAsMessageable::Message",
71
+ :dependent => :destroy, # default :nullify
72
+ :group_messages => true, # default false
73
+ :search_scope => :custom_search # default :search
50
74
  end
51
75
  ```
52
76
 
@@ -227,7 +251,6 @@ records = @alice.messages.search("Search me") @alice search text "Search me" fr
227
251
  ```
228
252
 
229
253
  ## Filters
230
- ==========
231
254
 
232
255
  ```ruby
233
256
  @alice.messages.are_from(@bob) # all message from @bob
@@ -351,9 +374,3 @@ Search
351
374
  ```ruby
352
375
  @alice.messages.search("Search me") @alice seach text "Search me" from all messages
353
376
  ```
354
-
355
- Copyright © 2011-2012 Piotr Niełacny (http://ruby-blog.pl), released under the MIT license
356
-
357
-
358
- [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/LTe/acts-as-messageable/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
359
-
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require 'bundler'
3
5
  begin
@@ -8,17 +10,21 @@ rescue Bundler::BundlerError => e
8
10
  exit e.status_code
9
11
  end
10
12
  require 'rake'
11
-
13
+ require 'rubocop/rake_task'
12
14
  require 'jeweler'
15
+
13
16
  Jeweler::Tasks.new do |gem|
14
17
  gem.name = 'acts-as-messageable'
15
18
  gem.email = 'piotr.nielacny@gmail.com'
16
19
  gem.summary = 'Make user messageable!;-)'
17
20
  gem.homepage = 'http://github.com/LTe/acts-as-messageable'
18
21
  gem.authors = ['Piotr Nielacny']
22
+ gem.metadata = { 'rubygems_mfa_required' => true }
19
23
  # dependencies defined in Gemfile
20
24
  end
25
+
21
26
  Jeweler::RubygemsDotOrgTasks.new
27
+ RuboCop::RakeTask.new
22
28
 
23
29
  require 'rspec/core'
24
30
  require 'rspec/core/rake_task'
@@ -27,4 +33,7 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
27
33
  spec.pattern = FileList['spec/**/*_spec.rb']
28
34
  end
29
35
 
36
+ path = File.expand_path(__dir__)
37
+ Dir.glob("#{path}/tasks/**/*.rake").each { |f| import f }
38
+
30
39
  task default: :spec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.11
1
+ 1.0.0