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.
- checksums.yaml +4 -4
- data/.dockerignore +1 -0
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/test.yml +152 -0
- data/.rubocop.yml +32 -0
- data/.rubocop_todo.yml +75 -0
- data/.ruby-version +1 -0
- data/Appraisals +35 -11
- data/Dockerfile +14 -0
- data/Gemfile +22 -9
- data/Gemfile.lock +210 -90
- data/README.md +31 -14
- data/Rakefile +10 -1
- data/VERSION +1 -1
- data/acts-as-messageable.gemspec +225 -59
- data/bin/tapioca +29 -0
- data/docker-compose.yml +84 -0
- data/gemfiles/rails_3.2.gemfile +22 -10
- data/gemfiles/rails_4.2.gemfile +29 -0
- data/gemfiles/rails_5.2.gemfile +22 -10
- data/gemfiles/rails_6.0.gemfile +22 -10
- data/gemfiles/rails_7.0.gemfile +29 -0
- data/gemfiles/rails_master.gemfile +29 -0
- data/lib/acts-as-messageable.rb +3 -17
- data/lib/acts_as_messageable/message.rb +136 -0
- data/lib/acts_as_messageable/model.rb +229 -0
- data/lib/acts_as_messageable/rails3.rb +46 -0
- data/lib/acts_as_messageable/rails4.rb +54 -0
- data/lib/acts_as_messageable/rails6.rb +63 -0
- data/lib/acts_as_messageable/railtie.rb +12 -0
- data/lib/acts_as_messageable/relation.rb +35 -0
- data/lib/acts_as_messageable/scopes.rb +53 -0
- data/lib/acts_as_messageable.rb +41 -0
- data/lib/generators/acts_as_messageable/migration/migration_generator.rb +48 -0
- data/lib/generators/{acts-as-messageable → acts_as_messageable}/migration/templates/migration.rb +4 -3
- data/lib/generators/acts_as_messageable/migration/templates/migration_indexes.rb +12 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration_opened_as_datetime.rb +16 -0
- data/lib/generators/{acts-as-messageable → acts_as_messageable}/migration/templates/migration_permanent.rb +2 -1
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/actionpack.rbi +428 -0
- data/sorbet/rbi/annotations/actionview.rbi +77 -0
- data/sorbet/rbi/annotations/activerecord.rbi +18 -0
- data/sorbet/rbi/annotations/activesupport.rbi +52 -0
- data/sorbet/rbi/annotations/faraday.rbi +17 -0
- data/sorbet/rbi/annotations/railties.rbi +58 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi +23 -0
- data/sorbet/rbi/dsl/abstract_controller/caching.rbi +30 -0
- data/sorbet/rbi/dsl/abstract_controller/callbacks.rbi +23 -0
- data/sorbet/rbi/dsl/abstract_controller/helpers.rbi +23 -0
- data/sorbet/rbi/dsl/abstract_controller/rendering.rbi +9 -0
- data/sorbet/rbi/dsl/abstract_controller/url_for.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/caching.rbi +29 -0
- data/sorbet/rbi/dsl/action_controller/conditional_get.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/content_security_policy.rbi +31 -0
- data/sorbet/rbi/dsl/action_controller/data_streaming.rbi +9 -0
- data/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi +30 -0
- data/sorbet/rbi/dsl/action_controller/flash.rbi +19 -0
- data/sorbet/rbi/dsl/action_controller/form_builder.rbi +19 -0
- data/sorbet/rbi/dsl/action_controller/helpers.rbi +36 -0
- data/sorbet/rbi/dsl/action_controller/params_wrapper.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/redirecting.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/renderers/all.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/renderers.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi +31 -0
- data/sorbet/rbi/dsl/action_controller/rescue.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/url_for.rbi +24 -0
- data/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi +23 -0
- data/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi +10 -0
- data/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi +10 -0
- data/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi +9 -0
- data/sorbet/rbi/dsl/action_view/helpers.rbi +10 -0
- data/sorbet/rbi/dsl/action_view/layouts.rbi +24 -0
- data/sorbet/rbi/dsl/action_view/rendering.rbi +9 -0
- data/sorbet/rbi/dsl/active_model/attribute_methods.rbi +27 -0
- data/sorbet/rbi/dsl/active_model/attributes.rbi +34 -0
- data/sorbet/rbi/dsl/active_model/dirty.rbi +28 -0
- data/sorbet/rbi/dsl/active_model/serializers/json.rbi +22 -0
- data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +22 -0
- data/sorbet/rbi/dsl/active_model/validations.rbi +27 -0
- data/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi +38 -0
- data/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi +32 -0
- data/sorbet/rbi/dsl/active_record/attribute_methods.rbi +53 -0
- data/sorbet/rbi/dsl/active_record/attributes.rbi +19 -0
- data/sorbet/rbi/dsl/active_record/callbacks.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/core.rbi +55 -0
- data/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/inheritance.rbi +27 -0
- data/sorbet/rbi/dsl/active_record/integration.rbi +32 -0
- data/sorbet/rbi/dsl/active_record/locking/optimistic.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/model_schema.rbi +52 -0
- data/sorbet/rbi/dsl/active_record/nested_attributes.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/readonly_attributes.rbi +19 -0
- data/sorbet/rbi/dsl/active_record/reflection.rbi +32 -0
- data/sorbet/rbi/dsl/active_record/scoping/default.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/scoping.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/serialization.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/signed_id.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/test_fixtures.rbi +58 -0
- data/sorbet/rbi/dsl/active_record/timestamp.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/validations.rbi +28 -0
- data/sorbet/rbi/dsl/active_support/actionable_error.rbi +23 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
- data/sorbet/rbi/dsl/active_support/rescuable.rbi +23 -0
- data/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi +22 -0
- data/sorbet/rbi/gems/actionpack@7.0.4.3.rbi +19265 -0
- data/sorbet/rbi/gems/actionview@7.0.4.3.rbi +15482 -0
- data/sorbet/rbi/gems/activemodel@7.0.4.3.rbi +6025 -0
- data/sorbet/rbi/gems/activerecord@7.0.4.3.rbi +37852 -0
- data/sorbet/rbi/gems/activesupport@7.0.4.3.rbi +18788 -0
- data/sorbet/rbi/gems/addressable@2.4.0.rbi +8 -0
- data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
- data/sorbet/rbi/gems/coveralls_reborn@0.27.0.rbi +8 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
- data/sorbet/rbi/gems/descendants_tracker@0.0.4.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
- data/sorbet/rbi/gems/faraday@0.9.2.rbi +964 -0
- data/sorbet/rbi/gems/git@1.11.0.rbi +2700 -0
- data/sorbet/rbi/gems/github_api@0.16.0.rbi +8 -0
- data/sorbet/rbi/gems/hashie@5.0.0.rbi +8 -0
- data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
- data/sorbet/rbi/gems/jeweler@2.3.9.rbi +1591 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
- data/sorbet/rbi/gems/jwt@2.5.0.rbi +8 -0
- data/sorbet/rbi/gems/loofah@2.19.1.rbi +904 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/mime-types@2.99.3.rbi +8 -0
- data/sorbet/rbi/gems/minitest@5.18.0.rbi +1491 -0
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
- data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +8 -0
- data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +8 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/nokogiri@1.14.2.rbi +7244 -0
- data/sorbet/rbi/gems/oauth2@1.4.8.rbi +8 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/pg@1.4.6.rbi +2574 -0
- data/sorbet/rbi/gems/polyfill@1.9.0.rbi +8 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
- data/sorbet/rbi/gems/psych@4.0.6.rbi +1819 -0
- data/sorbet/rbi/gems/racc@1.6.2.rbi +155 -0
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +943 -0
- data/sorbet/rbi/gems/rack@2.2.6.4.rbi +5659 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +455 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +685 -0
- data/sorbet/rbi/gems/railties@7.0.4.3.rbi +4553 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +2959 -0
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
- data/sorbet/rbi/gems/rbs@2.8.0.rbi +8 -0
- data/sorbet/rbi/gems/rchardet@1.8.0.rbi +1078 -0
- data/sorbet/rbi/gems/rdoc@6.5.0.rbi +12441 -0
- data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +8 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10798 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5296 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
- data/sorbet/rbi/gems/safe_type@1.1.1.rbi +8 -0
- data/sorbet/rbi/gems/semver2@3.4.2.rbi +8 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +8 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
- data/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi +8 -0
- data/sorbet/rbi/gems/stringio@3.0.2.rbi +8 -0
- data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
- data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/thread_safe@0.3.6.rbi +8 -0
- data/sorbet/rbi/gems/timecop@0.9.6.rbi +361 -0
- data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
- data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +8 -0
- data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2553 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +17954 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.7.rbi +966 -0
- data/sorbet/rbi/models/acts-as-messageable/message.rbi +668 -0
- data/sorbet/rbi/models/acts-as-messageable/user.rbi +343 -0
- data/sorbet/rbi/rails-rbi/active_record_base.rbi +119 -0
- data/sorbet/rbi/rails-rbi/active_record_relation.rbi +180 -0
- data/sorbet/rbi/shims/activerecord.rbi +4 -0
- data/sorbet/rbi/shims/model.rbi +9 -0
- data/sorbet/tapioca/config.yml +10 -0
- data/sorbet/tapioca/pre_require.rb +5 -0
- data/sorbet/tapioca/require.rb +10 -0
- data/spec/{acts-as-messageable_spec.rb → acts_as_messageable_spec.rb} +80 -5
- data/spec/{custom-class_spec.rb → custom_class_spec.rb} +15 -5
- data/spec/{custom-required_spec.rb → custom_required_spec.rb} +10 -4
- data/spec/{group-messages_spec.rb → group_messages_spec.rb} +5 -2
- data/spec/migrations_spec.rb +76 -0
- data/spec/spec_helper.rb +44 -41
- data/spec/support/admin.rb +5 -0
- data/spec/support/custom_message.rb +8 -0
- data/spec/support/custom_message_uuid.rb +6 -0
- data/spec/support/custom_search_user.rb +8 -0
- data/spec/support/men.rb +7 -0
- data/spec/support/send_message.rb +10 -1
- data/spec/support/table_schema.rb +36 -0
- data/spec/support/user.rb +5 -3
- data/spec/support/uuid_user.rb +9 -0
- data/tasks/types.rake +46 -0
- metadata +371 -39
- data/.travis.yml +0 -19
- data/gemfiles/rails_3.2.gemfile.lock +0 -153
- data/gemfiles/rails_4.2.11.gemfile +0 -16
- data/gemfiles/rails_4.2.11.gemfile.lock +0 -157
- data/gemfiles/rails_5.2.gemfile.lock +0 -155
- data/gemfiles/rails_6.0.gemfile.lock +0 -155
- data/lib/acts-as-messageable/message.rb +0 -62
- data/lib/acts-as-messageable/model.rb +0 -181
- data/lib/acts-as-messageable/rails3.rb +0 -19
- data/lib/acts-as-messageable/rails4.rb +0 -23
- data/lib/acts-as-messageable/railtie.rb +0 -13
- data/lib/acts-as-messageable/relation.rb +0 -17
- data/lib/acts-as-messageable/scopes.rb +0 -38
- data/lib/generators/acts-as-messageable/migration/migration_generator.rb +0 -30
@@ -1,16 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "http://rubygems.org"
|
4
|
-
|
5
|
-
gem "activerecord", "~> 4.2.11"
|
6
|
-
gem "activesupport", "~> 4.2.11"
|
7
|
-
gem "ancestry", ">= 1.3.0"
|
8
|
-
gem "railties", "~> 4.2.11"
|
9
|
-
|
10
|
-
group :development do
|
11
|
-
gem "appraisal"
|
12
|
-
gem "coveralls", require: false
|
13
|
-
gem "jeweler"
|
14
|
-
gem "rspec"
|
15
|
-
gem "sqlite3", "~> 1.3.6"
|
16
|
-
end
|
@@ -1,157 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
actionpack (4.2.11.1)
|
5
|
-
actionview (= 4.2.11.1)
|
6
|
-
activesupport (= 4.2.11.1)
|
7
|
-
rack (~> 1.6)
|
8
|
-
rack-test (~> 0.6.2)
|
9
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
10
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
11
|
-
actionview (4.2.11.1)
|
12
|
-
activesupport (= 4.2.11.1)
|
13
|
-
builder (~> 3.1)
|
14
|
-
erubis (~> 2.7.0)
|
15
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
17
|
-
activemodel (4.2.11.1)
|
18
|
-
activesupport (= 4.2.11.1)
|
19
|
-
builder (~> 3.1)
|
20
|
-
activerecord (4.2.11.1)
|
21
|
-
activemodel (= 4.2.11.1)
|
22
|
-
activesupport (= 4.2.11.1)
|
23
|
-
arel (~> 6.0)
|
24
|
-
activesupport (4.2.11.1)
|
25
|
-
i18n (~> 0.7)
|
26
|
-
minitest (~> 5.1)
|
27
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
28
|
-
tzinfo (~> 1.1)
|
29
|
-
addressable (2.4.0)
|
30
|
-
ancestry (3.0.6)
|
31
|
-
activerecord (>= 3.2.0)
|
32
|
-
appraisal (2.2.0)
|
33
|
-
bundler
|
34
|
-
rake
|
35
|
-
thor (>= 0.14.0)
|
36
|
-
arel (6.0.4)
|
37
|
-
builder (3.2.3)
|
38
|
-
concurrent-ruby (1.1.5)
|
39
|
-
coveralls (0.8.23)
|
40
|
-
json (>= 1.8, < 3)
|
41
|
-
simplecov (~> 0.16.1)
|
42
|
-
term-ansicolor (~> 1.3)
|
43
|
-
thor (>= 0.19.4, < 2.0)
|
44
|
-
tins (~> 1.6)
|
45
|
-
crass (1.0.4)
|
46
|
-
descendants_tracker (0.0.4)
|
47
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
48
|
-
diff-lcs (1.3)
|
49
|
-
docile (1.3.1)
|
50
|
-
erubis (2.7.0)
|
51
|
-
faraday (0.9.2)
|
52
|
-
multipart-post (>= 1.2, < 3)
|
53
|
-
git (1.5.0)
|
54
|
-
github_api (0.16.0)
|
55
|
-
addressable (~> 2.4.0)
|
56
|
-
descendants_tracker (~> 0.0.4)
|
57
|
-
faraday (~> 0.8, < 0.10)
|
58
|
-
hashie (>= 3.4)
|
59
|
-
mime-types (>= 1.16, < 3.0)
|
60
|
-
oauth2 (~> 1.0)
|
61
|
-
hashie (3.6.0)
|
62
|
-
highline (2.0.2)
|
63
|
-
i18n (0.9.5)
|
64
|
-
concurrent-ruby (~> 1.0)
|
65
|
-
jeweler (2.3.9)
|
66
|
-
builder
|
67
|
-
bundler
|
68
|
-
git (>= 1.2.5)
|
69
|
-
github_api (~> 0.16.0)
|
70
|
-
highline (>= 1.6.15)
|
71
|
-
nokogiri (>= 1.5.10)
|
72
|
-
psych
|
73
|
-
rake
|
74
|
-
rdoc
|
75
|
-
semver2
|
76
|
-
json (2.2.0)
|
77
|
-
jwt (2.2.1)
|
78
|
-
loofah (2.2.3)
|
79
|
-
crass (~> 1.0.2)
|
80
|
-
nokogiri (>= 1.5.9)
|
81
|
-
mime-types (2.99.3)
|
82
|
-
mini_portile2 (2.4.0)
|
83
|
-
minitest (5.11.3)
|
84
|
-
multi_json (1.13.1)
|
85
|
-
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)
|
91
|
-
jwt (>= 1.0, < 3.0)
|
92
|
-
multi_json (~> 1.3)
|
93
|
-
multi_xml (~> 0.5)
|
94
|
-
rack (>= 1.2, < 3)
|
95
|
-
psych (3.1.0)
|
96
|
-
rack (1.6.11)
|
97
|
-
rack-test (0.6.3)
|
98
|
-
rack (>= 1.0)
|
99
|
-
rails-deprecated_sanitizer (1.0.3)
|
100
|
-
activesupport (>= 4.2.0.alpha)
|
101
|
-
rails-dom-testing (1.0.9)
|
102
|
-
activesupport (>= 4.2.0, < 5.0)
|
103
|
-
nokogiri (~> 1.6)
|
104
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
105
|
-
rails-html-sanitizer (1.0.4)
|
106
|
-
loofah (~> 2.2, >= 2.2.2)
|
107
|
-
railties (4.2.11.1)
|
108
|
-
actionpack (= 4.2.11.1)
|
109
|
-
activesupport (= 4.2.11.1)
|
110
|
-
rake (>= 0.8.7)
|
111
|
-
thor (>= 0.18.1, < 2.0)
|
112
|
-
rake (12.3.2)
|
113
|
-
rdoc (6.1.1)
|
114
|
-
rspec (3.8.0)
|
115
|
-
rspec-core (~> 3.8.0)
|
116
|
-
rspec-expectations (~> 3.8.0)
|
117
|
-
rspec-mocks (~> 3.8.0)
|
118
|
-
rspec-core (3.8.0)
|
119
|
-
rspec-support (~> 3.8.0)
|
120
|
-
rspec-expectations (3.8.3)
|
121
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
122
|
-
rspec-support (~> 3.8.0)
|
123
|
-
rspec-mocks (3.8.0)
|
124
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
125
|
-
rspec-support (~> 3.8.0)
|
126
|
-
rspec-support (3.8.0)
|
127
|
-
semver2 (3.4.2)
|
128
|
-
simplecov (0.16.1)
|
129
|
-
docile (~> 1.1)
|
130
|
-
json (>= 1.8, < 3)
|
131
|
-
simplecov-html (~> 0.10.0)
|
132
|
-
simplecov-html (0.10.2)
|
133
|
-
sqlite3 (1.3.13)
|
134
|
-
term-ansicolor (1.7.1)
|
135
|
-
tins (~> 1.0)
|
136
|
-
thor (0.20.3)
|
137
|
-
thread_safe (0.3.6)
|
138
|
-
tins (1.20.3)
|
139
|
-
tzinfo (1.2.5)
|
140
|
-
thread_safe (~> 0.1)
|
141
|
-
|
142
|
-
PLATFORMS
|
143
|
-
ruby
|
144
|
-
|
145
|
-
DEPENDENCIES
|
146
|
-
activerecord (~> 4.2.11)
|
147
|
-
activesupport (~> 4.2.11)
|
148
|
-
ancestry (>= 1.3.0)
|
149
|
-
appraisal
|
150
|
-
coveralls
|
151
|
-
jeweler
|
152
|
-
railties (~> 4.2.11)
|
153
|
-
rspec
|
154
|
-
sqlite3 (~> 1.3.6)
|
155
|
-
|
156
|
-
BUNDLED WITH
|
157
|
-
2.0.1
|
@@ -1,155 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
actionpack (5.2.3)
|
5
|
-
actionview (= 5.2.3)
|
6
|
-
activesupport (= 5.2.3)
|
7
|
-
rack (~> 2.0)
|
8
|
-
rack-test (>= 0.6.3)
|
9
|
-
rails-dom-testing (~> 2.0)
|
10
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
11
|
-
actionview (5.2.3)
|
12
|
-
activesupport (= 5.2.3)
|
13
|
-
builder (~> 3.1)
|
14
|
-
erubi (~> 1.4)
|
15
|
-
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)
|
24
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
|
-
i18n (>= 0.7, < 2)
|
26
|
-
minitest (~> 5.1)
|
27
|
-
tzinfo (~> 1.1)
|
28
|
-
addressable (2.4.0)
|
29
|
-
ancestry (3.0.6)
|
30
|
-
activerecord (>= 3.2.0)
|
31
|
-
appraisal (2.2.0)
|
32
|
-
bundler
|
33
|
-
rake
|
34
|
-
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)
|
45
|
-
descendants_tracker (0.0.4)
|
46
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
47
|
-
diff-lcs (1.3)
|
48
|
-
docile (1.3.1)
|
49
|
-
erubi (1.8.0)
|
50
|
-
faraday (0.9.2)
|
51
|
-
multipart-post (>= 1.2, < 3)
|
52
|
-
git (1.5.0)
|
53
|
-
github_api (0.16.0)
|
54
|
-
addressable (~> 2.4.0)
|
55
|
-
descendants_tracker (~> 0.0.4)
|
56
|
-
faraday (~> 0.8, < 0.10)
|
57
|
-
hashie (>= 3.4)
|
58
|
-
mime-types (>= 1.16, < 3.0)
|
59
|
-
oauth2 (~> 1.0)
|
60
|
-
hashie (3.6.0)
|
61
|
-
highline (2.0.2)
|
62
|
-
i18n (1.6.0)
|
63
|
-
concurrent-ruby (~> 1.0)
|
64
|
-
jeweler (2.3.9)
|
65
|
-
builder
|
66
|
-
bundler
|
67
|
-
git (>= 1.2.5)
|
68
|
-
github_api (~> 0.16.0)
|
69
|
-
highline (>= 1.6.15)
|
70
|
-
nokogiri (>= 1.5.10)
|
71
|
-
psych
|
72
|
-
rake
|
73
|
-
rdoc
|
74
|
-
semver2
|
75
|
-
json (2.2.0)
|
76
|
-
jwt (2.2.1)
|
77
|
-
loofah (2.2.3)
|
78
|
-
crass (~> 1.0.2)
|
79
|
-
nokogiri (>= 1.5.9)
|
80
|
-
method_source (0.9.2)
|
81
|
-
mime-types (2.99.3)
|
82
|
-
mini_portile2 (2.4.0)
|
83
|
-
minitest (5.11.3)
|
84
|
-
multi_json (1.13.1)
|
85
|
-
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)
|
91
|
-
jwt (>= 1.0, < 3.0)
|
92
|
-
multi_json (~> 1.3)
|
93
|
-
multi_xml (~> 0.5)
|
94
|
-
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)
|
99
|
-
rails-dom-testing (2.0.3)
|
100
|
-
activesupport (>= 4.2.0)
|
101
|
-
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)
|
107
|
-
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)
|
119
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
120
|
-
rspec-support (~> 3.8.0)
|
121
|
-
rspec-mocks (3.8.0)
|
122
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
123
|
-
rspec-support (~> 3.8.0)
|
124
|
-
rspec-support (3.8.0)
|
125
|
-
semver2 (3.4.2)
|
126
|
-
simplecov (0.16.1)
|
127
|
-
docile (~> 1.1)
|
128
|
-
json (>= 1.8, < 3)
|
129
|
-
simplecov-html (~> 0.10.0)
|
130
|
-
simplecov-html (0.10.2)
|
131
|
-
sqlite3 (1.3.13)
|
132
|
-
term-ansicolor (1.7.1)
|
133
|
-
tins (~> 1.0)
|
134
|
-
thor (0.20.3)
|
135
|
-
thread_safe (0.3.6)
|
136
|
-
tins (1.20.3)
|
137
|
-
tzinfo (1.2.5)
|
138
|
-
thread_safe (~> 0.1)
|
139
|
-
|
140
|
-
PLATFORMS
|
141
|
-
ruby
|
142
|
-
|
143
|
-
DEPENDENCIES
|
144
|
-
activerecord (~> 5.2.0)
|
145
|
-
activesupport (~> 5.2.0)
|
146
|
-
ancestry (>= 1.3.0)
|
147
|
-
appraisal
|
148
|
-
coveralls
|
149
|
-
jeweler
|
150
|
-
railties (~> 5.2.0)
|
151
|
-
rspec
|
152
|
-
sqlite3 (~> 1.3.6)
|
153
|
-
|
154
|
-
BUNDLED WITH
|
155
|
-
2.0.1
|
@@ -1,155 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
actionpack (6.0.0.rc1)
|
5
|
-
actionview (= 6.0.0.rc1)
|
6
|
-
activesupport (= 6.0.0.rc1)
|
7
|
-
rack (~> 2.0)
|
8
|
-
rack-test (>= 0.6.3)
|
9
|
-
rails-dom-testing (~> 2.0)
|
10
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
11
|
-
actionview (6.0.0.rc1)
|
12
|
-
activesupport (= 6.0.0.rc1)
|
13
|
-
builder (~> 3.1)
|
14
|
-
erubi (~> 1.4)
|
15
|
-
rails-dom-testing (~> 2.0)
|
16
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
17
|
-
activemodel (6.0.0.rc1)
|
18
|
-
activesupport (= 6.0.0.rc1)
|
19
|
-
activerecord (6.0.0.rc1)
|
20
|
-
activemodel (= 6.0.0.rc1)
|
21
|
-
activesupport (= 6.0.0.rc1)
|
22
|
-
activesupport (6.0.0.rc1)
|
23
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
24
|
-
i18n (>= 0.7, < 2)
|
25
|
-
minitest (~> 5.1)
|
26
|
-
tzinfo (~> 1.1)
|
27
|
-
zeitwerk (~> 2.1, >= 2.1.4)
|
28
|
-
addressable (2.4.0)
|
29
|
-
ancestry (3.0.6)
|
30
|
-
activerecord (>= 3.2.0)
|
31
|
-
appraisal (2.2.0)
|
32
|
-
bundler
|
33
|
-
rake
|
34
|
-
thor (>= 0.14.0)
|
35
|
-
builder (3.2.3)
|
36
|
-
concurrent-ruby (1.1.5)
|
37
|
-
coveralls (0.8.23)
|
38
|
-
json (>= 1.8, < 3)
|
39
|
-
simplecov (~> 0.16.1)
|
40
|
-
term-ansicolor (~> 1.3)
|
41
|
-
thor (>= 0.19.4, < 2.0)
|
42
|
-
tins (~> 1.6)
|
43
|
-
crass (1.0.4)
|
44
|
-
descendants_tracker (0.0.4)
|
45
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
46
|
-
diff-lcs (1.3)
|
47
|
-
docile (1.3.1)
|
48
|
-
erubi (1.8.0)
|
49
|
-
faraday (0.9.2)
|
50
|
-
multipart-post (>= 1.2, < 3)
|
51
|
-
git (1.5.0)
|
52
|
-
github_api (0.16.0)
|
53
|
-
addressable (~> 2.4.0)
|
54
|
-
descendants_tracker (~> 0.0.4)
|
55
|
-
faraday (~> 0.8, < 0.10)
|
56
|
-
hashie (>= 3.4)
|
57
|
-
mime-types (>= 1.16, < 3.0)
|
58
|
-
oauth2 (~> 1.0)
|
59
|
-
hashie (3.6.0)
|
60
|
-
highline (2.0.2)
|
61
|
-
i18n (1.6.0)
|
62
|
-
concurrent-ruby (~> 1.0)
|
63
|
-
jeweler (2.3.9)
|
64
|
-
builder
|
65
|
-
bundler
|
66
|
-
git (>= 1.2.5)
|
67
|
-
github_api (~> 0.16.0)
|
68
|
-
highline (>= 1.6.15)
|
69
|
-
nokogiri (>= 1.5.10)
|
70
|
-
psych
|
71
|
-
rake
|
72
|
-
rdoc
|
73
|
-
semver2
|
74
|
-
json (2.2.0)
|
75
|
-
jwt (2.2.1)
|
76
|
-
loofah (2.2.3)
|
77
|
-
crass (~> 1.0.2)
|
78
|
-
nokogiri (>= 1.5.9)
|
79
|
-
method_source (0.9.2)
|
80
|
-
mime-types (2.99.3)
|
81
|
-
mini_portile2 (2.4.0)
|
82
|
-
minitest (5.11.3)
|
83
|
-
multi_json (1.13.1)
|
84
|
-
multi_xml (0.6.0)
|
85
|
-
multipart-post (2.1.1)
|
86
|
-
nokogiri (1.10.3)
|
87
|
-
mini_portile2 (~> 2.4.0)
|
88
|
-
oauth2 (1.4.1)
|
89
|
-
faraday (>= 0.8, < 0.16.0)
|
90
|
-
jwt (>= 1.0, < 3.0)
|
91
|
-
multi_json (~> 1.3)
|
92
|
-
multi_xml (~> 0.5)
|
93
|
-
rack (>= 1.2, < 3)
|
94
|
-
psych (3.1.0)
|
95
|
-
rack (2.0.7)
|
96
|
-
rack-test (1.1.0)
|
97
|
-
rack (>= 1.0, < 3)
|
98
|
-
rails-dom-testing (2.0.3)
|
99
|
-
activesupport (>= 4.2.0)
|
100
|
-
nokogiri (>= 1.6)
|
101
|
-
rails-html-sanitizer (1.0.4)
|
102
|
-
loofah (~> 2.2, >= 2.2.2)
|
103
|
-
railties (6.0.0.rc1)
|
104
|
-
actionpack (= 6.0.0.rc1)
|
105
|
-
activesupport (= 6.0.0.rc1)
|
106
|
-
method_source
|
107
|
-
rake (>= 0.8.7)
|
108
|
-
thor (>= 0.20.3, < 2.0)
|
109
|
-
rake (12.3.2)
|
110
|
-
rdoc (6.1.1)
|
111
|
-
rspec (3.8.0)
|
112
|
-
rspec-core (~> 3.8.0)
|
113
|
-
rspec-expectations (~> 3.8.0)
|
114
|
-
rspec-mocks (~> 3.8.0)
|
115
|
-
rspec-core (3.8.0)
|
116
|
-
rspec-support (~> 3.8.0)
|
117
|
-
rspec-expectations (3.8.3)
|
118
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
119
|
-
rspec-support (~> 3.8.0)
|
120
|
-
rspec-mocks (3.8.0)
|
121
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
122
|
-
rspec-support (~> 3.8.0)
|
123
|
-
rspec-support (3.8.0)
|
124
|
-
semver2 (3.4.2)
|
125
|
-
simplecov (0.16.1)
|
126
|
-
docile (~> 1.1)
|
127
|
-
json (>= 1.8, < 3)
|
128
|
-
simplecov-html (~> 0.10.0)
|
129
|
-
simplecov-html (0.10.2)
|
130
|
-
sqlite3 (1.4.1)
|
131
|
-
term-ansicolor (1.7.1)
|
132
|
-
tins (~> 1.0)
|
133
|
-
thor (0.20.3)
|
134
|
-
thread_safe (0.3.6)
|
135
|
-
tins (1.20.3)
|
136
|
-
tzinfo (1.2.5)
|
137
|
-
thread_safe (~> 0.1)
|
138
|
-
zeitwerk (2.1.6)
|
139
|
-
|
140
|
-
PLATFORMS
|
141
|
-
ruby
|
142
|
-
|
143
|
-
DEPENDENCIES
|
144
|
-
activerecord (~> 6.0.0.rc1)
|
145
|
-
activesupport (~> 6.0.0.rc1)
|
146
|
-
ancestry (>= 1.3.0)
|
147
|
-
appraisal
|
148
|
-
coveralls
|
149
|
-
jeweler
|
150
|
-
railties (~> 6.0.0.rc1)
|
151
|
-
rspec
|
152
|
-
sqlite3 (~> 1.4.0)
|
153
|
-
|
154
|
-
BUNDLED WITH
|
155
|
-
2.0.1
|
@@ -1,62 +0,0 @@
|
|
1
|
-
require 'ancestry'
|
2
|
-
|
3
|
-
module ActsAsMessageable
|
4
|
-
class Message < ::ActiveRecord::Base
|
5
|
-
include ActsAsMessageable::Scopes
|
6
|
-
|
7
|
-
belongs_to :received_messageable, polymorphic: true
|
8
|
-
belongs_to :sent_messageable, polymorphic: true
|
9
|
-
|
10
|
-
attr_accessor :removed, :restored
|
11
|
-
cattr_accessor :required
|
12
|
-
|
13
|
-
ActsAsMessageable.rails_api.new(self).default_scope('created_at desc')
|
14
|
-
|
15
|
-
def open?
|
16
|
-
opened?
|
17
|
-
end
|
18
|
-
|
19
|
-
def open
|
20
|
-
update_attributes!(opened: true)
|
21
|
-
end
|
22
|
-
alias mark_as_read open
|
23
|
-
alias read open
|
24
|
-
|
25
|
-
def close
|
26
|
-
update_attributes!(opened: false)
|
27
|
-
end
|
28
|
-
alias mark_as_unread close
|
29
|
-
alias unread close
|
30
|
-
|
31
|
-
alias from sent_messageable
|
32
|
-
alias to received_messageable
|
33
|
-
|
34
|
-
def real_receiver(user)
|
35
|
-
user == from ? to : from
|
36
|
-
end
|
37
|
-
|
38
|
-
def participant?(user)
|
39
|
-
user.class.group_messages || (to == user) || (from == user)
|
40
|
-
end
|
41
|
-
|
42
|
-
def conversation
|
43
|
-
root.subtree
|
44
|
-
end
|
45
|
-
|
46
|
-
def delete
|
47
|
-
self.removed = true
|
48
|
-
end
|
49
|
-
|
50
|
-
def restore
|
51
|
-
self.restored = true
|
52
|
-
end
|
53
|
-
|
54
|
-
def reply(*args)
|
55
|
-
to.reply_to(self, *args)
|
56
|
-
end
|
57
|
-
|
58
|
-
def people
|
59
|
-
conversation.map(&:from).uniq!
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|