effective_messaging 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8cc357091a0a303fa05b63eb2f5672b9b4c606987fef9589d3a50893b84bba9
4
- data.tar.gz: 8ef9415dd33c895eb4d6ccc919495600c2dc4a5f9571fd545b241db64fcaed3e
3
+ metadata.gz: 9a5bdd076bbea88479e2697e6741da19b5c6f63ead8a01092f0e37046d342bf5
4
+ data.tar.gz: 8a9d00bff3759144ec693f41e0fef657507bebe98308d98b03568b2a427ed7d8
5
5
  SHA512:
6
- metadata.gz: b905f4e5befcee6bb7e791ed53a6356be7ff00d4397b9e7a054b1036c2789590b0b7b0160908f005f5c53f393be53c8c20a46bf9c992f25cc0191e2c9685aa26
7
- data.tar.gz: 67446fdbb2935d06e93b49fa94fd258c07853e19e359d13d54c0b9ea82578c03de66a2e314f9f5b5ab8a75df15eedbb2970b2e1ed9677d38060f53c9aec6036c
6
+ metadata.gz: ba8ea837f247ee1930dbe198f3bbb9faa355e501fed8eb7894b7c0541bb8f94df5192b4f169e54efbec3420ed4a1aa55569130424bcfd995eddcd7743acda947
7
+ data.tar.gz: 452c5fa5609f5b6539f458dc354ef7ac196984498b26de59efe4c41fcaf4d870f4aa72c6fadb6cb2804f398cedc89dd85c30f0084a928403230d6742c428ff35
@@ -291,7 +291,7 @@ module Effective
291
291
  notified += 1
292
292
  rescue => e
293
293
  EffectiveLogger.error(e.message, associated: self) if defined?(EffectiveLogger)
294
- ExceptionNotifier.notify_exception(e, data: { notification_id: id, resource_id: resource.id, resource_type: resource.class.name }) if defined?(ExceptionNotifier)
294
+ EffectiveResources.send_error(e, notification_id: id, resource_id: resource.id, resource_type: resource.class.name)
295
295
  raise(e) if Rails.env.test? || Rails.env.development?
296
296
  end
297
297
 
@@ -315,7 +315,7 @@ module Effective
315
315
  notified += 1
316
316
  rescue => e
317
317
  EffectiveLogger.error(e.message, associated: self) if defined?(EffectiveLogger)
318
- ExceptionNotifier.notify_exception(e, data: { notification_id: id }) if defined?(ExceptionNotifier)
318
+ EffectiveResources.send_error(e, notification_id: id)
319
319
  raise(e) if Rails.env.test? || Rails.env.development?
320
320
  end
321
321
 
@@ -1,8 +1,9 @@
1
1
  .effective-chat-message
2
2
  .card
3
3
  .card-header
4
- %strong= chat_message.name
5
- commented on
6
- = chat_message.created_at.strftime('%F %T')
4
+ .row
5
+ .col
6
+ %strong= chat_message.name
7
+ .col.text-right= chat_message.created_at.strftime("%b %e, %Y %k:%M")
7
8
  .card-body
8
9
  = simple_format(chat_message.body)
@@ -6,22 +6,13 @@
6
6
  = render('effective/chats/summary', chat: chat)
7
7
  = render(partial: 'effective/chats/chat_message', collection: chat.chat_messages, chat: chat)
8
8
 
9
- - if chat.chat_messages.blank?
10
- %p There are no #{etsd(chat.chat_messages)} so far. Please send one!
11
-
12
- %hr
13
-
14
9
  - chat_message = chat.build_chat_message(user: current_user)
15
10
  - chat_user = chat.chat_user(user: current_user)
16
11
 
17
12
  .card
18
- .card-header.bg-secondary
19
- = et('effective_messaging.send')
20
- .card-body
21
- %p Your name is displayed as <strong>#{chat_user.name}</strong>
22
-
13
+ .card-body.pb-0
23
14
  = f.fields_for :chat_messages, chat_message do |fcm|
24
15
  - # The user and name are set by controller's current_user
25
- = fcm.text_area :body, required: true, label: 'Send a message...'
16
+ = fcm.text_area :body, required: true, label: 'Message'
26
17
 
27
- = f.submit et('effective_messaging.send')
18
+ = f.submit et('effective_messaging.send'), border: false
@@ -1,22 +1,14 @@
1
1
  - current_chat_user = chat.chat_user(user: current_user)
2
2
  - chat_users_count = chat.chat_users.count
3
3
 
4
- %p
5
- - if chat.anonymous?
6
- = badges('anonymous')
7
-
8
- = succeed('.') do
9
- A #{etd(chat)} with
4
+ - if chat.anonymous?
5
+ .alert.alert-danger.my-4
6
+ This is an anonymous #{etd(chat)}.
7
+ %strong Do not reveal any potentially personally identifying information
8
+ like your name or employer.
10
9
 
11
- - if current_chat_user.present? && chat_users_count < 5
12
- = (chat.chat_users - [current_chat_user]).map(&:name).to_sentence
13
- - else
14
- = pluralize(chat_users_count, etd(chat.chat_users))
15
-
16
- opened
17
- = time_ago_in_words(chat.created_at)
18
- ago on
19
- = chat.created_at.strftime('%F')
10
+ %p
11
+ This #{etd(chat)} includes:
20
12
 
21
- = succeed('.') do
22
- = pluralize(chat.chat_messages_count, etd(chat.chat_messages))
13
+ - if current_chat_user.present? && chat_users_count
14
+ = (chat.chat_users).map(&:name).to_sentence
@@ -3,7 +3,7 @@ en:
3
3
  name: 'Effective Messaging'
4
4
  acronym: 'Messaging'
5
5
  dashboard: 'Chat Messages'
6
- send: 'Send Message'
6
+ send: 'Send'
7
7
 
8
8
  activerecord:
9
9
  models:
@@ -1,3 +1,3 @@
1
1
  module EffectiveMessaging
2
- VERSION = '0.11.0'.freeze
2
+ VERSION = '0.12.0'.freeze
3
3
  end
@@ -15,8 +15,7 @@ namespace :effective_messaging do
15
15
  notification.notify!
16
16
  Rails.logger.info "Sent notifications for #{notification} and #{notification.report}"
17
17
  rescue StandardError => e
18
- data = { notification_id: notification.id, report_id: notification.report_id, resource_id: notification.current_resource&.id }
19
- ExceptionNotifier.notify_exception(e, data: data) if defined?(ExceptionNotifier)
18
+ EffectiveResources.send_error(e, notification_id: notification.id, report_id: notification.report_id, resource_id: notification.current_resource&.id)
20
19
  puts "Error with effective_messaging #{notification.id} resource #{notification.current_resource&.id}: #{notification.errors.inspect}"
21
20
  end
22
21
  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.11.0
4
+ version: 0.12.0
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: 2025-04-22 00:00:00.000000000 Z
11
+ date: 2026-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails