souls 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94e0177f23cdc02ccddd6a98c0c473d435850997208e2b468cba56a064d531a3
4
- data.tar.gz: b437b6ff707949ceca549a553399fa048e71547ddff0c0d3034d5966a35c82c7
3
+ metadata.gz: a9924f5fe518e3f8f63cf84de52dd2f3a05b2c4eb20a6235fd8177e436b66127
4
+ data.tar.gz: a673b122e0b8562b4e036cd3900c9967803283601ee6ce74573be8ae77fe827f
5
5
  SHA512:
6
- metadata.gz: e5e6d741d7502db4412f4d651512d513faf086ec8a43cef194974b46d244e9793941f16517d897a51d6a9accdc07c8a8ce1f76aa7b6f03309401bcb8d9d5334c
7
- data.tar.gz: 00a78a46e14a759219c443bc6aa4a53934672439d391f32db6ff06564e9d734bf4cb1821ee836867aee6fb57e31efc8aa20d45ed5f51dac54e78895e17d02a22
6
+ metadata.gz: 12b7c722a08663e6606e86a146b92231daa28779fdf2b0a4f82d4eacffec61365995d04e8a4cefdd493c131d56553ca06a52630327a8e358d882890fa1a7dcd0
7
+ data.tar.gz: a7638765026ee2a3353b9de9c81667af8f696c4547dc9f1b59cc7fda49ebd33da2fa2a445ed958eac062d879126533a54a355921be3b0e28b7b18ae20573364e
@@ -34,6 +34,7 @@ module Souls
34
34
  create_push_subscription(topic_id: key.to_s)
35
35
  end
36
36
  delete_topic(topic_id: key.to_s) if value == -1
37
+ delete_subscription(topic_id: key.to_s) if value == -1
37
38
  end
38
39
  workers
39
40
  end
@@ -53,6 +54,13 @@ module Souls
53
54
  puts("Topic #{topic_id} deleted.")
54
55
  end
55
56
 
57
+ def delete_subscription(topic_id: "mailer")
58
+ pubsub = Google::Cloud::Pubsub.new(project_id: project_id)
59
+ subscription_id = "#{topic_id}_sub"
60
+ subscription = pubsub.subscription(subscription_id)
61
+ subscription.detach
62
+ end
63
+
56
64
  def create_push_subscription(topic_id: "mailer")
57
65
  app = Souls.configuration.app
58
66
  require("#{Souls.get_mother_path}/config/souls")
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.0.5".freeze
2
+ VERSION = "1.0.6".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.6
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.6
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI