acts-as-messageable 0.4.11 → 0.5.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/.rubocop.yml +19 -0
- data/.rubocop_todo.yml +33 -0
- data/.travis.yml +40 -4
- data/Appraisals +24 -11
- data/Dockerfile +13 -0
- data/Gemfile +11 -4
- data/Gemfile.lock +94 -63
- data/README.md +30 -12
- data/Rakefile +4 -0
- data/VERSION +1 -1
- data/acts-as-messageable.gemspec +62 -49
- data/docker-compose.yml +73 -0
- data/gemfiles/rails_3.2.gemfile +17 -10
- data/gemfiles/rails_4.2.gemfile +24 -0
- data/gemfiles/rails_5.2.gemfile +17 -10
- data/gemfiles/rails_6.0.gemfile +17 -10
- data/gemfiles/rails_master.gemfile +23 -0
- data/lib/acts-as-messageable.rb +2 -17
- data/lib/acts_as_messageable.rb +23 -0
- data/lib/{acts-as-messageable → acts_as_messageable}/message.rb +25 -8
- data/lib/{acts-as-messageable → acts_as_messageable}/model.rb +27 -30
- data/lib/{acts-as-messageable → acts_as_messageable}/rails3.rb +7 -5
- data/lib/{acts-as-messageable → acts_as_messageable}/rails4.rb +8 -4
- data/lib/acts_as_messageable/rails6.rb +31 -0
- data/lib/acts_as_messageable/railtie.rb +11 -0
- data/lib/{acts-as-messageable → acts_as_messageable}/relation.rb +4 -2
- data/lib/{acts-as-messageable → acts_as_messageable}/scopes.rb +16 -12
- data/lib/generators/{acts-as-messageable → acts_as_messageable}/migration/migration_generator.rb +16 -2
- data/lib/generators/{acts-as-messageable → acts_as_messageable}/migration/templates/migration.rb +3 -3
- data/lib/generators/acts_as_messageable/migration/templates/migration_indexes.rb +11 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration_opened_as_datetime.rb +15 -0
- data/lib/generators/{acts-as-messageable → acts_as_messageable}/migration/templates/migration_permanent.rb +1 -1
- data/spec/{acts-as-messageable_spec.rb → acts_as_messageable_spec.rb} +77 -5
- data/spec/{custom-class_spec.rb → custom_class_spec.rb} +14 -5
- data/spec/{custom-required_spec.rb → custom_required_spec.rb} +3 -1
- data/spec/{group-messages_spec.rb → group_messages_spec.rb} +4 -2
- data/spec/migrations_spec.rb +75 -0
- data/spec/spec_helper.rb +30 -37
- data/spec/support/admin.rb +2 -0
- data/spec/support/custom_message.rb +5 -0
- data/spec/support/custom_message_uuid.rb +5 -0
- data/spec/support/custom_search_user.rb +5 -0
- data/spec/support/men.rb +6 -0
- data/spec/support/send_message.rb +2 -0
- data/spec/support/table_schema.rb +35 -0
- data/spec/support/user.rb +2 -3
- data/spec/support/uuid_user.rb +6 -0
- metadata +113 -31
- 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/railtie.rb +0 -13
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'active_record/railtie'
|
2
|
-
|
3
|
-
module ActsAsMessageable
|
4
|
-
class Railtie < Rails::Railtie
|
5
|
-
if defined?(ActiveRecord::Base)
|
6
|
-
ActiveRecord::Base.send :include, ActsAsMessageable::Model
|
7
|
-
end
|
8
|
-
|
9
|
-
if defined?(ActiveRecord::Relation)
|
10
|
-
ActiveRecord::Relation.send :include, ActsAsMessageable::Relation
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|