effective_messaging 0.3.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3aec5e478f15d3fb2fbc704273ebd3b0b9b8c7da1c604f53dca646b9458c7851
4
- data.tar.gz: 144b0067e81f347f90fae2b6568b0fe2f138058a809080a68ac67598d2a17ce6
3
+ metadata.gz: b33f024c355ffa40b3c847fcb41f456d25259ff9c76e852fc4d013bf2f729669
4
+ data.tar.gz: 5a1f123e68a4b46fe5d8a5cab9c83d52947e8c6f5404e1626701cc0d30d51461
5
5
  SHA512:
6
- metadata.gz: b765eab3df759ffe21ccd8f80d36a8b0f68e233dcfcc8dd79e69a04234a566def85bfaf1b58213af2ee3ca12a12d73da8e4a6d015ef192a4722ef602c6364f4a
7
- data.tar.gz: 9b509ff5f1efa7497479fab6910985da6c4a9441529839a16ce887e354191123470e5d9579fa6183c05ee99e34b463325d1dbaf3391137c963d0a4051224962d
6
+ metadata.gz: acaaf536cace1671058cc8cb0378e2db7510a8ff5c3f2f21936a5d9fe8c304e487dcb08e5f8f8719189b9f50b041b7a25af9ffdf970f3c3c396afd7d70f66276
7
+ data.tar.gz: 9b102fe39780366ac881d2415805bb280634bd99088f2eef6cedb1a33d14cf34fe845e9efd529932faf98387f2775ccc49e11b7b4629d816563d3a5c71ed5e68
@@ -32,7 +32,7 @@ module Admin
32
32
  col :scheduled_method, visible: false
33
33
  col :scheduled_dates, visible: false
34
34
 
35
- col :report, search: Effective::Report.notifiable.sorted
35
+ col :report, search: Effective::Report.notifiable.sorted, action: :show
36
36
 
37
37
  col(:rows_count) do |notification|
38
38
  notification.report.collection().count
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Effective
4
4
  class Chat < ActiveRecord::Base
5
- self.table_name = EffectiveMessaging.chats_table_name.to_s
5
+ self.table_name = (EffectiveMessaging.chats_table_name || :chats).to_s
6
6
 
7
7
  NOTIFY_AFTER = 2.minutes
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Effective
4
4
  class ChatMessage < ActiveRecord::Base
5
- self.table_name = EffectiveMessaging.chat_messages_table_name.to_s
5
+ self.table_name = (EffectiveMessaging.chat_messages_table_name || :chat_messages).to_s
6
6
 
7
7
  log_changes(to: :chat) if respond_to?(:log_changes)
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Effective
4
4
  class ChatUser < ActiveRecord::Base
5
- self.table_name = EffectiveMessaging.chat_users_table_name.to_s
5
+ self.table_name = (EffectiveMessaging.chat_users_table_name || :chat_users).to_s
6
6
 
7
7
  log_changes(to: :chat) if respond_to?(:log_changes)
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Effective
4
4
  class Notification < ActiveRecord::Base
5
- self.table_name = EffectiveMessaging.notifications_table_name.to_s
5
+ self.table_name = (EffectiveMessaging.notifications_table_name || :notifications).to_s
6
6
 
7
7
  attr_accessor :current_user
8
8
  attr_accessor :current_resource
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Effective
4
4
  class NotificationLog < ActiveRecord::Base
5
- self.table_name = EffectiveMessaging.notification_logs_table_name.to_s
5
+ self.table_name = (EffectiveMessaging.notification_logs_table_name || :notification_logs).to_s
6
6
 
7
7
  belongs_to :notification
8
8
 
@@ -1,10 +1,4 @@
1
1
  EffectiveMessaging.setup do |config|
2
- config.chats_table_name = :chats
3
- config.chat_users_table_name = :chat_users
4
- config.chat_messages_table_name = :chat_messages
5
- config.notifications_table_name = :notifications
6
- config.notification_logs_table_name = :notification_logs
7
-
8
2
  # Layout Settings
9
3
  # Configure the Layout per controller, or all at once
10
4
  # config.layout = { application: 'application', admin: 'admin' }
@@ -1,6 +1,6 @@
1
1
  class CreateEffectiveMessaging < ActiveRecord::Migration[6.0]
2
2
  def change
3
- create_table <%= @chats_table_name %> do |t|
3
+ create_table :chats do |t|
4
4
  t.integer :parent_id
5
5
  t.string :parent_type
6
6
 
@@ -13,7 +13,7 @@ class CreateEffectiveMessaging < ActiveRecord::Migration[6.0]
13
13
  t.timestamps
14
14
  end
15
15
 
16
- create_table <%= @chat_users_table_name %> do |t|
16
+ create_table :chat_users do |t|
17
17
  t.integer :chat_id
18
18
 
19
19
  t.integer :user_id
@@ -27,7 +27,7 @@ class CreateEffectiveMessaging < ActiveRecord::Migration[6.0]
27
27
  t.timestamps
28
28
  end
29
29
 
30
- create_table <%= @chat_messages_table_name %> do |t|
30
+ create_table :chat_messages do |t|
31
31
  t.integer :chat_id
32
32
  t.integer :chat_user_id
33
33
 
@@ -40,7 +40,7 @@ class CreateEffectiveMessaging < ActiveRecord::Migration[6.0]
40
40
  t.timestamps
41
41
  end
42
42
 
43
- create_table <%= @notifications_table_name %> do |t|
43
+ create_table :notifications do |t|
44
44
  t.integer :parent_id
45
45
  t.string :parent_type
46
46
 
@@ -76,7 +76,7 @@ class CreateEffectiveMessaging < ActiveRecord::Migration[6.0]
76
76
  t.timestamps
77
77
  end
78
78
 
79
- create_table <%= @notification_logs_table_name %> do |t|
79
+ create_table :notification_logs do |t|
80
80
  t.integer :notification_id
81
81
  t.integer :report_id
82
82
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveMessaging
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
@@ -20,13 +20,7 @@ module EffectiveMessaging
20
20
  end
21
21
 
22
22
  def create_migration_file
23
- @chats_table_name = ':' + EffectiveMessaging.chats_table_name.to_s
24
- @chat_users_table_name = ':' + EffectiveMessaging.chat_users_table_name.to_s
25
- @chat_messages_table_name = ':' + EffectiveMessaging.chat_messages_table_name.to_s
26
- @notifications_table_name = ':' + EffectiveMessaging.notifications_table_name.to_s
27
- @notification_logs_table_name = ':' + EffectiveMessaging.notification_logs_table_name.to_s
28
-
29
- migration_template ('../' * 3) + 'db/migrate/01_create_effective_messaging.rb.erb', 'db/migrate/create_effective_messaging.rb'
23
+ migration_template ('../' * 3) + 'db/migrate/101_create_effective_messaging.rb', 'db/migrate/create_effective_messaging.rb'
30
24
  end
31
25
 
32
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-15 00:00:00.000000000 Z
11
+ date: 2023-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -247,7 +247,7 @@ files:
247
247
  - config/effective_messaging.rb
248
248
  - config/locales/effective_messaging.yml
249
249
  - config/routes.rb
250
- - db/migrate/01_create_effective_messaging.rb.erb
250
+ - db/migrate/101_create_effective_messaging.rb
251
251
  - db/seeds.rb
252
252
  - lib/effective_messaging.rb
253
253
  - lib/effective_messaging/engine.rb