discourse_subscription_client 0.1.6 → 0.1.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f18845628b38637a55730279c38b6eb79a781ee92397249f87f59535273c1223
|
4
|
+
data.tar.gz: 0d5ee97121224e465853bca566e636feab9e9f11bbfb7f0c55ddcf7133639919
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4925d0d4fa305be65af680a5b4e6d59ff4edcd1625308642f2ee76bf5a0e9fbeffb90781ff9d4742e47730bfadde65137cc4584c0136575d2b4ccde34860bbb4
|
7
|
+
data.tar.gz: 1b9219ddd8859ed418547d1f723b357cdcef1a552be53b3db9e9b7c0b57d1f7990bf9c9efc1940c0c8de0fe1423e066ec09bacb75af9611c616ef2d8b7423d7d
|
@@ -54,24 +54,20 @@ module DiscourseSubscriptionClient
|
|
54
54
|
return (supplier.deactivate_all_subscriptions! && @result.connection_error(supplier)) if response.nil?
|
55
55
|
|
56
56
|
subscription_data = @result.retrieve_subscriptions(supplier, response)
|
57
|
-
return supplier.deactivate_all_subscriptions! if
|
57
|
+
return supplier.deactivate_all_subscriptions! if subscription_data.blank?
|
58
58
|
|
59
59
|
# deactivate any of the supplier's subscriptions not retrieved from supplier
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
has_match = true
|
67
|
-
end
|
60
|
+
supplier.subscriptions.each do |subscription|
|
61
|
+
has_match = false
|
62
|
+
subscription_data.each do |data|
|
63
|
+
if data_matches_subscription(data, subscription)
|
64
|
+
data.subscription = subscription
|
65
|
+
has_match = true
|
68
66
|
end
|
69
|
-
subscription.deactivate! unless has_match
|
70
67
|
end
|
68
|
+
subscription.deactivate! unless has_match
|
71
69
|
end
|
72
70
|
|
73
|
-
return @result.no_subscriptions(supplier) if subscription_data.blank?
|
74
|
-
|
75
71
|
subscription_data.each do |data|
|
76
72
|
if data.subscription.present?
|
77
73
|
data.subscription.update(subscribed: true)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discourse_subscription_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Angus McLeod
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|