proactive_support 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/proactive_support/mgmt/flags.rb +10 -2
- data/lib/proactive_support/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c74357a7a3c9c78d6ace4c2b1ef86331e0e23a61
|
4
|
+
data.tar.gz: 92150a75d70491e0d01da977eaf01821676a046c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 432b143ced415cdb996a583b0fbb57e5b03a2398fd35499d55eb2a878cbd8854ee4392a87c5e5dddcc8ca649829d8ae21575ae10ceaea3e9dba0449b49c6f5ad
|
7
|
+
data.tar.gz: 10e830928634423dbc835b6e2790ec151fc6186499f339ef9c47e32b63c1af5ccecca5f2457b2fe4fe338e3521f9497322ceb8c35628b1b180d430fa8e8b94e4
|
data/Gemfile.lock
CHANGED
@@ -8,10 +8,10 @@ module ProactiveSupport
|
|
8
8
|
::ProactiveSupport::Flag.find_or_initialize_by_customer_id_and_digest(customer_id, digest).tap do |f|
|
9
9
|
f.source = source
|
10
10
|
f.identifier = identifier
|
11
|
-
f.filter =
|
11
|
+
f.filter = clean_object filter
|
12
12
|
f.message = message
|
13
13
|
f.level = options[:level] || ::ProactiveSupport::INFO
|
14
|
-
f.debug_params =
|
14
|
+
f.debug_params = clean_object options[:debug_params]
|
15
15
|
f.tags = options[:tags]
|
16
16
|
f.is_transient = options.fetch(:transient, true) ? true : false
|
17
17
|
f.last_triggered_at = ::Time.now
|
@@ -42,6 +42,14 @@ module ProactiveSupport
|
|
42
42
|
def clear_matching(customer_id, conditions)
|
43
43
|
::ProactiveSupport::Flag.where(customer_id: customer_id, is_active: true).update_all({is_active: false}, conditions)
|
44
44
|
end
|
45
|
+
|
46
|
+
def clean_object(data)
|
47
|
+
if RUBY_PLATFORM == 'java'
|
48
|
+
# This attempts to strip out any Java objects so we serialize with compatible MRI Ruby classes
|
49
|
+
data = ::JSON.load(::JSON.dump(data))
|
50
|
+
end
|
51
|
+
::HashWithIndifferentAccess.new data
|
52
|
+
end
|
45
53
|
end
|
46
54
|
end
|
47
55
|
end
|