effective_messaging 0.5.0 → 0.5.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: dedeb21248c1deac281cc473a00f64e23fc41c74ccff84cde9cb8cad9f3295c9
4
- data.tar.gz: 6b102bd482f7b03b62f1caaff60a406fd561439316d7a26c5c1839428b161c7d
3
+ metadata.gz: 1061a51a0950e3c322de72f007ce0380e2b9fa6d0089d85bbd905b1cad9a8acd
4
+ data.tar.gz: 5f1dcb71f399a6d94fb49ba3284bbec7f007c6f8f7494e05aa1bf8f4cde618cf
5
5
  SHA512:
6
- metadata.gz: 8726856fc8632e2c7159ff98ca1b97098eee126dcaa5a29ae87905759769f8613ec02a1c711a8233fd236c1fecf8bfd3a75d638a87dea2c74903c6b5187bff78
7
- data.tar.gz: f890bac4407411221c371fbcdcfd3e545db95b37ff078a782376b1d3e562debd15a622b3996a04b30422927488fe7157abc18c0ad9ef173b47f8a083f4efd792
6
+ metadata.gz: e4facce29949bb6bfd8a56fcea0029c09da098da22aedcef8c018209c3091e87fcc8a53123cf56ea26b99735cb0d83119a135930428d672129125f3459e0debe
7
+ data.tar.gz: d97ffe863b7cb1d14829f49ddf012723d79a99b3c1b2038dbd48e99bf8caf1193388ff8fcd5813dad9b25168d9118d3c3abae5d790126d10ba916e6cb66fa278
@@ -224,6 +224,14 @@ module Effective
224
224
  report.collection().select { |resource| notifiable_tomorrow?(resource) }.count if report
225
225
  end
226
226
 
227
+ def enable!
228
+ update!(enabled: true)
229
+ end
230
+
231
+ def disable!
232
+ update!(enabled: false)
233
+ end
234
+
227
235
  # Enqueues this notification to send right away.
228
236
  # Only applies to scheduled_email? notifications
229
237
  def send_now!
data/config/routes.rb CHANGED
@@ -15,6 +15,9 @@ EffectiveMessaging::Engine.routes.draw do
15
15
  resources :chat_messages, only: [:index, :show, :destroy]
16
16
 
17
17
  resources :notifications do
18
+ post :enable, on: :member
19
+ post :disable, on: :member
20
+
18
21
  post :send_now, on: :member
19
22
  post :skip_once, on: :member
20
23
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveMessaging
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.5.1'.freeze
3
3
  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.5.0
4
+ version: 0.5.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-27 00:00:00.000000000 Z
11
+ date: 2023-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails