souls 1.0.2 → 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: 45201aeb663926d1d117ab3eb622f1cc5e641daa7afadcff924f59371287c462
4
- data.tar.gz: 78298589a543865245baf37e340fc3426dec9681daec90616a07dc6b1799e6da
3
+ metadata.gz: a9924f5fe518e3f8f63cf84de52dd2f3a05b2c4eb20a6235fd8177e436b66127
4
+ data.tar.gz: a673b122e0b8562b4e036cd3900c9967803283601ee6ce74573be8ae77fe827f
5
5
  SHA512:
6
- metadata.gz: f84876f6ae8152c605be0e7f413f5bccdb08d248ef59c9c7a53dcdf52aecae4eb963867680c88485a5d8f0f718bf87379ea27ecab04b7a062eb7db64931d8240
7
- data.tar.gz: db3d9c7c109f4b697f742c6e00b7672eca77271aa44050a6b9a8414582cd1def21d8380794cb7f6db2c1829c10bb0a240942eee0bcc3b5f2f5b289190859733f
6
+ metadata.gz: 12b7c722a08663e6606e86a146b92231daa28779fdf2b0a4f82d4eacffec61365995d04e8a4cefdd493c131d56553ca06a52630327a8e358d882890fa1a7dcd0
7
+ data.tar.gz: a7638765026ee2a3353b9de9c81667af8f696c4547dc9f1b59cc7fda49ebd33da2fa2a445ed958eac062d879126533a54a355921be3b0e28b7b18ae20573364e
@@ -65,6 +65,10 @@ module Souls
65
65
  def create_migration(class_name)
66
66
  pluralized_class_name = class_name.underscore.pluralize
67
67
  singularized_class_name = class_name.underscore.singularize
68
+ Souls::DB.new.invoke(:model, [singularized_class_name], {})
69
+ Souls::DB.new.invoke(:rspec_model, [singularized_class_name], {})
70
+ Souls::DB.new.invoke(:model_rbs, [singularized_class_name], {})
71
+ puts(Paint["Created file! : ", :green])
68
72
  system("rake db:create_migration NAME=create_#{pluralized_class_name}")
69
73
  file_path = Dir["db/migrate/*create_#{pluralized_class_name}.rb"].first
70
74
  File.open(file_path, "w") do |f|
@@ -80,10 +84,6 @@ module Souls
80
84
  end
81
85
  TEXT
82
86
  end
83
- Souls::DB.new.invoke(:create_migration_rbs, [pluralized_class_name], {})
84
- Souls::DB.new.invoke(:model, [singularized_class_name], {})
85
- Souls::DB.new.invoke(:rspec_model, [singularized_class_name], {})
86
- Souls::DB.new.invoke(:model_rbs, [singularized_class_name], {})
87
87
  rescue Thor::Error => e
88
88
  raise(Thor::Error, e)
89
89
  end
@@ -8,9 +8,7 @@ module Souls
8
8
  system("foreman start -f Procfile.dev")
9
9
  end
10
10
  else
11
- current_dir = FileUtils.pwd.split("/").last
12
11
  system("foreman start -f Procfile.dev")
13
- puts("GraphQL Playground is running on\n\nhttp://localhost:4000/playground") if current_dir == "api"
14
12
  end
15
13
  end
16
14
  end
@@ -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
@@ -48,10 +49,16 @@ module Souls
48
49
  def delete_topic(topic_id: "mailer")
49
50
  project_id = Souls.configuration.project_id
50
51
  pubsub = Google::Cloud::Pubsub.new(project_id: project_id)
51
- topic_name = "#{topic_id}_sub"
52
- topic = pubsub.topic(topic_name.to_s)
52
+ topic = pubsub.topic(topic_id.to_s)
53
53
  topic.delete
54
- puts("Topic #{topic_name} deleted.")
54
+ puts("Topic #{topic_id} deleted.")
55
+ end
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
55
62
  end
56
63
 
57
64
  def create_push_subscription(topic_id: "mailer")
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.0.2".freeze
2
+ VERSION = "1.0.6".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.0.6
@@ -1 +1 @@
1
- 1.0.2
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.2
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-10-12 00:00:00.000000000 Z
13
+ date: 2021-10-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport