souls 1.8.3 → 1.8.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/lib/souls/cli/db/create_migration_rbs.rb +0 -2
  3. data/lib/souls/cli/db/model.rb +0 -2
  4. data/lib/souls/cli/db/model_rbs.rb +0 -2
  5. data/lib/souls/cli/db/rspec_model.rb +0 -2
  6. data/lib/souls/cli/delete/application.rb +2 -15
  7. data/lib/souls/cli/delete/connection.rb +2 -5
  8. data/lib/souls/cli/delete/connection_rbs.rb +2 -5
  9. data/lib/souls/cli/delete/edge.rb +3 -6
  10. data/lib/souls/cli/delete/edge_rbs.rb +2 -6
  11. data/lib/souls/cli/delete/job.rb +4 -28
  12. data/lib/souls/cli/delete/job_rbs.rb +6 -4
  13. data/lib/souls/cli/delete/manager.rb +2 -4
  14. data/lib/souls/cli/delete/manager_rbs.rb +1 -4
  15. data/lib/souls/cli/delete/mutation.rb +0 -2
  16. data/lib/souls/cli/delete/mutation_rbs.rb +0 -2
  17. data/lib/souls/cli/delete/query.rb +1 -3
  18. data/lib/souls/cli/delete/query_rbs.rb +1 -1
  19. data/lib/souls/cli/delete/resolver.rb +1 -3
  20. data/lib/souls/cli/delete/resolver_rbs.rb +1 -4
  21. data/lib/souls/cli/delete/rspec_factory.rb +1 -3
  22. data/lib/souls/cli/delete/rspec_job.rb +2 -3
  23. data/lib/souls/cli/delete/rspec_manager.rb +0 -2
  24. data/lib/souls/cli/delete/rspec_query.rb +0 -2
  25. data/lib/souls/cli/delete/rspec_resolver.rb +0 -2
  26. data/lib/souls/cli/delete/type.rb +0 -2
  27. data/lib/souls/cli/delete/type_rbs.rb +0 -2
  28. data/lib/souls/cli/docker/index.rb +0 -4
  29. data/lib/souls/cli/gcloud/compute/index.rb +12 -15
  30. data/lib/souls/cli/gcloud/iam/index.rb +0 -2
  31. data/lib/souls/cli/gcloud/index.rb +0 -4
  32. data/lib/souls/cli/gcloud/pubsub/subscriptions.rb +0 -6
  33. data/lib/souls/cli/gcloud/pubsub/topics.rb +0 -4
  34. data/lib/souls/cli/gcloud/run/index.rb +0 -6
  35. data/lib/souls/cli/gcloud/sql/index.rb +0 -14
  36. data/lib/souls/cli/generate/application.rb +0 -4
  37. data/lib/souls/cli/generate/connection.rb +0 -2
  38. data/lib/souls/cli/generate/connection_rbs.rb +0 -2
  39. data/lib/souls/cli/generate/edge.rb +0 -2
  40. data/lib/souls/cli/generate/edge_rbs.rb +0 -2
  41. data/lib/souls/cli/generate/job.rb +0 -2
  42. data/lib/souls/cli/generate/job_rbs.rb +0 -2
  43. data/lib/souls/cli/generate/manager.rb +0 -2
  44. data/lib/souls/cli/generate/manager_rbs.rb +0 -2
  45. data/lib/souls/cli/generate/mutation.rb +2 -3
  46. data/lib/souls/cli/generate/mutation_rbs.rb +0 -8
  47. data/lib/souls/cli/generate/query.rb +0 -2
  48. data/lib/souls/cli/generate/query_rbs.rb +0 -4
  49. data/lib/souls/cli/generate/resolver.rb +1 -3
  50. data/lib/souls/cli/generate/resolver_rbs.rb +0 -2
  51. data/lib/souls/cli/generate/rspec_factory.rb +0 -2
  52. data/lib/souls/cli/generate/rspec_job.rb +0 -2
  53. data/lib/souls/cli/generate/rspec_manager.rb +0 -2
  54. data/lib/souls/cli/generate/rspec_query.rb +0 -2
  55. data/lib/souls/cli/generate/rspec_resolver.rb +0 -2
  56. data/lib/souls/cli/generate/type.rb +0 -2
  57. data/lib/souls/cli/generate/type_rbs.rb +0 -2
  58. data/lib/souls/cli/github/index.rb +18 -4
  59. data/lib/souls/cli/index.rb +1 -0
  60. data/lib/souls/cli/server/index.rb +8 -1
  61. data/lib/souls/cli/sync/conf.rb +0 -2
  62. data/lib/souls/cli/sync/model.rb +1 -3
  63. data/lib/souls/cli/sync/pubsub.rb +0 -2
  64. data/lib/souls/cli/update/mutation_rbs.rb +0 -4
  65. data/lib/souls/cli/update/resolver.rb +0 -2
  66. data/lib/souls/cli/update/rspec_factory.rb +0 -2
  67. data/lib/souls/cli/update/rspec_mutation.rb +0 -2
  68. data/lib/souls/cli/update/rspec_resolver.rb +0 -2
  69. data/lib/souls/cli/update/type.rb +0 -2
  70. data/lib/souls/cli/update/type_rbs.rb +0 -2
  71. data/lib/souls/version.rb +1 -1
  72. data/lib/souls/versions/.souls_api_version +1 -1
  73. data/lib/souls/versions/.souls_worker_version +1 -1
  74. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d55dd599d811c4fa2007380b12599204103f19911d9b44f1b68bf108037d9a9f
4
- data.tar.gz: 32c348a47de83e9be4a7af1fdf320041b7e5e32636832add8e679957cece7ebb
3
+ metadata.gz: 3008e8f3c693f08dceed2d39e068fded99cd451028fb16cb682dc37ae091727a
4
+ data.tar.gz: d1f43ed9ace0909791ccb69021f0416ff2918ba61f99bc63fd964cf10a96570e
5
5
  SHA512:
6
- metadata.gz: '099dd03104a52ae91c08c09e7287a0b0373ecc784c0a6728ef20d75f9917525dbb040217975895ae456a518c7519c58c0b987f864037bd842facd3c8502eaddb'
7
- data.tar.gz: 8ed5c22f34b5741a2487df2016ddaa40530a16900acfdf216c671219cdc5db1281405e0a4f42bc10144b45d6e3d1e49d0e5bfbb092acfdbdaaf29ced739250f2
6
+ metadata.gz: fcd880cbd079096b8f083cc999379d1a5582a6d626bd27b8fcd74bc83a985625cbedae16afb5c153e639a8deb56e0ea49874d268df7c553ab442913b0ee008f7
7
+ data.tar.gz: cf54ecf40cf18dda9203aa54a17b975d4fe570eeff85029305663813e0a11d3575c0c7340c923e5f110fd6e4514b39f538645d21278e32209af9ea7aa6689c9b
@@ -20,8 +20,6 @@ module Souls
20
20
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
21
21
  end
22
22
  file_path
23
- rescue Thor::Error => e
24
- raise(Thor::Error, e)
25
23
  end
26
24
  end
27
25
  end
@@ -15,8 +15,6 @@ module Souls
15
15
  end
16
16
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
17
17
  file_path
18
- rescue Thor::Error => e
19
- raise(Thor::Error, e)
20
18
  end
21
19
  end
22
20
  end
@@ -17,8 +17,6 @@ module Souls
17
17
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
18
18
  end
19
19
  file_path
20
- rescue Thor::Error => e
21
- raise(Thor::Error, e)
22
20
  end
23
21
  end
24
22
  end
@@ -20,8 +20,6 @@ module Souls
20
20
  end
21
21
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
22
22
  file_path
23
- rescue Thor::Error => e
24
- raise(Thor::Error, e)
25
23
  end
26
24
  end
27
25
  end
@@ -10,8 +10,6 @@ module Souls
10
10
  run_scaffold(class_name: singularized_class_name)
11
11
  end
12
12
  true
13
- rescue Thor::Error => e
14
- raise(Thor::Error, e)
15
13
  end
16
14
 
17
15
  desc "scaffold_all", "Delete Scaffold All Tables from schema.rb"
@@ -19,36 +17,25 @@ module Souls
19
17
  def scaffold_all
20
18
  puts(Paint["Delete All Scaffold Files!\n", :cyan])
21
19
  Souls.get_tables.each do |table|
22
- if options[:rbs]
23
- Souls::Delete.new.invoke(:scaffold, [table.singularize], { rbs: options[:rbs] })
24
- else
25
- Souls::Delete.new.invoke(:scaffold, [table.singularize], {})
26
- end
20
+ Souls::Delete.new.invoke(:scaffold, [table.singularize], { rbs: options[:rbs] })
27
21
  end
28
22
  true
29
- rescue Thor::Error => e
30
- raise(Thor::Error, e)
31
23
  end
32
24
 
33
25
  private
34
26
 
35
27
  def run_scaffold(class_name: "user")
36
28
  type(class_name)
37
- type_rbs(class_name)
38
29
  query(class_name)
39
- query_rbs(class_name)
40
30
  mutation(class_name)
41
- mutation_rbs(class_name)
42
31
  edge(class_name)
43
- edge_rbs(class_name)
44
32
  connection(class_name)
45
- connection_rbs(class_name)
46
33
  resolver(class_name)
47
- resolver_rbs(class_name)
48
34
  rspec_factory(class_name)
49
35
  rspec_mutation(class_name)
50
36
  rspec_query(class_name)
51
37
  rspec_resolver(class_name)
38
+ run_rbs_scaffold(class_name: class_name)
52
39
  end
53
40
 
54
41
  def run_rbs_scaffold(class_name: "user")
@@ -3,14 +3,11 @@ module Souls
3
3
  desc "connection [CLASS_NAME]", "Delete GraphQL Connection"
4
4
  def connection(class_name)
5
5
  file_dir = "./app/graphql/types/connections/"
6
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
7
6
  singularized_class_name = class_name.underscore.singularize
8
- file_path = "./app/graphql/types/connections/#{singularized_class_name}_connection.rb"
9
- FileUtils.rm(file_path)
7
+ file_path = "#{file_dir}#{singularized_class_name}_connection.rb"
8
+ FileUtils.rm_f(file_path)
10
9
  puts(Paint % ["Delete file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
11
10
  file_path
12
- rescue Thor::Error => e
13
- raise(Thor::Error, e)
14
11
  end
15
12
  end
16
13
  end
@@ -4,16 +4,13 @@ module Souls
4
4
  def connection_rbs(class_name)
5
5
  file_path = ""
6
6
  Dir.chdir(Souls.get_mother_path.to_s) do
7
- file_dir = "./sig/api/app/graphql/types/connections/"
8
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
7
  singularized_class_name = class_name.underscore.singularize
8
+ file_dir = "./sig/api/app/graphql/types/connections/"
10
9
  file_path = "#{file_dir}#{singularized_class_name}_connection.rbs"
11
- FileUtils.rm(file_path)
10
+ FileUtils.rm_f(file_path)
12
11
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
13
12
  end
14
13
  file_path
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
14
  end
18
15
  end
19
16
  end
@@ -2,15 +2,12 @@ module Souls
2
2
  class Delete < Thor
3
3
  desc "edge [CLASS_NAME]", "Delete GraphQL Edge"
4
4
  def edge(class_name)
5
- file_dir = "./app/graphql/types/edges"
6
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
5
+ file_dir = "./app/graphql/types/edges/"
7
6
  singularized_class_name = class_name.underscore.singularize
8
- file_path = "./app/graphql/types/edges/#{singularized_class_name}_edge.rb"
9
- FileUtils.rm(file_path)
7
+ file_path = "#{file_dir}#{singularized_class_name}_edge.rb"
8
+ FileUtils.rm_f(file_path)
10
9
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
11
10
  file_path
12
- rescue Thor::Error => e
13
- raise(Thor::Error, e)
14
11
  end
15
12
  end
16
13
  end
@@ -2,18 +2,14 @@ module Souls
2
2
  class Delete < Thor
3
3
  desc "edge_rbs [CLASS_NAME]", "Delete GraphQL Edge RBS"
4
4
  def edge_rbs(class_name)
5
- file_path = ""
6
5
  Dir.chdir(Souls.get_mother_path.to_s) do
7
6
  file_dir = "./sig/api/app/graphql/types/edges/"
8
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
7
  singularized_class_name = class_name.underscore.singularize
10
8
  file_path = "#{file_dir}#{singularized_class_name}_edge.rbs"
11
- FileUtils.rm(file_path)
9
+ FileUtils.rm_f(file_path)
12
10
  puts(Paint % ["Delete file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
11
+ file_path
13
12
  end
14
- file_path
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
13
  end
18
14
  end
19
15
  end
@@ -3,37 +3,13 @@ module Souls
3
3
  desc "job [CLASS_NAME]", "Delete Job File in Worker"
4
4
  method_option :mailer, type: :boolean, aliases: "--mailer", default: false, desc: "Mailer Option"
5
5
  def job(class_name)
6
- if options[:mailer]
7
- mailgun_mailer(class_name: class_name)
8
- else
9
- delete_job_mutation(class_name: class_name)
10
- end
11
- Souls::Delete.new.invoke(:job_rbs, [class_name], {})
12
- Souls::Delete.new.invoke(:rspec_job, [class_name], {})
13
- rescue Thor::Error => e
14
- raise(Thor::Error, e)
15
- end
16
-
17
- private
18
-
19
- def delete_job_mutation(class_name: "send-mailer")
20
- file_dir = "./app/graphql/mutations/"
21
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
22
- file_path = "#{file_dir}#{class_name.singularize}.rb"
23
-
24
- FileUtils.rm(file_path)
25
- puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
26
- file_path
27
- end
28
-
29
- def mailgun_mailer(class_name: "mailer")
30
- file_dir = "./app/graphql/mutations/"
31
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
6
+ file_dir = "./app/graphql/queries/"
32
7
  file_path = "#{file_dir}#{class_name.singularize}.rb"
33
8
 
34
- FileUtils.rm(file_path)
9
+ FileUtils.rm_f(file_path)
35
10
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
36
- file_path
11
+ Souls::Delete.new.invoke(:job_rbs, [class_name], {})
12
+ Souls::Delete.new.invoke(:rspec_job, [class_name], {})
37
13
  end
38
14
  end
39
15
  end
@@ -4,17 +4,19 @@ module Souls
4
4
  def job_rbs(class_name)
5
5
  file_path = ""
6
6
  worker_name = FileUtils.pwd.split("/").last
7
+ if worker_name == "api" || FileUtils.pwd.split("/")[-2] != "apps"
8
+ raise(Souls::CLIException, "This task must be run from within a worker directory")
9
+ end
10
+
7
11
  Dir.chdir(Souls.get_mother_path.to_s) do
8
12
  singularized_class_name = class_name.underscore.singularize
9
- file_dir = "./sig/#{worker_name}/app/graphql/mutations/"
13
+ file_dir = "./sig/#{worker_name}/app/graphql/queries/"
10
14
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
11
15
  file_path = "#{file_dir}#{singularized_class_name}.rbs"
12
- FileUtils.rm(file_path)
16
+ FileUtils.rm_f(file_path)
13
17
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
14
18
  end
15
19
  file_path
16
- rescue Thor::Error => e
17
- raise(Thor::Error, e)
18
20
  end
19
21
  end
20
22
  end
@@ -5,16 +5,14 @@ module Souls
5
5
  def manager(class_name)
6
6
  singularized_class_name = class_name.underscore.singularize
7
7
  file_dir = "./app/graphql/mutations/managers/#{singularized_class_name}_manager"
8
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
8
  file_path = "#{file_dir}/#{options[:mutation]}.rb"
9
+ puts(file_path)
10
10
 
11
- FileUtils.rm(file_path)
11
+ FileUtils.rm_f(file_path)
12
12
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
13
13
  Souls::Delete.new.invoke(:manager_rbs, [singularized_class_name], { mutation: options[:mutation] })
14
14
  Souls::Delete.new.invoke(:rspec_manager, [singularized_class_name], { mutation: options[:mutation] })
15
15
  file_path
16
- rescue Thor::Error => e
17
- raise(Thor::Error, e)
18
16
  end
19
17
  end
20
18
  end
@@ -7,14 +7,11 @@ module Souls
7
7
  singularized_class_name = class_name.underscore.singularize
8
8
  Dir.chdir(Souls.get_mother_path.to_s) do
9
9
  file_dir = "./sig/api/app/graphql/mutations/managers/#{singularized_class_name}_manager"
10
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
11
10
  file_path = "#{file_dir}/#{options[:mutation]}.rbs"
12
- FileUtils.rm(file_path)
11
+ FileUtils.rm_f(file_path)
13
12
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
14
13
  end
15
14
  file_path
16
- rescue Thor::Error => e
17
- raise(Thor::Error, e)
18
15
  end
19
16
  end
20
17
  end
@@ -10,8 +10,6 @@ module Souls
10
10
  end
11
11
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
12
12
  file_path
13
- rescue Thor::Error => e
14
- raise(Thor::Error, e)
15
13
  end
16
14
  end
17
15
  end
@@ -10,8 +10,6 @@ module Souls
10
10
  end
11
11
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
12
12
  file_path
13
- rescue Thor::Error => e
14
- raise(Thor::Error, e)
15
13
  end
16
14
  end
17
15
  end
@@ -4,11 +4,9 @@ module Souls
4
4
  def query(class_name)
5
5
  singularized_class_name = class_name.singularize
6
6
  file_path = "./app/graphql/queries/#{singularized_class_name}*.rb"
7
- FileUtils.rm(file_path)
7
+ FileUtils.rm_f(file_path)
8
8
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
9
9
  file_path
10
- rescue Thor::Error => e
11
- raise(Thor::Error, e)
12
10
  end
13
11
  end
14
12
  end
@@ -7,7 +7,7 @@ module Souls
7
7
  file_dir = "./sig/api/app/graphql/queries/"
8
8
  singularized_class_name = class_name.underscore.singularize
9
9
  file_path = "#{file_dir}#{singularized_class_name}*.rbs"
10
- FileUtils.rm(file_path)
10
+ FileUtils.rm_f(file_path)
11
11
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
12
12
  file_path
13
13
  end
@@ -4,11 +4,9 @@ module Souls
4
4
  def resolver(class_name)
5
5
  singularized_class_name = class_name.singularize.underscore
6
6
  file_path = "./app/graphql/resolvers/#{singularized_class_name}_search.rb"
7
- FileUtils.rm(file_path)
7
+ FileUtils.rm_f(file_path)
8
8
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
9
9
  file_path
10
- rescue Thor::Error => e
11
- raise(Thor::Error, e)
12
10
  end
13
11
  end
14
12
  end
@@ -6,14 +6,11 @@ module Souls
6
6
  file_path = ""
7
7
  Dir.chdir(Souls.get_mother_path.to_s) do
8
8
  file_dir = "./sig/api/app/graphql/resolvers"
9
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
10
9
  file_path = "#{file_dir}/#{singularized_class_name}_search.rbs"
11
- FileUtils.rm(file_path)
10
+ FileUtils.rm_f(file_path)
12
11
  end
13
12
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
14
13
  file_path
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
14
  end
18
15
  end
19
16
  end
@@ -3,11 +3,9 @@ module Souls
3
3
  desc "rspec_factory [CLASS_NAME]", "Delete Rspec Factory Test from schema.rb"
4
4
  def rspec_factory(class_name)
5
5
  file_path = "./spec/factories/#{class_name.pluralize}.rb"
6
- FileUtils.rm(file_path)
6
+ FileUtils.rm_f(file_path)
7
7
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
8
8
  file_path
9
- rescue Thor::Error => e
10
- raise(Thor::Error, e)
11
9
  end
12
10
  end
13
11
  end
@@ -2,13 +2,12 @@ module Souls
2
2
  class Delete < Thor
3
3
  desc "rspec_job [CLASS_NAME]", "Delete Rspec Job Test Template"
4
4
  def rspec_job(class_name)
5
+ file_dir = "./spec/jobs"
5
6
  singularized_class_name = class_name.underscore.singularize
6
7
  file_path = "#{file_dir}/#{singularized_class_name}_spec.rb"
7
- FileUtils.rm(file_path)
8
+ FileUtils.rm_f(file_path)
8
9
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
9
10
  file_path
10
- rescue Thor::Error => e
11
- raise(Thor::Error, e)
12
11
  end
13
12
  end
14
13
  end
@@ -8,8 +8,6 @@ module Souls
8
8
  FileUtils.rm(file_path)
9
9
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
10
10
  file_path
11
- rescue Thor::Error => e
12
- raise(Thor::Error, e)
13
11
  end
14
12
  end
15
13
  end
@@ -7,8 +7,6 @@ module Souls
7
7
  FileUtils.rm(file_path)
8
8
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
9
9
  file_path
10
- rescue Thor::Error => e
11
- raise(Thor::Error, e)
12
10
  end
13
11
  end
14
12
  end
@@ -7,8 +7,6 @@ module Souls
7
7
  FileUtils.rm(file_path)
8
8
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
9
9
  file_path
10
- rescue Thor::Error => e
11
- raise(Thor::Error, e)
12
10
  end
13
11
  end
14
12
  end
@@ -7,8 +7,6 @@ module Souls
7
7
  FileUtils.rm(file_path)
8
8
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
9
9
  file_path
10
- rescue Thor::Error => e
11
- raise(Thor::Error, e)
12
10
  end
13
11
  end
14
12
  end
@@ -12,8 +12,6 @@ module Souls
12
12
  end
13
13
  puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
14
14
  file_path
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
15
  end
18
16
  end
19
17
  end
@@ -12,8 +12,6 @@ module Souls
12
12
  postgres:13-alpine"
13
13
  )
14
14
  system("docker ps")
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
15
  end
18
16
 
19
17
  desc "mysql", "Run MySQL Docker Container"
@@ -28,8 +26,6 @@ module Souls
28
26
  mysql:latest"
29
27
  )
30
28
  system("docker ps")
31
- rescue Thor::Error => e
32
- raise(Thor::Error, e)
33
29
  end
34
30
  end
35
31
  end
@@ -27,8 +27,6 @@ module Souls
27
27
  puts(Paint["\nYou can add this IP to third party white list", :white])
28
28
  puts(Paint["\nPlease git push to update your github workflow now!", :yellow])
29
29
  true
30
- rescue Thor::Error => e
31
- raise(Thor::Error, e)
32
30
  end
33
31
 
34
32
  private
@@ -123,19 +121,18 @@ module Souls
123
121
  def update_workflows
124
122
  app_name = Souls.configuration.app
125
123
  Dir.chdir(Souls.get_mother_path.to_s) do
126
- api_workflow_path = ".github/workflows/api.yml"
127
- worker_workflow_paths = Dir[".github/workflows/*.yml"]
128
- worker_workflow_paths.delete(api_workflow_path)
129
- File.open(api_workflow_path, "a") do |line|
130
- line.write(" \\ \n --vpc-connector=#{app_name}-connector")
131
- end
132
- puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [api_workflow_path.to_s, :white] }])
133
- worker_workflow_paths.each do |file_path|
134
- worker_workflow = File.readlines(file_path)
135
- worker_workflow[worker_workflow.size - 1] = worker_workflow.last.chomp
136
- worker_workflow << " \\ \n --vpc-connector=#{app_name}-connector \\"
137
- worker_workflow << "\n --vpc-egress=all"
138
- File.open(file_path, "w") { |f| f.write(worker_workflow.join) }
124
+ workflow_paths = Dir[".github/workflows/*.yml"]
125
+ workflow_paths.each do |file_path|
126
+ workflow = File.readlines(file_path)
127
+ index = workflow.index { |e| e =~ /.*--memory=.*/ } + 1
128
+ egress_index = workflow.index { |e| e =~ /.*--vpc-egress=.*/ }
129
+ connector_index = workflow.index { |e| e =~ /.*--vpc-connector=.*/ }
130
+
131
+ if !file_path.end_with?("/api.yml") && egress_index.nil?
132
+ workflow.insert(index, " --vpc-egress=all \\\n")
133
+ end
134
+ workflow.insert(index, " --vpc-connector=#{app_name}-connector \\\n") if connector_index.nil?
135
+ File.open(file_path, "w") { |f| f.write(workflow.join) }
139
136
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
140
137
  end
141
138
  end
@@ -12,8 +12,6 @@ module Souls
12
12
  rescue StandardError
13
13
  export_key_to_console
14
14
  end
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
15
  end
18
16
 
19
17
  private
@@ -30,8 +30,6 @@ module Souls
30
30
  system("gcloud projects describe #{project_id}", out: File::NULL) or raise(Souls::GcloudException)
31
31
  system("gcloud config set project #{project_id}")
32
32
  system("gcloud auth login")
33
- rescue Thor::Error => e
34
- raise(Thor::Error, e)
35
33
  end
36
34
 
37
35
  desc "config_set", "gcloud config set"
@@ -52,8 +50,6 @@ module Souls
52
50
  system("gcloud services enable containerregistry.googleapis.com")
53
51
  system("gcloud services enable run.googleapis.com")
54
52
  system("gcloud services enable vpcaccess.googleapis.com")
55
- rescue Thor::Error => e
56
- raise(Thor::Error, e)
57
53
  end
58
54
  end
59
55
  end
@@ -21,15 +21,11 @@ module Souls
21
21
  --expiration-period never
22
22
  "
23
23
  )
24
- rescue Thor::Error => e
25
- raise(Thor::Error, e)
26
24
  end
27
25
 
28
26
  desc "subscription_list", "Show Google Cloud Pubsub Subscription List"
29
27
  def subscription_list
30
28
  system("gcloud pubsub subscriptions list")
31
- rescue Thor::Error => e
32
- raise(Thor::Error, e)
33
29
  end
34
30
 
35
31
  desc "update_subscription", "Update Google Cloud Pubsub Subscription Endpoint"
@@ -43,8 +39,6 @@ module Souls
43
39
  desc: "Google Cloud Pubsub Push Subscription Endpoint"
44
40
  def update_subscription
45
41
  system("gcloud pubsub subscriptions update #{options[:topic_name]}-sub --push-endpoint #{options[:endpoint]} ")
46
- rescue Thor::Error => e
47
- raise(Thor::Error, e)
48
42
  end
49
43
  end
50
44
  end
@@ -7,15 +7,11 @@ module Souls
7
7
  desc: "Google Cloud Pubsub Topic Name"
8
8
  def create_topic
9
9
  system("gcloud pubsub topics create #{options[:topic_name]}")
10
- rescue Thor::Error => e
11
- raise(Thor::Error, e)
12
10
  end
13
11
 
14
12
  desc "topic_list", "Show Google Cloud Topic List"
15
13
  def topic_list
16
14
  system("gcloud pubsub topics list")
17
- rescue Thor::Error => e
18
- raise(Thor::Error, e)
19
15
  end
20
16
  end
21
17
  end
@@ -8,22 +8,16 @@ module Souls
8
8
  "gcloud scheduler jobs create http #{app_name}-awake
9
9
  --schedule '0,10,20,30,40,50 * * * *' --uri #{url} --http-method GET"
10
10
  )
11
- rescue Thor::Error => e
12
- raise(Thor::Error, e)
13
11
  end
14
12
 
15
13
  desc "list", "Show Google Cloud Run List"
16
14
  def list
17
15
  system("gcloud run services list --platform managed")
18
- rescue Thor::Error => e
19
- raise(Thor::Error, e)
20
16
  end
21
17
 
22
18
  desc "get_endpoint", "Show Worker's Endpoint"
23
19
  def get_endpoint(worker_name: "")
24
20
  `gcloud run services list --platform managed | grep #{worker_name} | awk '{print $4}'`
25
- rescue Thor::Error => e
26
- raise(Thor::Error, e)
27
21
  end
28
22
  end
29
23
  end
@@ -51,15 +51,11 @@ module Souls
51
51
  end
52
52
  end
53
53
  Souls::Github.new
54
- rescue Thor::Error => e
55
- raise(Thor::Error, e)
56
54
  end
57
55
 
58
56
  desc "list", "Show Cloud SQL Instances List"
59
57
  def list
60
58
  system("gcloud sql instances list")
61
- rescue Thor::Error => e
62
- raise(Thor::Error, e)
63
59
  end
64
60
 
65
61
  desc "setup_private_ip", "Enable Private IP"
@@ -67,8 +63,6 @@ module Souls
67
63
  create_ip_range
68
64
  create_vpc_connector
69
65
  assign_network
70
- rescue Thor::Error => e
71
- raise(Thor::Error, e)
72
66
  end
73
67
 
74
68
  desc "assign_network", "Assign Network"
@@ -77,8 +71,6 @@ module Souls
77
71
  instance_name = Souls.configuration.instance_name
78
72
  project_id = Souls.configuration.project_id
79
73
  system("gcloud beta sql instances patch #{instance_name} --project=#{project_id} --network=#{app_name}")
80
- rescue Thor::Error => e
81
- raise(Thor::Error, e)
82
74
  end
83
75
 
84
76
  desc "create_ip_range", "Create VPC Adress Range"
@@ -95,8 +87,6 @@ module Souls
95
87
  --network=#{app_name} \
96
88
  --project=#{project_id}"
97
89
  )
98
- rescue Thor::Error => e
99
- raise(Thor::Error, e)
100
90
  end
101
91
 
102
92
  desc "create_vpc_connector", "Create VPC-PEERING Connect"
@@ -112,8 +102,6 @@ module Souls
112
102
  --project=#{project_id}
113
103
  "
114
104
  )
115
- rescue Thor::Error => e
116
- raise(Thor::Error, e)
117
105
  end
118
106
 
119
107
  desc "assgin_ip", "Add Current Grobal IP to White List"
@@ -129,8 +117,6 @@ module Souls
129
117
  --authorized-networks=#{ip}
130
118
  "
131
119
  )
132
- rescue Thor::Error => e
133
- raise(Thor::Error, e)
134
120
  end
135
121
 
136
122
  private
@@ -10,8 +10,6 @@ module Souls
10
10
  run_scaffold(singularized_class_name)
11
11
  end
12
12
  true
13
- rescue Thor::Error => e
14
- raise(Thor::Error, e)
15
13
  end
16
14
 
17
15
  desc "scaffold_all", "Generate Scaffold All Tables from schema.rb"
@@ -26,8 +24,6 @@ module Souls
26
24
  end
27
25
  end
28
26
  true
29
- rescue Thor::Error => e
30
- raise(Thor::Error, e)
31
27
  end
32
28
 
33
29
  private
@@ -15,8 +15,6 @@ module Souls
15
15
  end
16
16
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
17
17
  file_path
18
- rescue Thor::Error => e
19
- raise(Thor::Error, e)
20
18
  end
21
19
  end
22
20
  end
@@ -20,8 +20,6 @@ module Souls
20
20
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
21
21
  end
22
22
  file_path
23
- rescue Thor::Error => e
24
- raise(Thor::Error, e)
25
23
  end
26
24
  end
27
25
  end
@@ -15,8 +15,6 @@ module Souls
15
15
  end
16
16
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
17
17
  file_path
18
- rescue Thor::Error => e
19
- raise(Thor::Error, e)
20
18
  end
21
19
  end
22
20
  end
@@ -23,8 +23,6 @@ module Souls
23
23
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
24
24
  end
25
25
  file_path
26
- rescue Thor::Error => e
27
- raise(Thor::Error, e)
28
26
  end
29
27
  end
30
28
  end
@@ -12,8 +12,6 @@ module Souls
12
12
  end
13
13
  Souls::Generate.new.invoke(:job_rbs, [class_name], {})
14
14
  Souls::Generate.new.invoke(:rspec_job, [class_name], { mailer: options[:mailer] })
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
15
  end
18
16
 
19
17
  private
@@ -36,8 +36,6 @@ module Souls
36
36
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [type_file_path.to_s, :white] }])
37
37
  end
38
38
  file_path
39
- rescue Thor::Error => e
40
- raise(Thor::Error, e)
41
39
  end
42
40
  end
43
41
  end
@@ -6,8 +6,6 @@ module Souls
6
6
  create_manager(class_name, options[:mutation])
7
7
  Souls::Generate.new.invoke(:manager_rbs, [singularized_class_name], { mutation: options[:mutation] })
8
8
  Souls::Generate.new.invoke(:rspec_manager, [singularized_class_name], { mutation: options[:mutation] })
9
- rescue Thor::Error => e
10
- raise(Thor::Error, e)
11
9
  end
12
10
 
13
11
  private
@@ -27,8 +27,6 @@ module Souls
27
27
  end
28
28
  end
29
29
  file_path
30
- rescue Thor::Error => e
31
- raise(Thor::Error, e)
32
30
  end
33
31
  end
34
32
  end
@@ -15,8 +15,6 @@ module Souls
15
15
  delete_mutation(class_name: singularized_class_name)
16
16
  destroy_delete_mutation(class_name: singularized_class_name)
17
17
  end
18
- rescue Thor::Error => e
19
- raise(Thor::Error, e)
20
18
  end
21
19
 
22
20
  private
@@ -138,7 +136,8 @@ module Souls
138
136
  params[:relation_params].map do |n|
139
137
  ", #{n[:column_name]}: #{n[:column_name]}"
140
138
  end
141
- f.write(" new_record = { **args #{relation_params.compact.join} }\n")
139
+
140
+ f.write(" new_record = { **args, id: data_id #{relation_params.compact.join} }\n")
142
141
  else
143
142
  f.write(" new_record = args.except(:id)\n")
144
143
  end
@@ -7,8 +7,6 @@ module Souls
7
7
  update_rbs_mutation(class_name: singularized_class_name)
8
8
  delete_rbs_mutation(class_name: singularized_class_name)
9
9
  destroy_delete_rbs_mutation(class_name: singularized_class_name)
10
- rescue Thor::Error => e
11
- raise(Thor::Error, e)
12
10
  end
13
11
 
14
12
  private
@@ -101,8 +99,6 @@ module Souls
101
99
  end
102
100
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
103
101
  file_path
104
- rescue Thor::Error => e
105
- raise(Thor::Error, e)
106
102
  end
107
103
 
108
104
  def update_rbs_mutation(class_name: "user")
@@ -211,8 +207,6 @@ module Souls
211
207
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
212
208
  end
213
209
  file_path
214
- rescue Thor::Error => e
215
- raise(Thor::Error, e)
216
210
  end
217
211
 
218
212
  def destroy_delete_rbs_mutation(class_name: "user")
@@ -242,8 +236,6 @@ module Souls
242
236
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
243
237
  end
244
238
  file_path
245
- rescue Thor::Error => e
246
- raise(Thor::Error, e)
247
239
  end
248
240
  end
249
241
  end
@@ -7,8 +7,6 @@ module Souls
7
7
  singularized_class_name = class_name.singularize
8
8
  create_individual_query(class_name: singularized_class_name)
9
9
  create_index_query(class_name: singularized_class_name)
10
- rescue Thor::Error => e
11
- raise(Thor::Error, e)
12
10
  end
13
11
 
14
12
  private
@@ -34,8 +34,6 @@ module Souls
34
34
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
35
35
  end
36
36
  file_path
37
- rescue Thor::Error => e
38
- raise(Thor::Error, e)
39
37
  end
40
38
 
41
39
  def queries_rbs(class_name)
@@ -60,8 +58,6 @@ module Souls
60
58
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
61
59
  end
62
60
  file_path
63
- rescue Thor::Error => e
64
- raise(Thor::Error, e)
65
61
  end
66
62
  end
67
63
  end
@@ -13,8 +13,6 @@ module Souls
13
13
  resolver_end(class_name: singularized_class_name)
14
14
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
15
15
  file_path
16
- rescue Thor::Error => e
17
- raise(Thor::Error, e)
18
16
  end
19
17
 
20
18
  private
@@ -144,7 +142,7 @@ module Souls
144
142
  f.write(<<~TEXT)
145
143
  scope = scope.where("created_at >= ?", value[:start_date]) if value[:start_date]
146
144
  scope = scope.where("created_at <= ?", value[:end_date]) if value[:end_date]
147
- branches << scope
145
+ branches << scope.order(created_at: :desc)
148
146
  value[:OR].inject(branches) { |s, v| normalize_filters(v, s) } if value[:OR].present?
149
147
  branches
150
148
  end
@@ -37,8 +37,6 @@ module Souls
37
37
  end
38
38
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
39
39
  file_path
40
- rescue Thor::Error => e
41
- raise(Thor::Error, e)
42
40
  end
43
41
  end
44
42
  end
@@ -11,8 +11,6 @@ module Souls
11
11
  rspec_factory_end(class_name: singularized_class_name)
12
12
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
13
13
  file_path
14
- rescue Thor::Error => e
15
- raise(Thor::Error, e)
16
14
  end
17
15
 
18
16
  private
@@ -71,8 +71,6 @@ module Souls
71
71
  end
72
72
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
73
73
  file_path
74
- rescue Thor::Error => e
75
- raise(Thor::Error, e)
76
74
  end
77
75
  end
78
76
  end
@@ -42,8 +42,6 @@ module Souls
42
42
  end
43
43
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
44
44
  file_path
45
- rescue Thor::Error => e
46
- raise(Thor::Error, e)
47
45
  end
48
46
  end
49
47
  end
@@ -12,8 +12,6 @@ module Souls
12
12
  rspec_query_end(singularized_class_name)
13
13
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
14
14
  file_path
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
15
  end
18
16
 
19
17
  private
@@ -12,8 +12,6 @@ module Souls
12
12
  rspec_resolver_end(singularized_class_name)
13
13
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
14
14
  file_path
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
15
  end
18
16
 
19
17
  private
@@ -11,8 +11,6 @@ module Souls
11
11
  create_type_end(class_name: singularized_class_name)
12
12
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
13
13
  file_path
14
- rescue Thor::Error => e
15
- raise(Thor::Error, e)
16
14
  end
17
15
 
18
16
  private
@@ -51,8 +51,6 @@ module Souls
51
51
  end
52
52
  puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
53
53
  file_path
54
- rescue Thor::Error => e
55
- raise(Thor::Error, e)
56
54
  end
57
55
  end
58
56
  end
@@ -30,11 +30,25 @@ module Souls
30
30
 
31
31
  desc "watch", "Watch GitHub Actions Workflow"
32
32
  def watch
33
- run_list = `gh run list | grep in_progress | awk '{print $8}'`
34
- run_id = run_list.split("\n")
35
- raise(StandardError, "No workflow is running.") if run_id.empty?
33
+ workflows = JSON.parse(`gh api -X GET 'repos/#{ENV["GITHUB_REPOSITORY"]}/actions/runs'`)
36
34
 
37
- system("gh run watch #{run_id}")
35
+ wf_info =
36
+ workflows["workflow_runs"].filter_map do |wf|
37
+ { wf["name"].to_sym => wf["id"] } if wf["state"] == "in_progress"
38
+ end
39
+
40
+ wf_id =
41
+ case wf_info.size
42
+ when 0
43
+ raise(CLIException, "No workflow is running.")
44
+ when 1
45
+ wf_info[0].values[0]
46
+ else
47
+ prompt = TTY::Prompt.new
48
+ prompt.select("Which workflow would you like to watch?", wf_info.inject(:merge))
49
+ end
50
+
51
+ system("gh run watch #{wf_id}")
38
52
  end
39
53
 
40
54
  private
@@ -1,3 +1,4 @@
1
+ require_relative "./cli_exception"
1
2
  require_relative "./console/index"
2
3
  require_relative "./generate/index"
3
4
  require_relative "./github/index"
@@ -5,10 +5,17 @@ module Souls
5
5
  def server
6
6
  if options[:all]
7
7
  Dir.chdir(Souls.get_mother_path.to_s) do
8
+ front_path = "apps/console/package.json"
8
9
  system("foreman start -f Procfile.dev")
10
+ system("cd apps/console && yarn dev") if File.exist?(front_path)
9
11
  end
10
12
  else
11
- system("foreman start -f Procfile.dev")
13
+ package_json_path = "package.json"
14
+ if File.exist?(package_json_path)
15
+ system("yarn dev")
16
+ else
17
+ system("foreman start -f Procfile.dev")
18
+ end
12
19
  end
13
20
  end
14
21
  end
@@ -12,8 +12,6 @@ module Souls
12
12
  { white_text: ["`config/souls.rb`, `apps/api/config/souls.rb`", :white] }
13
13
  ]
14
14
  )
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
15
  end
18
16
 
19
17
  private
@@ -12,8 +12,6 @@ module Souls
12
12
  cp_env_files
13
13
  end
14
14
  puts(Paint % ["Synced! : %{white_text}", :green, { white_text: [cp_dir.to_s, :white] }])
15
- rescue Thor::Error => e
16
- raise(Thor::Error, e)
17
15
  end
18
16
 
19
17
  private
@@ -34,7 +32,7 @@ module Souls
34
32
  end
35
33
 
36
34
  def cp_env_files
37
- return unless File.exist?("./apps/api/.env")
35
+ return unless File.exist?("#{Souls.get_mother_path}/apps/api/.env")
38
36
 
39
37
  worker_paths = Souls.configuration.workers.map { |n| n[:name].split("-").last }
40
38
  worker_paths.each do |path|
@@ -5,8 +5,6 @@ module Souls
5
5
  Souls::Gcloud.new.config_set
6
6
  get_topics(workers: get_workers)
7
7
  puts(Paint["All Jobs Synced with PubSub Subscription!", :green])
8
- rescue Thor::Error => e
9
- raise(Thor::Error, e)
10
8
  end
11
9
 
12
10
  private
@@ -57,8 +57,6 @@ module Souls
57
57
  end
58
58
  File.open(file_path, "w") { |f| f.write(write_txt) }
59
59
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
60
- rescue Thor::Error => e
61
- raise(Thor::Error, e)
62
60
  end
63
61
 
64
62
  desc "update_mutation [CLASS_NAME]", "Update GraphQL Type from schema.rb"
@@ -123,8 +121,6 @@ module Souls
123
121
  FileUtils.rm(file_path)
124
122
  FileUtils.mv(new_file_path, file_path)
125
123
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
126
- rescue Thor::Error => e
127
- raise(Thor::Error, e)
128
124
  end
129
125
  end
130
126
  end
@@ -46,8 +46,6 @@ module Souls
46
46
  FileUtils.rm(file_path)
47
47
  FileUtils.mv(new_file_path, file_path)
48
48
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
49
- rescue Thor::Error => e
50
- raise(Thor::Error, e)
51
49
  end
52
50
 
53
51
  private
@@ -31,8 +31,6 @@ module Souls
31
31
  FileUtils.rm(file_path)
32
32
  FileUtils.mv(new_file_path, file_path)
33
33
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
34
- rescue Thor::Error => e
35
- raise(Thor::Error, e)
36
34
  end
37
35
 
38
36
  private
@@ -69,8 +69,6 @@ module Souls
69
69
  FileUtils.rm(file_path)
70
70
  FileUtils.mv(new_file_path, file_path)
71
71
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
72
- rescue Thor::Error => e
73
- raise(Thor::Error, e)
74
72
  end
75
73
 
76
74
  private
@@ -51,8 +51,6 @@ module Souls
51
51
  FileUtils.rm(file_path)
52
52
  FileUtils.mv(new_file_path, file_path)
53
53
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
54
- rescue Thor::Error => e
55
- raise(Thor::Error, e)
56
54
  end
57
55
 
58
56
  private
@@ -29,8 +29,6 @@ module Souls
29
29
  FileUtils.rm(file_path)
30
30
  FileUtils.mv(new_file_path, file_path)
31
31
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
32
- rescue Thor::Error => e
33
- raise(Thor::Error, e)
34
32
  end
35
33
 
36
34
  private
@@ -39,8 +39,6 @@ module Souls
39
39
  FileUtils.rm(file_path)
40
40
  FileUtils.mv(new_file_path, file_path)
41
41
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
42
- rescue Thor::Error => e
43
- raise(Thor::Error, e)
44
42
  end
45
43
  end
46
44
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.8.3".freeze
2
+ VERSION = "1.8.8".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.8.3
1
+ 1.8.8
@@ -1 +1 @@
1
- 1.8.3
1
+ 1.8.8
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.8.3
4
+ version: 1.8.8
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-11-17 00:00:00.000000000 Z
13
+ date: 2021-11-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport