notifiable-core 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/notifiable/notifier_base.rb +9 -0
- data/lib/notifiable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 984fc84ebc977d8c8fa0cb5e4136619c0701efd5c122dad1e3e2f7d67e256b9c
|
4
|
+
data.tar.gz: 1966c421a2c3f7f146b1b6232755e59d0011276e92fbde6299056399eddf1e9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d6a71178f525ba4565ff504baf9691865229339f8142cfd5be0d1611e794b5aff17b2ec0cbf6a2e4ff06ca6bf11beefb15e099ba648171fdad9c011ea974b3b
|
7
|
+
data.tar.gz: d3281079cf2d906c29df4f1d9eb9d7ab7eb48643c8777483bfc934796f56d7afccc89d027b985020093f64f5779adf237432c30ca88bbf3037187de79841f09b
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'logger'
|
2
3
|
|
3
4
|
module Notifiable
|
4
5
|
class NotifierBase
|
@@ -29,6 +30,14 @@ module Notifiable
|
|
29
30
|
end
|
30
31
|
|
31
32
|
protected
|
33
|
+
|
34
|
+
def logger
|
35
|
+
if defined?(Rails)
|
36
|
+
Rails.logger
|
37
|
+
else
|
38
|
+
@logger ||= Logger.new(STDOUT)
|
39
|
+
end
|
40
|
+
end
|
32
41
|
|
33
42
|
def flush; end
|
34
43
|
|
data/lib/notifiable/version.rb
CHANGED