noticed 2.0.5 → 2.0.6

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: 1d0404fd59015837e91169aadb0485a6b3fcfc6773c1f75ffc6697619cf25194
4
- data.tar.gz: 8587f702558903dd284d1916a87097a8e398012888f0f981e721ce60386a65ee
3
+ metadata.gz: 69e1c606f6f2cdd2dbc826af26fb364fe32401a4ad5cefbbb1aba4cf2e92759f
4
+ data.tar.gz: 47a3d8a64032e4190e6370020f12b25db30b0f48340c1805f443f1b9a1b6763c
5
5
  SHA512:
6
- metadata.gz: d7ff98d51664c29867a92e16cd01c823928a2fd5fce9751ab7cd0cfbdfd51cd9142984bee9d07f0a26d8b7067b044337806188fcf6e9e21e794417c718208da9
7
- data.tar.gz: 8b4cdbbd15d28e9bfb3f484c3e438b160a8fb1d86f664ca010cd4686357a920742d898ca3a41e88e1db7d704f210a123581ddc2af10f45f157162b6cf66aab8a
6
+ metadata.gz: 1d0ee032b3467924e1726c2cf6658260d6c9fb2b81464769b21e4ea0c4692d7675ff74600964ff47ce63dbac980b4820808fb85e1ed4cfa4a4e6a740e3eb4df6
7
+ data.tar.gz: 19b8bae7b3d0ae713a42fb446d1cea8e8add561f11bd46cc0b42fe832b5fa971a3e17f58c5b22c2f3acdbaa6eaaa0a8116f16ea6e10852acb1f9d03444b36720
@@ -35,6 +35,13 @@ module Noticed
35
35
  def deliver_by(name, options = {})
36
36
  raise NameError, "#{name} has already been used for this Notifier." if delivery_methods.has_key?(name)
37
37
 
38
+ if name == :database
39
+ Noticed.deprecator.warn <<-WARNING.squish
40
+ The :database delivery method has been deprecated and does nothing. Notifiers automatically save to the database now.
41
+ WARNING
42
+ return
43
+ end
44
+
38
45
  config = ActiveSupport::OrderedOptions.new.merge(options)
39
46
  yield config if block_given?
40
47
  delivery_methods[name] = DeliverBy.new(name, config)
@@ -45,6 +52,20 @@ module Noticed
45
52
  end
46
53
  alias_method :required_param, :required_params
47
54
 
55
+ def params(*names)
56
+ Noticed.deprecator.warn <<-WARNING.squish
57
+ `params` is deprecated and has been renamed to `required_params`
58
+ WARNING
59
+ required_params(*names)
60
+ end
61
+
62
+ def param(*names)
63
+ Noticed.deprecator.warn <<-WARNING.squish
64
+ `param :name` is deprecated and has been renamed to `required_param :name`
65
+ WARNING
66
+ required_params(*names)
67
+ end
68
+
48
69
  def with(params)
49
70
  record = params.delete(:record)
50
71
  new(params: params, record: record)
@@ -53,6 +74,7 @@ module Noticed
53
74
  def deliver(recipients = nil, options = {})
54
75
  new.deliver(recipients, options)
55
76
  end
77
+ alias_method :deliver_later, :deliver
56
78
  end
57
79
 
58
80
  # CommentNotifier.deliver(User.all)
@@ -87,6 +109,7 @@ module Noticed
87
109
 
88
110
  self
89
111
  end
112
+ alias_method :deliver_later, :deliver
90
113
 
91
114
  def recipient_attributes_for(recipient)
92
115
  {
@@ -1,3 +1,3 @@
1
1
  module Noticed
2
- VERSION = "2.0.5"
2
+ VERSION = "2.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noticed
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-25 00:00:00.000000000 Z
11
+ date: 2024-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails