souls 0.53.5 → 0.54.3

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: e35280f32390cf55c390b73dbb3e344ab8de636460e5464e1b0ebe5a7830f562
4
- data.tar.gz: 3a429067cc9388575fd606ba7d056d6072d1c9c0d63a8231c628c25855c80310
3
+ metadata.gz: 53c5c3c3b126d09ed908779a58a108cdf285ce537b2f43b0366ca57d5f8bd6a3
4
+ data.tar.gz: 60202f9d7ed20dbe6d65db7f1640ebe536141e4e460b47b1847f523021b908c7
5
5
  SHA512:
6
- metadata.gz: 11eb6b2e3683f6dcdcf45312bbb8ead4ab569e5a999a51c54ca74d94f07c6e5fe1b5527eac12c8286b71b34533e01b5bf307b68b49c7821ebed53a7aa545a8ab
7
- data.tar.gz: 58bbefc266178a10f8ee51bcc4f2b6ab203ad2dc6cd4fd84c169b9dd19e75178e64be2f1e0c6b00a5843184b08811685033d8c7e1a492bd4dfb8027e97418940
6
+ metadata.gz: 589e2ea10f44874b5b47534807371a1ebd8081b51c1e2632829f6cfaf744c9d83e76d8290fdf81f7fb6b4f80026509dd5319a7da472fe6c24b42b765ec00beab
7
+ data.tar.gz: af6a4b04819391bd7d8efc222ad166dedb7629134667f9f648b2d729980f799d41c5aaaa59223d00fbd3d7192ac91d6b61907f3da6f6832bfdd9069350b60854
@@ -17,6 +17,7 @@ module Souls
17
17
  mutation(singularized_class_name)
18
18
  policy(singularized_class_name)
19
19
  rspec_policy(singularized_class_name)
20
+ true
20
21
  rescue Thor::Error => e
21
22
  raise(Thor::Error, e)
22
23
  end
@@ -25,15 +26,16 @@ module Souls
25
26
  def scaffold_all
26
27
  puts(Paint["Let's Go SOULs AUTO CRUD Assist!\n", :cyan])
27
28
  Souls.get_tables.each do |table|
28
- Souls::Api::Generate.scaffold(class_name: table.singularize)
29
+ Souls::Generate.new.scaffold(table.singularize)
29
30
  puts(Paint["Generated #{table.camelize} CRUD Files\n", :yellow])
30
31
  end
32
+ true
31
33
  rescue Thor::Error => e
32
34
  raise(Thor::Error, e)
33
35
  end
34
36
 
35
37
  desc "delete_all [CLASS_NAME]", "Generate Scaffold All Tables from schema.rb"
36
- def delete_all(class_name: "user")
38
+ def delete_all(class_name)
37
39
  singularized_class_name = class_name.singularize.underscore
38
40
  pluralized_class_name = class_name.pluralize.underscore
39
41
  FileUtils.rm("./app/models/#{singularized_class_name}.rb")
@@ -18,6 +18,7 @@ module Souls
18
18
  mother_procfile(worker_name: options[:name])
19
19
  souls_config_init(worker_name: options[:name])
20
20
  end
21
+ true
21
22
  rescue Thor::Error => e
22
23
  raise(Thor::Error, e)
23
24
  end
@@ -159,7 +160,7 @@ end
159
160
 
160
161
  - name: Deploy to Cloud Run
161
162
  run: |
162
- gcloud run deploy ${{ secrets.APP_NAME }}-souls-#{worker_name} \\
163
+ gcloud run deploy souls-${{ secrets.APP_NAME }}-#{worker_name} \\
163
164
  --service-account=${{ secrets.APP_NAME }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com \\
164
165
  --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{secrets.APP_NAME}}-#{worker_name} \\
165
166
  --memory=4Gi \\
@@ -10,6 +10,7 @@ module Souls
10
10
  system("rake db:migrate")
11
11
  system("rake db:migrate RACK_ENV=test")
12
12
  end
13
+ true
13
14
  rescue Thor::Error => e
14
15
  raise(Thor::Error, e)
15
16
  end
@@ -24,7 +24,8 @@ module Souls
24
24
  def get_endpoint(worker_name: "")
25
25
  app_name = Souls.configuration.app
26
26
  project_id = Souls.configuration.project_id
27
- `gcloud run services list --project #{project_id} --platform managed | grep #{app_name}-souls-#{worker_name} | awk '{print $4}'`
27
+ `gcloud run services list --project #{project_id}
28
+ --platform managed | grep #{app_name}-souls-#{worker_name} | awk '{print $4}'`
28
29
  rescue Thor::Error => e
29
30
  raise(Thor::Error, e)
30
31
  end
@@ -22,9 +22,9 @@ module Souls
22
22
  topic.name.gsub("projects/#{project_id}/topics/", "")
23
23
  end
24
24
 
25
- topic_names.select { |n| n.include?("#{app_name}_souls_") }
25
+ souls_topics = topic_names.select { |n| n.include?("souls_#{app_name}_") }
26
26
 
27
- topic_names.each do |name|
27
+ souls_topics.each do |name|
28
28
  value = workers[name.to_sym] || 0
29
29
  workers[name.to_sym] = value - 1
30
30
  end
@@ -42,7 +42,7 @@ module Souls
42
42
  def create_topic(topic_id: "mailer")
43
43
  app_name = Souls.configuration.app
44
44
  pubsub = Google::Cloud::Pubsub.new
45
- topic_name = "#{app_name}_souls_#{topic_id}"
45
+ topic_name = "souls_#{app_name}_#{topic_id}"
46
46
  topic = pubsub.create_topic(topic_name.to_s)
47
47
  puts("Topic #{topic.name} created.")
48
48
  end
@@ -50,7 +50,7 @@ module Souls
50
50
  def delete_topic(topic_id: "mailer")
51
51
  app_name = Souls.configuration.app
52
52
  pubsub = Google::Cloud::Pubsub.new
53
- topic_name = "#{app_name}_souls_#{topic_id}"
53
+ topic_name = "souls_#{app_name}_#{topic_id}"
54
54
  topic = pubsub.topic(topic_name.to_s)
55
55
  topic.delete
56
56
  puts("Topic #{topic_name} deleted.")
@@ -60,7 +60,7 @@ module Souls
60
60
  require("#{Souls.get_mother_path}/config/souls")
61
61
  worker_name = topic_id.split("_")[0]
62
62
  app_name = Souls.configuration.app
63
- topic_name = "#{app_name}_souls_#{topic_id}"
63
+ topic_name = "souls_#{app_name}_#{topic_id}"
64
64
 
65
65
  subscription_id = "#{topic_name}_sub"
66
66
  endpoint = ""
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.53.5".freeze
2
+ VERSION = "0.54.3".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.32.5
1
+ 0.33.3
@@ -1 +1 @@
1
- 0.32.5
1
+ 0.33.3
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: 0.53.5
4
+ version: 0.54.3
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-09-21 00:00:00.000000000 Z
13
+ date: 2021-09-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport