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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c368729564ebdaf7f4f181cb0d7fe556caa380e4761365db0e70f77fd8e1351
|
4
|
+
data.tar.gz: 607ac5899aa5a08fd5997e6924cdb7e13c57d011e91a82a6c2198500dec3a8c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a574a97771ce17a0ac80d3ce6e79ba78b9bde06439384b72c0e79ceb8b0bae9751819c5f7ef69a0d7d30c3e34729ba4005b6d622f692881326da8b6d8d947d1e
|
7
|
+
data.tar.gz: ae44999ab85d2f54408b6f6b12019abc8b2bc9c0e7d751974fdb8ed3a9ea619e625f1f35a02804f876c9638065e9d305b2a9424bb823a4f4459bca73b915ef5f
|
data/.dockerignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.git
|
@@ -0,0 +1,152 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
schedule:
|
9
|
+
- cron: '02 4 * * *'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
static:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: 2.7
|
19
|
+
bundler-cache: true
|
20
|
+
- run : bundle exec rake rubocop
|
21
|
+
rbi-check:
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
steps:
|
24
|
+
- uses: actions/checkout@v2
|
25
|
+
- uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
ruby-version: 2.7
|
28
|
+
bundler-cache: true
|
29
|
+
- run : bundle exec tapioca gem --verify
|
30
|
+
typecheck:
|
31
|
+
runs-on: ubuntu-latest
|
32
|
+
steps:
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
- uses: ruby/setup-ruby@v1
|
35
|
+
with:
|
36
|
+
ruby-version: 2.7
|
37
|
+
bundler-cache: true
|
38
|
+
- run : bundle exec srb
|
39
|
+
test:
|
40
|
+
runs-on: ubuntu-latest
|
41
|
+
services:
|
42
|
+
postgres:
|
43
|
+
image: postgres
|
44
|
+
env:
|
45
|
+
POSTGRES_PASSWORD: password
|
46
|
+
options: >-
|
47
|
+
--health-cmd pg_isready
|
48
|
+
--health-interval 10s
|
49
|
+
--health-timeout 5s
|
50
|
+
--health-retries 5
|
51
|
+
ports:
|
52
|
+
# Maps tcp port 5432 on service container to the host
|
53
|
+
- 5432:5432
|
54
|
+
env:
|
55
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
|
56
|
+
RUN_GENERATORS: ${{ matrix.run_generators }}
|
57
|
+
PGPASSWORD: password
|
58
|
+
DATABASE_ADAPTER: ${{ matrix.database_adapter }}
|
59
|
+
DATABASE_NAME: ${{ matrix.database_name }}
|
60
|
+
DATABASE_PASSWORD: ${{ matrix.database_password }}
|
61
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
62
|
+
strategy:
|
63
|
+
fail-fast: false
|
64
|
+
matrix:
|
65
|
+
rvm: ["2.7"]
|
66
|
+
gemfile: ["Gemfile"]
|
67
|
+
bundler: ['default']
|
68
|
+
run_generators: ["false"]
|
69
|
+
database_adapter: ['sqlite3']
|
70
|
+
database_name: [":memory:"]
|
71
|
+
database_password: ["password"]
|
72
|
+
include:
|
73
|
+
- rvm: ruby-head
|
74
|
+
gemfile: gemfiles/rails_master.gemfile
|
75
|
+
bundler: 'default'
|
76
|
+
run_generators: "false"
|
77
|
+
database_adapter: 'sqlite3'
|
78
|
+
database_name: ":memory:"
|
79
|
+
- rvm: 2.3.8
|
80
|
+
gemfile: gemfiles/rails_3.2.gemfile
|
81
|
+
bundler: '2.3.26'
|
82
|
+
run_generators: "false"
|
83
|
+
database_adapter: 'sqlite3'
|
84
|
+
database_name: ":memory:"
|
85
|
+
- rvm: 2.3.8
|
86
|
+
gemfile: gemfiles/rails_4.2.gemfile
|
87
|
+
bundler: '2.3.26'
|
88
|
+
run_generators: "false"
|
89
|
+
database_adapter: 'sqlite3'
|
90
|
+
database_name: ":memory:"
|
91
|
+
- rvm: 2.7
|
92
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
93
|
+
bundler: 'default'
|
94
|
+
run_generators: "false"
|
95
|
+
database_adapter: 'sqlite3'
|
96
|
+
database_name: ":memory:"
|
97
|
+
- rvm: 2.7
|
98
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
99
|
+
bundler: 'default'
|
100
|
+
run_generators: "false"
|
101
|
+
database_adapter: 'sqlite3'
|
102
|
+
database_name: ":memory:"
|
103
|
+
- rvm: 2.7
|
104
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
105
|
+
bundler: 'default'
|
106
|
+
run_generators: "false"
|
107
|
+
database_adapter: 'sqlite3'
|
108
|
+
database_name: ":memory:"
|
109
|
+
- rvm: 2.7
|
110
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
111
|
+
bundler: 'default'
|
112
|
+
run_generators: "true"
|
113
|
+
database_adapter: 'sqlite3'
|
114
|
+
database_name: ":memory:"
|
115
|
+
- rvm: 2.7
|
116
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
117
|
+
bundler: 'default'
|
118
|
+
database_adapter: 'postgresql'
|
119
|
+
database_name: 'ci_test'
|
120
|
+
database_password: "password"
|
121
|
+
run_generators: "false"
|
122
|
+
- rvm: 3
|
123
|
+
gemfile: gemfiles/rails_7.0.gemfile
|
124
|
+
bundler: 'default'
|
125
|
+
run_generators: "true"
|
126
|
+
database_adapter: 'sqlite3'
|
127
|
+
database_name: ":memory:"
|
128
|
+
steps:
|
129
|
+
- uses: actions/checkout@v2
|
130
|
+
- run: sudo apt-get install libyaml-dev
|
131
|
+
- uses: ruby/setup-ruby@v1
|
132
|
+
with:
|
133
|
+
ruby-version: ${{ matrix.rvm }}
|
134
|
+
bundler: ${{ matrix.bundler }}
|
135
|
+
bundler-cache: true
|
136
|
+
- run: psql -c 'create database ci_test;' -U postgres -h localhost
|
137
|
+
- run: bundle exec rake
|
138
|
+
documentation:
|
139
|
+
runs-on: ubuntu-latest
|
140
|
+
needs: ['test', 'static']
|
141
|
+
if: github.ref == 'refs/heads/master'
|
142
|
+
steps:
|
143
|
+
- uses: actions/checkout@v2
|
144
|
+
- uses: ruby/setup-ruby@v1
|
145
|
+
with:
|
146
|
+
ruby-version: 2.7
|
147
|
+
bundler-cache: true
|
148
|
+
- run: 'bundle exec yard doc --private'
|
149
|
+
- uses: JamesIves/github-pages-deploy-action@v4.4.1
|
150
|
+
with:
|
151
|
+
branch: gh-pages
|
152
|
+
folder: doc
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
inherit_mode:
|
4
|
+
merge:
|
5
|
+
- Exclude
|
6
|
+
|
7
|
+
require: rubocop-sorbet
|
8
|
+
|
9
|
+
AllCops:
|
10
|
+
TargetRubyVersion: 2.7
|
11
|
+
SuggestExtensions: false
|
12
|
+
Exclude:
|
13
|
+
- 'lib/generators/acts_as_messageable/migration/templates/*'
|
14
|
+
- 'vendor/**/*'
|
15
|
+
- 'gemfiles/vendor/**/*'
|
16
|
+
NewCops: enable
|
17
|
+
|
18
|
+
Gemspec/RequiredRubyVersion:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Style/OptionalBooleanParameter:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Layout/LineLength:
|
25
|
+
Max: 120
|
26
|
+
|
27
|
+
Metrics/BlockLength:
|
28
|
+
AllowedMethods: ['describe', 'context']
|
29
|
+
|
30
|
+
Naming/FileName:
|
31
|
+
Exclude:
|
32
|
+
- 'lib/acts-as-messageable.rb'
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config --exclude-limit 10000`
|
3
|
+
# on 2022-12-22 15:05:16 UTC using RuboCop version 1.41.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 2
|
10
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
|
11
|
+
Metrics/AbcSize:
|
12
|
+
Max: 45
|
13
|
+
|
14
|
+
# Offense count: 4
|
15
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
16
|
+
Metrics/MethodLength:
|
17
|
+
Max: 28
|
18
|
+
|
19
|
+
# Offense count: 1
|
20
|
+
# Configuration parameters: Max, CountKeywordArgs.
|
21
|
+
Metrics/ParameterLists:
|
22
|
+
MaxOptionalParameters: 4
|
23
|
+
|
24
|
+
# Offense count: 1
|
25
|
+
Sorbet/ConstantsFromStrings:
|
26
|
+
Exclude:
|
27
|
+
- 'lib/acts_as_messageable/model.rb'
|
28
|
+
|
29
|
+
# Offense count: 7
|
30
|
+
# This cop supports safe autocorrection (--autocorrect).
|
31
|
+
# Configuration parameters: SuggestedStrictness, Include.
|
32
|
+
# Include: **/*.{rb,rbi,rake,ru}
|
33
|
+
Sorbet/FalseSigil:
|
34
|
+
Exclude:
|
35
|
+
- 'spec/acts_as_messageable_spec.rb'
|
36
|
+
- 'spec/custom_class_spec.rb'
|
37
|
+
- 'spec/custom_required_spec.rb'
|
38
|
+
- 'spec/group_messages_spec.rb'
|
39
|
+
- 'spec/migrations_spec.rb'
|
40
|
+
- 'spec/spec_helper.rb'
|
41
|
+
- 'tasks/types.rake'
|
42
|
+
|
43
|
+
# Offense count: 7
|
44
|
+
# This cop supports safe autocorrection (--autocorrect).
|
45
|
+
# Configuration parameters: RequireSigilOnAllFiles, SuggestedStrictness, MinimumStrictness, Include.
|
46
|
+
# Include: **/*.{rb,rbi,rake,ru}
|
47
|
+
Sorbet/ValidSigil:
|
48
|
+
Exclude:
|
49
|
+
- 'spec/acts_as_messageable_spec.rb'
|
50
|
+
- 'spec/custom_class_spec.rb'
|
51
|
+
- 'spec/custom_required_spec.rb'
|
52
|
+
- 'spec/group_messages_spec.rb'
|
53
|
+
- 'spec/migrations_spec.rb'
|
54
|
+
- 'spec/spec_helper.rb'
|
55
|
+
- 'tasks/types.rake'
|
56
|
+
|
57
|
+
# Offense count: 13
|
58
|
+
# Configuration parameters: AllowedConstants.
|
59
|
+
Style/Documentation:
|
60
|
+
Exclude:
|
61
|
+
- 'lib/acts_as_messageable.rb'
|
62
|
+
- 'lib/acts_as_messageable/message.rb'
|
63
|
+
- 'lib/acts_as_messageable/model.rb'
|
64
|
+
- 'lib/acts_as_messageable/rails3.rb'
|
65
|
+
- 'lib/acts_as_messageable/rails4.rb'
|
66
|
+
- 'lib/acts_as_messageable/rails6.rb'
|
67
|
+
- 'lib/acts_as_messageable/railtie.rb'
|
68
|
+
- 'lib/acts_as_messageable/relation.rb'
|
69
|
+
- 'lib/acts_as_messageable/scopes.rb'
|
70
|
+
- 'lib/generators/acts_as_messageable/migration/migration_generator.rb'
|
71
|
+
|
72
|
+
# Offense count: 1
|
73
|
+
Style/MixinUsage:
|
74
|
+
Exclude:
|
75
|
+
- 'spec/support/send_message.rb'
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.0
|
data/Appraisals
CHANGED
@@ -1,20 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
gem
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
appraise 'rails-3.2' do
|
4
|
+
gem 'activerecord', '~> 3.2.22'
|
5
|
+
gem 'activesupport', '~> 3.2.22'
|
6
|
+
gem 'railties', '~> 3.2.22'
|
5
7
|
|
6
8
|
group :development do
|
7
9
|
gem 'sqlite3', '~> 1.3.6'
|
10
|
+
remove_gem 'tapioca'
|
8
11
|
end
|
9
12
|
end
|
10
13
|
|
11
|
-
appraise
|
12
|
-
gem
|
13
|
-
gem
|
14
|
-
gem
|
14
|
+
appraise 'rails-4.2' do
|
15
|
+
gem 'activerecord', '~> 4.2'
|
16
|
+
gem 'activesupport', '~> 4.2'
|
17
|
+
gem 'railties', '~> 4.2'
|
18
|
+
gem 'rdoc', '6.2.0'
|
15
19
|
|
16
20
|
group :development do
|
17
21
|
gem 'sqlite3', '~> 1.3.6'
|
22
|
+
remove_gem 'tapioca'
|
18
23
|
end
|
19
24
|
end
|
20
25
|
|
@@ -25,15 +30,34 @@ appraise 'rails-5.2' do
|
|
25
30
|
|
26
31
|
group :development do
|
27
32
|
gem 'sqlite3', '~> 1.3.6'
|
33
|
+
remove_gem 'tapioca'
|
28
34
|
end
|
29
35
|
end
|
30
36
|
|
31
37
|
appraise 'rails-6.0' do
|
32
|
-
gem 'activerecord', '~> 6
|
33
|
-
gem 'activesupport', '~> 6
|
34
|
-
gem 'railties', '~> 6
|
38
|
+
gem 'activerecord', '~> 6'
|
39
|
+
gem 'activesupport', '~> 6'
|
40
|
+
gem 'railties', '~> 6'
|
35
41
|
|
36
42
|
group :development do
|
37
43
|
gem 'sqlite3', '~> 1.4.0'
|
44
|
+
remove_gem 'tapioca'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
appraise 'rails-7.0' do
|
49
|
+
gem 'activerecord', '~> 7'
|
50
|
+
gem 'activesupport', '~> 7'
|
51
|
+
gem 'railties', '~> 7'
|
52
|
+
end
|
53
|
+
|
54
|
+
appraise 'rails-master' do
|
55
|
+
gem 'activerecord', git: 'https://github.com/rails/rails.git'
|
56
|
+
gem 'activesupport', git: 'https://github.com/rails/rails.git'
|
57
|
+
gem 'railties', git: 'https://github.com/rails/rails.git'
|
58
|
+
|
59
|
+
group :development do
|
60
|
+
gem 'sqlite3'
|
61
|
+
gem 'pg', git: 'https://github.com/ged/ruby-pg.git'
|
38
62
|
end
|
39
63
|
end
|
data/Dockerfile
ADDED
data/Gemfile
CHANGED
@@ -1,14 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'http://rubygems.org'
|
2
4
|
|
3
|
-
gem 'activerecord',
|
4
|
-
gem 'activesupport',
|
5
|
-
gem 'ancestry',
|
6
|
-
gem 'railties',
|
5
|
+
gem 'activerecord', require: false
|
6
|
+
gem 'activesupport', require: false
|
7
|
+
gem 'ancestry', require: false
|
8
|
+
gem 'railties', require: false
|
9
|
+
gem 'sorbet-rails', require: false
|
10
|
+
gem 'sorbet-static-and-runtime', require: false
|
7
11
|
|
8
12
|
group :development do
|
9
|
-
gem 'appraisal'
|
10
|
-
gem '
|
11
|
-
gem 'jeweler'
|
12
|
-
gem '
|
13
|
-
gem '
|
13
|
+
gem 'appraisal', require: false
|
14
|
+
gem 'coveralls_reborn', require: false
|
15
|
+
gem 'jeweler', require: false
|
16
|
+
gem 'pg', require: false
|
17
|
+
gem 'pry', require: false
|
18
|
+
gem 'rspec', require: false
|
19
|
+
gem 'rubocop', require: false
|
20
|
+
gem 'rubocop-sorbet', require: false
|
21
|
+
gem 'sord', require: false
|
22
|
+
gem 'sqlite3', require: false
|
23
|
+
gem 'tapioca', github: 'Shopify/tapioca', require: false
|
24
|
+
gem 'timecop', require: false
|
25
|
+
gem 'unparser', require: false
|
26
|
+
gem 'yard', require: false
|
14
27
|
end
|