noticed 1.2.6 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -0
- data/lib/noticed/base.rb +3 -2
- data/lib/noticed/coder.rb +7 -1
- data/lib/noticed/delivery_methods/action_cable.rb +13 -5
- data/lib/noticed/translation.rb +1 -1
- data/lib/noticed/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: fcd5afdca1ab2862bca9259b3015f86d93ab323eb64b6f8de666f9067216b202
|
4
|
+
data.tar.gz: 8c6a53d533eb2667c44804b4a7a5e518b4ab7938b345c6105490145bb4fdb75a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21ea1e549dcbd0857fea6538a0fc2d17ba5f0d249b7f39d1e1d33a56cbece35a3413605d8c1a6e71a381a424b6db93c82bfe7de19d87e3e669c569926fa4a42b
|
7
|
+
data.tar.gz: 1e85eb2edfbbac61fa9bcacf91a4fe041adc945c54ad029a6e8ab75e3d4fc64d52fbcf8527e43da9d0fd3c30e267c2c1e13bafbdf10662f6f826758a1a4f3f41
|
data/Rakefile
CHANGED
@@ -18,6 +18,10 @@ require "bundler/gem_tasks"
|
|
18
18
|
|
19
19
|
require "rake/testtask"
|
20
20
|
|
21
|
+
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
|
22
|
+
load "rails/tasks/engine.rake"
|
23
|
+
load "rails/tasks/statistics.rake"
|
24
|
+
|
21
25
|
Rake::TestTask.new(:test) do |t|
|
22
26
|
t.libs << "test"
|
23
27
|
t.pattern = "test/**/*_test.rb"
|
data/lib/noticed/base.rb
CHANGED
data/lib/noticed/coder.rb
CHANGED
@@ -2,7 +2,13 @@ module Noticed
|
|
2
2
|
class Coder
|
3
3
|
def self.load(data)
|
4
4
|
return if data.nil?
|
5
|
-
|
5
|
+
|
6
|
+
# Text columns need JSON parsing
|
7
|
+
if data.is_a?(String)
|
8
|
+
data = JSON.parse(data)
|
9
|
+
end
|
10
|
+
|
11
|
+
ActiveJob::Arguments.send(:deserialize_argument, data)
|
6
12
|
end
|
7
13
|
|
8
14
|
def self.dump(data)
|
@@ -16,11 +16,19 @@ module Noticed
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def channel
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
@channel ||= begin
|
20
|
+
value = options[:channel]
|
21
|
+
case value
|
22
|
+
when String
|
23
|
+
value.constantize
|
24
|
+
when Symbol
|
25
|
+
notification.send(value)
|
26
|
+
when Class
|
27
|
+
value
|
28
|
+
else
|
29
|
+
Noticed::NotificationChannel
|
30
|
+
end
|
31
|
+
end
|
24
32
|
end
|
25
33
|
end
|
26
34
|
end
|
data/lib/noticed/translation.rb
CHANGED
data/lib/noticed/version.rb
CHANGED
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: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Oliver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|