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 +4 -4
- data/CHANGELOG.md +6 -1
- data/README.md +9 -0
- data/lib/active_delivery/base.rb +9 -0
- data/lib/active_delivery/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6fa9d6ec097fb92f08a8d1cefb9991db7dfd939d0431f300f7f4db7dbf5a949
|
4
|
+
data.tar.gz: e08797cf4116d876180b08e962e4b7f54668a5a1557c74a1430af1b14ef4b9a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 797c2584376d3a388ff1e40f769962e84d5dfc6b181413f06ac53758183e4451128722fa0108d13497da27e4d2662cf6dbcb303c3fc6130a17647694e3865747
|
7
|
+
data.tar.gz: d5ada86fae7f8fe428bda32d82d5741023e77f45cf53de1320d41d3351137ecd63c05ba3449204527ed6d9ce27c96d2e0212a17cae3c1029ce1d1188dfc05dbe
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
data/lib/active_delivery/base.rb
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|