active_delivery 0.4.3 → 0.4.4

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: 5798b0d549774cc32295198d1f1ebcd155c07e0624ff8260b427d437cd0ac465
4
- data.tar.gz: '086acc7c7080f9170663353740d462acbd065d4eb105a23193aa9150bdb84327'
3
+ metadata.gz: b6fa9d6ec097fb92f08a8d1cefb9991db7dfd939d0431f300f7f4db7dbf5a949
4
+ data.tar.gz: e08797cf4116d876180b08e962e4b7f54668a5a1557c74a1430af1b14ef4b9a9
5
5
  SHA512:
6
- metadata.gz: b74b9673fd219caec608b4a20cfc0cd94eb55df0b4a52b95edd799d5aea9552e0913c9861d06412494cd160fa7fd6f77c27bae603e60659bf58ad5adda9b71f0
7
- data.tar.gz: 3a0e73e048db14768401cc0f1406ad0aaa09888ef2c18c739d15b2daaf0199375eee437b229e60b8aab7af38659d2bd815a7cd8402620618def7498a6d1373ac
6
+ metadata.gz: 797c2584376d3a388ff1e40f769962e84d5dfc6b181413f06ac53758183e4451128722fa0108d13497da27e4d2662cf6dbcb303c3fc6130a17647694e3865747
7
+ data.tar.gz: d5ada86fae7f8fe428bda32d82d5741023e77f45cf53de1320d41d3351137ecd63c05ba3449204527ed6d9ce27c96d2e0212a17cae3c1029ce1d1188dfc05dbe
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.4.4 (2020-09-01)
6
+
7
+ - Added `ActiveDelivery::Base.unregister_line` ([@thornomad][])
8
+
5
9
  ## 0.4.3 (2020-08-21)
6
10
 
7
11
  - Fix parameterized mailers support in Rails >= 5.0, <5.2 ([@dmitryzuev][])
@@ -52,4 +56,5 @@ Initial version.
52
56
  [@curpeng]: https://github.com/curpeng
53
57
  [@iBublik]: https://github.com/ibublik
54
58
  [@brovikov]: https://github.com/brovikov
55
- [@dmitryzuev]: https://github.com/dmitryzuev
59
+ [@dmitryzuev]: https://github.com/dmitryzuev
60
+ [@thornomad]: https://github.com/thornomad
data/README.md CHANGED
@@ -303,6 +303,15 @@ class EventDelivery < ActiveDelivery::Base
303
303
  end
304
304
  ```
305
305
 
306
+ You can also _unregister_ a line. For example, when subclassing another `Delivery` class or to remove any of the automatically added lines (e.g., `mailer`):
307
+
308
+ ```ruby
309
+ class NonMailerDelivery < ActiveDelivery::Base
310
+ # Use unregister_line to remove any default or inherited lines
311
+ unregister_line :mailer
312
+ end
313
+ ```
314
+
306
315
  ## Related projects
307
316
 
308
317
  - [`abstract_notifier`](https://github.com/palkan/abstract_notifier) – Action Mailer-like interface for text-based notifications.
@@ -73,6 +73,15 @@ module ActiveDelivery
73
73
  CODE
74
74
  end
75
75
 
76
+ def unregister_line(line_id)
77
+ removed_line = delivery_lines.delete(line_id)
78
+
79
+ return if removed_line.nil?
80
+
81
+ singleton_class.undef_method line_id
82
+ singleton_class.undef_method "#{line_id}_class"
83
+ end
84
+
76
85
  def abstract_class?
77
86
  abstract_class == true
78
87
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveDelivery
4
- VERSION = "0.4.3"
4
+ VERSION = "0.4.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_delivery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-21 00:00:00.000000000 Z
11
+ date: 2020-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler