souls 1.17.3 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/exe/souls +2 -2
  4. data/lib/souls/app/graphql/souls_connection.rb +2 -2
  5. data/lib/souls/app/graphql/souls_mutation.rb +5 -5
  6. data/lib/souls/app/graphql/souls_query.rb +2 -2
  7. data/lib/souls/app/graphql/types/base_argument.rb +1 -1
  8. data/lib/souls/app/graphql/types/base_enum.rb +1 -1
  9. data/lib/souls/app/graphql/types/base_field.rb +2 -2
  10. data/lib/souls/app/graphql/types/base_input_object.rb +2 -2
  11. data/lib/souls/app/graphql/types/base_interface.rb +2 -2
  12. data/lib/souls/app/graphql/types/base_object.rb +3 -3
  13. data/lib/souls/app/graphql/types/base_scalar.rb +1 -1
  14. data/lib/souls/app/graphql/types/base_union.rb +1 -1
  15. data/lib/souls/app/graphql/types/index.rb +1 -1
  16. data/lib/souls/app/index.rb +1 -1
  17. data/lib/souls/app/utils/painter.rb +1 -1
  18. data/lib/souls/app/utils/souls_logger.rb +3 -3
  19. data/lib/souls/cli/cli_exception.rb +1 -1
  20. data/lib/souls/cli/console/index.rb +1 -1
  21. data/lib/souls/cli/create/functions.rb +5 -5
  22. data/lib/souls/cli/create/index.rb +13 -13
  23. data/lib/souls/cli/db/create_migration.rb +5 -5
  24. data/lib/souls/cli/db/create_migration_rbs.rb +3 -3
  25. data/lib/souls/cli/db/index.rb +2 -2
  26. data/lib/souls/cli/db/model.rb +2 -2
  27. data/lib/souls/cli/db/model_rbs.rb +3 -3
  28. data/lib/souls/cli/db/rspec_model.rb +2 -2
  29. data/lib/souls/cli/delete/application.rb +3 -3
  30. data/lib/souls/cli/delete/connection.rb +2 -2
  31. data/lib/souls/cli/delete/connection_rbs.rb +3 -3
  32. data/lib/souls/cli/delete/edge.rb +2 -2
  33. data/lib/souls/cli/delete/edge_rbs.rb +3 -3
  34. data/lib/souls/cli/delete/index.rb +1 -1
  35. data/lib/souls/cli/delete/job.rb +4 -4
  36. data/lib/souls/cli/delete/job_rbs.rb +4 -4
  37. data/lib/souls/cli/delete/manager.rb +4 -4
  38. data/lib/souls/cli/delete/manager_rbs.rb +3 -3
  39. data/lib/souls/cli/delete/migration_file.rb +3 -3
  40. data/lib/souls/cli/delete/mutation.rb +3 -3
  41. data/lib/souls/cli/delete/mutation_rbs.rb +3 -3
  42. data/lib/souls/cli/delete/query.rb +2 -2
  43. data/lib/souls/cli/delete/query_rbs.rb +3 -3
  44. data/lib/souls/cli/delete/resolver.rb +2 -2
  45. data/lib/souls/cli/delete/resolver_rbs.rb +3 -3
  46. data/lib/souls/cli/delete/rspec_factory.rb +2 -2
  47. data/lib/souls/cli/delete/rspec_job.rb +2 -2
  48. data/lib/souls/cli/delete/rspec_manager.rb +2 -2
  49. data/lib/souls/cli/delete/rspec_mutation.rb +2 -2
  50. data/lib/souls/cli/delete/rspec_query.rb +2 -2
  51. data/lib/souls/cli/delete/rspec_resolver.rb +2 -2
  52. data/lib/souls/cli/delete/type.rb +2 -2
  53. data/lib/souls/cli/delete/type_rbs.rb +3 -3
  54. data/lib/souls/cli/docker/index.rb +1 -1
  55. data/lib/souls/cli/gcloud/compute/index.rb +24 -24
  56. data/lib/souls/cli/gcloud/functions/index.rb +18 -18
  57. data/lib/souls/cli/gcloud/iam/index.rb +12 -12
  58. data/lib/souls/cli/gcloud/index.rb +5 -5
  59. data/lib/souls/cli/gcloud/pubsub/subscriptions.rb +3 -3
  60. data/lib/souls/cli/gcloud/pubsub/topics.rb +1 -1
  61. data/lib/souls/cli/gcloud/run/index.rb +1 -1
  62. data/lib/souls/cli/gcloud/scheduler/index.rb +4 -4
  63. data/lib/souls/cli/gcloud/sql/index.rb +17 -17
  64. data/lib/souls/cli/generate/application.rb +4 -4
  65. data/lib/souls/cli/generate/connection.rb +2 -2
  66. data/lib/souls/cli/generate/connection_rbs.rb +3 -3
  67. data/lib/souls/cli/generate/edge.rb +2 -2
  68. data/lib/souls/cli/generate/edge_rbs.rb +3 -3
  69. data/lib/souls/cli/generate/index.rb +1 -1
  70. data/lib/souls/cli/generate/job.rb +9 -9
  71. data/lib/souls/cli/generate/job_rbs.rb +4 -4
  72. data/lib/souls/cli/generate/manager.rb +4 -4
  73. data/lib/souls/cli/generate/manager_rbs.rb +3 -3
  74. data/lib/souls/cli/generate/mutation.rb +15 -15
  75. data/lib/souls/cli/generate/mutation_rbs.rb +17 -17
  76. data/lib/souls/cli/generate/query.rb +3 -3
  77. data/lib/souls/cli/generate/query_rbs.rb +3 -3
  78. data/lib/souls/cli/generate/resolver.rb +8 -8
  79. data/lib/souls/cli/generate/resolver_rbs.rb +3 -3
  80. data/lib/souls/cli/generate/rspec_factory.rb +4 -4
  81. data/lib/souls/cli/generate/rspec_job.rb +4 -4
  82. data/lib/souls/cli/generate/rspec_manager.rb +3 -3
  83. data/lib/souls/cli/generate/rspec_mutation.rb +9 -9
  84. data/lib/souls/cli/generate/rspec_query.rb +7 -7
  85. data/lib/souls/cli/generate/rspec_resolver.rb +7 -7
  86. data/lib/souls/cli/generate/type.rb +5 -5
  87. data/lib/souls/cli/generate/type_rbs.rb +6 -6
  88. data/lib/souls/cli/github/index.rb +13 -13
  89. data/lib/souls/cli/index.rb +1 -1
  90. data/lib/souls/cli/init/index.rb +8 -8
  91. data/lib/souls/cli/release/release.rb +8 -8
  92. data/lib/souls/cli/server/index.rb +2 -2
  93. data/lib/souls/cli/sync/conf.rb +8 -8
  94. data/lib/souls/cli/sync/model.rb +13 -13
  95. data/lib/souls/cli/sync/pubsub.rb +9 -9
  96. data/lib/souls/cli/update/index.rb +2 -2
  97. data/lib/souls/cli/update/mutation.rb +8 -8
  98. data/lib/souls/cli/update/mutation_rbs.rb +11 -11
  99. data/lib/souls/cli/update/resolver.rb +5 -5
  100. data/lib/souls/cli/update/rspec_factory.rb +4 -4
  101. data/lib/souls/cli/update/rspec_mutation.rb +5 -5
  102. data/lib/souls/cli/update/rspec_resolver.rb +4 -4
  103. data/lib/souls/cli/update/type.rb +4 -4
  104. data/lib/souls/cli/update/type_rbs.rb +5 -5
  105. data/lib/souls/cli/upgrade/config.rb +3 -3
  106. data/lib/souls/cli/upgrade/gemfile.rb +4 -4
  107. data/lib/souls/cli/upgrade/submodule.rb +1 -1
  108. data/lib/souls/cli.rb +5 -5
  109. data/lib/souls/index.rb +1 -1
  110. data/lib/souls/souls_path.rb +2 -2
  111. data/lib/souls/utils/index.rb +7 -7
  112. data/lib/souls/version.rb +2 -2
  113. data/lib/souls/versions/.souls_api_version +1 -1
  114. data/lib/souls/versions/.souls_worker_version +1 -1
  115. data/lib/souls.rb +2 -2
  116. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50c2546cda3df7c36c343893ae5c5bc3efe8c43e23d6dbab4e44a35fe5f91486
4
- data.tar.gz: bb23da4a0831b75fd7f07a47c12f849495ebc73f31eddb80bf3bbcb212b80599
3
+ metadata.gz: 5a9005c1b66ccc08bbc1997cbb81addf3489b5410717e88146e345db9fee8ca3
4
+ data.tar.gz: 2e727f7b8adb1f7b7fa9fac25d1e93e355da3bdcb4240611f2e74c367888b70c
5
5
  SHA512:
6
- metadata.gz: e40ca30ed1eca8cf521e904cc6a848ab722f0e69b5b877cec055d9473d9d26dbafed8f90324fcd85510ded519b3669c56e9b5bb317c259bcba56ddc14f350e18
7
- data.tar.gz: 2a2cd92183edd70665236a84e6ec106abf94692ba22d551aac7bcdf426ca83d635326c6e854eda1cd56c92393448a13142e8da204d7533871efb298655531b86
6
+ metadata.gz: 23bd0953ff05075cd6424540d7eaf71d91a62e253f03d0a54a248d78df7d4b0c41f004ee1821c3ed61e7075cd6e7788fdc804c8345aa53d50aa28cf8003a3ad5
7
+ data.tar.gz: 4105a106fc7fac76f6786490ea8115429a416957831458f1f5c0b85f5deb82686974a7e8bb7dd1fbb9caa830e1a3ca92fbf79a5d0a48ec7559e56349398b1373
data/README.md CHANGED
@@ -145,4 +145,4 @@ The gem is available as open source under the terms of the [Apache-2.0 License](
145
145
 
146
146
  ## Code of Conduct
147
147
 
148
- Everyone interacting in the Souls project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/elsoul/souls/blob/master/CODE_OF_CONDUCT.md).
148
+ Everyone interacting in the SOULs project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/elsoul/souls/blob/master/CODE_OF_CONDUCT.md).
data/exe/souls CHANGED
@@ -3,7 +3,7 @@ require "souls"
3
3
  require "thor"
4
4
  begin
5
5
  souls_command = ARGV[0]
6
- require(Souls.get_mother_path.to_s + "/config/souls") unless [
6
+ require(SOULs.get_mother_path.to_s + "/config/souls") unless [
7
7
  "new",
8
8
  "docker",
9
9
  "-v",
@@ -15,4 +15,4 @@ rescue StandardError
15
15
  raise(StandardError, "No config! Please make `./config/souls.rb` File!")
16
16
  end
17
17
 
18
- Souls::CLI.start
18
+ SOULs::CLI.start
@@ -1,5 +1,5 @@
1
- module Souls
2
- class SoulsConnection < GraphQL::Types::Relay::BaseConnection
1
+ module SOULs
2
+ class SOULsConnection < GraphQL::Types::Relay::BaseConnection
3
3
  field :total_count, Integer, null: false do
4
4
  description "Total number of items"
5
5
  end
@@ -1,5 +1,5 @@
1
- module Souls
2
- class SoulsMutation < GraphQL::Schema::RelayClassicMutation
1
+ module SOULs
2
+ class SOULsMutation < GraphQL::Schema::RelayClassicMutation
3
3
  def souls_fb_auth(token:)
4
4
  FirebaseIdToken::Certificates.request!
5
5
  sleep(3) if ENV["RACK_ENV"] == "development"
@@ -34,15 +34,15 @@ module Souls
34
34
  end
35
35
 
36
36
  def post_to_dev(worker_name: "", query_string: "")
37
- app = Souls.configuration.app
37
+ app = SOULs.configuration.app
38
38
  port = get_worker(worker_name: "souls-#{app}-#{worker_name}")[0][:port]
39
- endpoint = Souls.configuration.endpoint
39
+ endpoint = SOULs.configuration.endpoint
40
40
  res = Net::HTTP.post_form(URI.parse("http://localhost:#{port}#{endpoint}"), { query: query_string })
41
41
  res.body
42
42
  end
43
43
 
44
44
  def get_worker(worker_name: "")
45
- workers = Souls.configuration.workers
45
+ workers = SOULs.configuration.workers
46
46
  workers.filter { |n| n[:name] == worker_name }
47
47
  end
48
48
 
@@ -1,5 +1,5 @@
1
- module Souls
2
- class SoulsQuery < GraphQL::Schema::Resolver
1
+ module SOULs
2
+ class SOULsQuery < GraphQL::Schema::Resolver
3
3
  @schedule = nil
4
4
  class << self
5
5
  attr_accessor :schedule
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  module Types
3
3
  class BaseArgument < GraphQL::Schema::Argument
4
4
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  module Types
3
3
  class BaseEnum < GraphQL::Schema::Enum
4
4
  end
@@ -1,7 +1,7 @@
1
- module Souls
1
+ module SOULs
2
2
  module Types
3
3
  class BaseField < GraphQL::Schema::Field
4
- argument_class Souls::Types::BaseArgument
4
+ argument_class SOULs::Types::BaseArgument
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
- module Souls
1
+ module SOULs
2
2
  module Types
3
3
  class BaseInputObject < GraphQL::Schema::InputObject
4
- argument_class Souls::Types::BaseArgument
4
+ argument_class SOULs::Types::BaseArgument
5
5
  end
6
6
  end
7
7
  end
@@ -1,9 +1,9 @@
1
- module Souls
1
+ module SOULs
2
2
  module Types
3
3
  module BaseInterface
4
4
  include GraphQL::Schema::Interface
5
5
 
6
- field_class Souls::Types::BaseField
6
+ field_class SOULs::Types::BaseField
7
7
  end
8
8
  end
9
9
  end
@@ -1,8 +1,8 @@
1
- module Souls
1
+ module SOULs
2
2
  module Types
3
3
  class BaseObject < GraphQL::Schema::Object
4
- field_class Souls::Types::BaseField
5
- connection_type_class Souls::SoulsConnection
4
+ field_class SOULs::Types::BaseField
5
+ connection_type_class SOULs::SOULsConnection
6
6
  end
7
7
  end
8
8
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  module Types
3
3
  class BaseScalar < GraphQL::Schema::Scalar
4
4
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  module Types
3
3
  class BaseUnion < GraphQL::Schema::Union
4
4
  end
@@ -7,5 +7,5 @@ require_relative "base_object"
7
7
  require_relative "base_scalar"
8
8
  require_relative "base_union"
9
9
 
10
- module Souls
10
+ module SOULs
11
11
  end
@@ -6,5 +6,5 @@ require_relative "utils/painter"
6
6
  require_relative "utils/firebase_id_token"
7
7
  require_relative "graphql/types/index"
8
8
 
9
- module Souls
9
+ module SOULs
10
10
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  module Painter
3
3
  class << self
4
4
  def create_file(text)
@@ -1,5 +1,5 @@
1
- module Souls
2
- module SoulsLogger
1
+ module SOULs
2
+ module SOULsLogger
3
3
  class Configuration
4
4
  attr_accessor :logger
5
5
 
@@ -47,7 +47,7 @@ module Souls
47
47
  entry.log_name = "error"
48
48
  entry.resource.type = "cloud_run_revision"
49
49
  entry.resource.labels[:service_name] = "souls"
50
- entry.resource.labels[:revision_name] = Souls::VERSION
50
+ entry.resource.labels[:revision_name] = SOULs::VERSION
51
51
 
52
52
  entry
53
53
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  class CLIException < StandardError
3
3
  attr_reader :message
4
4
 
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  class CLI < Thor
3
3
  desc "console", "Run IRB Console"
4
4
  method_option :env, aliases: "--e", default: "development", desc: "Difine APP Enviroment - development | production"
@@ -1,10 +1,10 @@
1
1
  require_relative "./templates/functions_env_yaml"
2
2
 
3
- Dir["#{Souls::SOULS_PATH}/lib/souls/cli/create/templates/*/*.rb"].map do |f|
3
+ Dir["#{SOULs::SOULS_PATH}/lib/souls/cli/create/templates/*/*.rb"].map do |f|
4
4
  require f
5
5
  end
6
6
 
7
- module Souls
7
+ module SOULs
8
8
  class Create < Thor
9
9
  desc "functions [name]", "Create SOULs functions"
10
10
  def functions(function_name)
@@ -44,7 +44,7 @@ module Souls
44
44
  end
45
45
  file_name = file_dir.gsub("./apps/", "")
46
46
  File.write(file_path, Object.const_get("Template::#{runtime}").__send__(method, file_name))
47
- Souls::Painter.create_file(file_path)
47
+ SOULs::Painter.create_file(file_path)
48
48
  end
49
49
  create_env_yaml(file_dir: file_dir)
50
50
  end
@@ -57,12 +57,12 @@ module Souls
57
57
  raise(StandardError, "Already Exist!") if File.exist?(file_path)
58
58
 
59
59
  File.write(file_path, Template.functions_env_yaml)
60
- Souls::Painter.create_file(file_path)
60
+ SOULs::Painter.create_file(file_path)
61
61
  file_path
62
62
  end
63
63
 
64
64
  def get_runtime_create_method(runtime:)
65
- Dir["#{Souls::SOULS_PATH}/lib/souls/cli/create/templates/#{runtime}/*"].map do |n|
65
+ Dir["#{SOULs::SOULS_PATH}/lib/souls/cli/create/templates/#{runtime}/*"].map do |n|
66
66
  n.split("/").last.gsub(".rb", "")
67
67
  end
68
68
  end
@@ -1,16 +1,16 @@
1
1
  require_relative "./functions"
2
- module Souls
2
+ module SOULs
3
3
  class Create < Thor
4
4
  desc "worker [name]", "Create SOULs Worker"
5
5
  def worker(name)
6
- require("#{Souls.get_mother_path}/config/souls")
7
- Dir.chdir(Souls.get_mother_path.to_s) do
6
+ require("#{SOULs.get_mother_path}/config/souls")
7
+ Dir.chdir(SOULs.get_mother_path.to_s) do
8
8
  worker_name = "worker-#{name}"
9
9
  file_dir = "apps/worker-#{name}"
10
10
  raise(StandardError, "Same Worker Already Exist!") if Dir.exist?(file_dir)
11
11
 
12
- workers = Souls.configuration.workers
13
- app = Souls.configuration.app
12
+ workers = SOULs.configuration.workers
13
+ app = SOULs.configuration.app
14
14
  port = 3000 + workers.size
15
15
  souls_worker_name = "souls-#{app}-#{worker_name}"
16
16
  download_worker(worker_name: worker_name)
@@ -64,7 +64,7 @@ module Souls
64
64
  end
65
65
 
66
66
  def souls_conf_update(worker_name: "worker-mailer", strain: "mother")
67
- workers = Souls.configuration.workers
67
+ workers = SOULs.configuration.workers
68
68
  port = 3000 + workers.size
69
69
  file_path = strain == "mother" ? "config/souls.rb" : "apps/api/config/souls.rb"
70
70
 
@@ -206,20 +206,20 @@ end
206
206
  --set-env-vars="SOULS_PROJECT_ID=${{ secrets.SOULS_GCP_PROJECT_ID }}"
207
207
  TEXT
208
208
  end
209
- Souls::Painter.create_file(file_path.to_s)
209
+ SOULs::Painter.create_file(file_path.to_s)
210
210
  file_path
211
211
  end
212
212
 
213
213
  def souls_config_init(worker_name: "worker-mailer")
214
- app_name = Souls.configuration.app
215
- project_id = Souls.configuration.project_id
214
+ app_name = SOULs.configuration.app
215
+ project_id = SOULs.configuration.project_id
216
216
  config_dir = "apps/#{worker_name}/config"
217
217
  FileUtils.mkdir_p(config_dir) unless Dir.exist?(config_dir)
218
218
  FileUtils.touch("#{config_dir}/souls.rb")
219
219
  file_path = "#{config_dir}/souls.rb"
220
220
  File.open(file_path, "w") do |f|
221
221
  f.write(<<~TEXT)
222
- Souls.configure do |config|
222
+ SOULs.configure do |config|
223
223
  config.app = "#{app_name}"
224
224
  config.project_id = "#{project_id}"
225
225
  config.region = "asia-northeast1"
@@ -238,7 +238,7 @@ end
238
238
  file_path = "#{file_dir}/souls_helper.rbs"
239
239
  File.open(file_path, "w") do |f|
240
240
  f.write(<<~TEXT)
241
- module SoulsHelper
241
+ module SOULsHelper
242
242
  def self.export_csv: (untyped model_name) -> (String? | StandardError )
243
243
  def self.export_model_to_csv: (untyped model_name) -> (untyped | StandardError )
244
244
  def self.upload_to_gcs: (String file_path, String upload_path) -> untyped
@@ -274,7 +274,7 @@ end
274
274
  end
275
275
 
276
276
  def download_worker(worker_name: "worker-mailer")
277
- version = Souls.get_latest_version_txt(service_name: "worker").join(".")
277
+ version = SOULs.get_latest_version_txt(service_name: "worker").join(".")
278
278
  file_name = "worker-v#{version}.tgz"
279
279
  url = "https://storage.googleapis.com/souls-bucket/boilerplates/workers/#{file_name}"
280
280
  puts(url)
@@ -305,7 +305,7 @@ end
305
305
  puts(line)
306
306
  welcome = Paint["SOULs Worker is Ready!", :white]
307
307
  puts(welcome)
308
- souls_ver = Paint["SOULs Version: #{Souls::VERSION}", :white]
308
+ souls_ver = Paint["SOULs Version: #{SOULs::VERSION}", :white]
309
309
  puts(souls_ver)
310
310
  puts(line)
311
311
  endroll = <<~TEXT
@@ -1,13 +1,13 @@
1
- module Souls
1
+ module SOULs
2
2
  class DB < Thor
3
3
  desc "create_migration [CLASS_NAME]", "Create ActiveRecord Migration File"
4
4
  def create_migration(class_name)
5
5
  pluralized_class_name = class_name.underscore.pluralize
6
6
  singularized_class_name = class_name.underscore.singularize
7
- Souls::DB.new.invoke(:model, [singularized_class_name], {})
8
- Souls::DB.new.invoke(:rspec_model, [singularized_class_name], {})
9
- Souls::DB.new.invoke(:model_rbs, [singularized_class_name], {})
10
- Souls::Painter.create_file("")
7
+ SOULs::DB.new.invoke(:model, [singularized_class_name], {})
8
+ SOULs::DB.new.invoke(:rspec_model, [singularized_class_name], {})
9
+ SOULs::DB.new.invoke(:model_rbs, [singularized_class_name], {})
10
+ SOULs::Painter.create_file("")
11
11
  system("rake db:create_migration NAME=create_#{pluralized_class_name}")
12
12
  file_path = Dir["db/migrate/*create_#{pluralized_class_name}.rb"].first
13
13
  File.open(file_path, "w") do |f|
@@ -1,9 +1,9 @@
1
- module Souls
1
+ module SOULs
2
2
  class DB < Thor
3
3
  desc "create_migration_rbs [CLASS_NAME]", "Generate ActiveRecord Migration's RBS Template"
4
4
  def create_migration_rbs(class_name)
5
5
  file_path = ""
6
- Dir.chdir(Souls.get_mother_path.to_s) do
6
+ Dir.chdir(SOULs.get_mother_path.to_s) do
7
7
  file_dir = "./sig/api/db/migrate"
8
8
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
9
  pluralized_class_name = class_name.underscore.pluralize
@@ -17,7 +17,7 @@ module Souls
17
17
  end
18
18
  TEXT
19
19
  end
20
- Souls::Painter.create_file(file_path.to_s)
20
+ SOULs::Painter.create_file(file_path.to_s)
21
21
  end
22
22
  file_path
23
23
  end
@@ -5,7 +5,7 @@ require_relative "./rspec_model"
5
5
  require_relative "./model_rbs"
6
6
  require_relative "../cli_exception"
7
7
 
8
- module Souls
8
+ module SOULs
9
9
  class DB < Thor
10
10
  desc "migrate", "Migrate Database"
11
11
  method_option :env, aliases: "--e", default: "development", desc: "Difine APP Enviroment - development | production"
@@ -102,7 +102,7 @@ module Souls
102
102
  private
103
103
 
104
104
  def db_system(cmd)
105
- system(cmd) or Souls::Painter.error("DB is not running. Please run `souls docker psql`")
105
+ system(cmd) or SOULs::Painter.error("DB is not running. Please run `souls docker psql`")
106
106
  end
107
107
  end
108
108
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  class DB < Thor
3
3
  desc "model [CLASS_NAME]", "Generate Model Template"
4
4
  def model(class_name)
@@ -13,7 +13,7 @@ module Souls
13
13
  end
14
14
  TEXT
15
15
  end
16
- Souls::Painter.create_file(file_path.to_s)
16
+ SOULs::Painter.create_file(file_path.to_s)
17
17
  file_path
18
18
  end
19
19
  end
@@ -1,9 +1,9 @@
1
- module Souls
1
+ module SOULs
2
2
  class DB < Thor
3
3
  desc "model_rbs [CLASS_NAME]", "Generate GraphQL Model RBS from schema.rb"
4
4
  def model_rbs(class_name)
5
5
  file_path = ""
6
- Dir.chdir(Souls.get_mother_path.to_s) do
6
+ Dir.chdir(SOULs.get_mother_path.to_s) do
7
7
  file_dir = "./sig/api/app/models/"
8
8
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
9
  singularized_class_name = class_name.underscore.singularize
@@ -14,7 +14,7 @@ module Souls
14
14
  end
15
15
  TEXT
16
16
  end
17
- Souls::Painter.create_file(file_path.to_s)
17
+ SOULs::Painter.create_file(file_path.to_s)
18
18
  end
19
19
  file_path
20
20
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  class DB < Thor
3
3
  desc "rspec_model [CLASS_NAME]", "Generate Rspec Model Test from schema.rb"
4
4
  def rspec_model(class_name)
@@ -18,7 +18,7 @@ module Souls
18
18
  end
19
19
  TEXT
20
20
  end
21
- Souls::Painter.create_file(file_path.to_s)
21
+ SOULs::Painter.create_file(file_path.to_s)
22
22
  file_path
23
23
  end
24
24
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  class Delete < Thor
3
3
  desc "scaffold [CLASS_NAME]", "Delete Scaffold"
4
4
  method_option :rbs, type: :boolean, aliases: "--rbs", default: false, desc: "Deletes Only RBS Files"
@@ -16,8 +16,8 @@ module Souls
16
16
  method_option :rbs, type: :boolean, aliases: "--rbs", default: false, desc: "Deletes Only RBS Files"
17
17
  def scaffold_all
18
18
  puts(Paint["Delete All Scaffold Files!\n", :cyan])
19
- Souls.get_tables.each do |table|
20
- Souls::Delete.new.invoke(:scaffold, [table.singularize], { rbs: options[:rbs] })
19
+ SOULs.get_tables.each do |table|
20
+ SOULs::Delete.new.invoke(:scaffold, [table.singularize], { rbs: options[:rbs] })
21
21
  end
22
22
  true
23
23
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  class Delete < Thor
3
3
  desc "connection [CLASS_NAME]", "Delete GraphQL Connection"
4
4
  def connection(class_name)
@@ -6,7 +6,7 @@ module Souls
6
6
  singularized_class_name = class_name.underscore.singularize
7
7
  file_path = "#{file_dir}#{singularized_class_name}_connection.rb"
8
8
  FileUtils.rm_f(file_path)
9
- Souls::Painter.delete_file(file_path)
9
+ SOULs::Painter.delete_file(file_path)
10
10
  file_path
11
11
  end
12
12
  end
@@ -1,14 +1,14 @@
1
- module Souls
1
+ module SOULs
2
2
  class Delete < Thor
3
3
  desc "connection_rbs [CLASS_NAME]", "Delete GraphQL Connection RBS"
4
4
  def connection_rbs(class_name)
5
5
  file_path = ""
6
- Dir.chdir(Souls.get_mother_path.to_s) do
6
+ Dir.chdir(SOULs.get_mother_path.to_s) do
7
7
  singularized_class_name = class_name.underscore.singularize
8
8
  file_dir = "./sig/api/app/graphql/types/connections/"
9
9
  file_path = "#{file_dir}#{singularized_class_name}_connection.rbs"
10
10
  FileUtils.rm_f(file_path)
11
- Souls::Painter.delete_file(file_path.to_s)
11
+ SOULs::Painter.delete_file(file_path.to_s)
12
12
  end
13
13
  file_path
14
14
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  class Delete < Thor
3
3
  desc "edge [CLASS_NAME]", "Delete GraphQL Edge"
4
4
  def edge(class_name)
@@ -6,7 +6,7 @@ module Souls
6
6
  singularized_class_name = class_name.underscore.singularize
7
7
  file_path = "#{file_dir}#{singularized_class_name}_edge.rb"
8
8
  FileUtils.rm_f(file_path)
9
- Souls::Painter.delete_file(file_path.to_s)
9
+ SOULs::Painter.delete_file(file_path.to_s)
10
10
  file_path
11
11
  end
12
12
  end
@@ -1,13 +1,13 @@
1
- module Souls
1
+ 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
- Dir.chdir(Souls.get_mother_path.to_s) do
5
+ Dir.chdir(SOULs.get_mother_path.to_s) do
6
6
  file_dir = "./sig/api/app/graphql/types/edges/"
7
7
  singularized_class_name = class_name.underscore.singularize
8
8
  file_path = "#{file_dir}#{singularized_class_name}_edge.rbs"
9
9
  FileUtils.rm_f(file_path)
10
- Souls::Painter.delete_file(file_path)
10
+ SOULs::Painter.delete_file(file_path)
11
11
  file_path
12
12
  end
13
13
  end
@@ -12,7 +12,7 @@ require_paths.each do |path|
12
12
  require_relative "./#{path}"
13
13
  end
14
14
 
15
- module Souls
15
+ module SOULs
16
16
  class Delete < Thor
17
17
  end
18
18
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  class Delete < Thor
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"
@@ -7,9 +7,9 @@ module Souls
7
7
  file_path = "#{file_dir}#{class_name.singularize}.rb"
8
8
 
9
9
  FileUtils.rm_f(file_path)
10
- Souls::Painter.delete_file(file_path.to_s)
11
- Souls::Delete.new.invoke(:job_rbs, [class_name], {})
12
- Souls::Delete.new.invoke(:rspec_job, [class_name], {})
10
+ SOULs::Painter.delete_file(file_path.to_s)
11
+ SOULs::Delete.new.invoke(:job_rbs, [class_name], {})
12
+ SOULs::Delete.new.invoke(:rspec_job, [class_name], {})
13
13
  end
14
14
  end
15
15
  end
@@ -1,20 +1,20 @@
1
- module Souls
1
+ module SOULs
2
2
  class Delete < Thor
3
3
  desc "job_rbs [CLASS_NAME]", "Delete SOULs Job Mutation RBS Template"
4
4
  def job_rbs(class_name)
5
5
  file_path = ""
6
6
  worker_name = FileUtils.pwd.split("/").last
7
7
  if worker_name == "api" || FileUtils.pwd.split("/")[-2] != "apps"
8
- raise(Souls::CLIException, "This task must be run from within a worker directory")
8
+ raise(SOULs::CLIException, "This task must be run from within a worker directory")
9
9
  end
10
10
 
11
- Dir.chdir(Souls.get_mother_path.to_s) do
11
+ Dir.chdir(SOULs.get_mother_path.to_s) do
12
12
  singularized_class_name = class_name.underscore.singularize
13
13
  file_dir = "./sig/#{worker_name}/app/graphql/queries/"
14
14
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
15
15
  file_path = "#{file_dir}#{singularized_class_name}.rbs"
16
16
  FileUtils.rm_f(file_path)
17
- Souls::Painter.delete_file(file_path.to_s)
17
+ SOULs::Painter.delete_file(file_path.to_s)
18
18
  end
19
19
  file_path
20
20
  end
@@ -1,4 +1,4 @@
1
- module Souls
1
+ module SOULs
2
2
  class Delete < Thor
3
3
  desc "manager [MANAGER_NAME]", "Delete GraphQL Mutation Template"
4
4
  method_option :mutation, aliases: "--mutation", required: true, desc: "Mutation File Name"
@@ -8,9 +8,9 @@ module Souls
8
8
  file_path = "#{file_dir}/#{options[:mutation]}.rb"
9
9
 
10
10
  FileUtils.rm_f(file_path)
11
- Souls::Painter.delete_file(file_path.to_s)
12
- Souls::Delete.new.invoke(:manager_rbs, [singularized_class_name], { mutation: options[:mutation] })
13
- Souls::Delete.new.invoke(:rspec_manager, [singularized_class_name], { mutation: options[:mutation] })
11
+ SOULs::Painter.delete_file(file_path.to_s)
12
+ SOULs::Delete.new.invoke(:manager_rbs, [singularized_class_name], { mutation: options[:mutation] })
13
+ SOULs::Delete.new.invoke(:rspec_manager, [singularized_class_name], { mutation: options[:mutation] })
14
14
  file_path
15
15
  end
16
16
  end
@@ -1,15 +1,15 @@
1
- module Souls
1
+ module SOULs
2
2
  class Delete < Thor
3
3
  desc "manager_rbs [CLASS_NAME]", "Delete SOULs Manager RBS Template"
4
4
  method_option :mutation, aliases: "--mutation", required: true, desc: "Mutation File Name"
5
5
  def manager_rbs(class_name)
6
6
  file_path = ""
7
7
  singularized_class_name = class_name.underscore.singularize
8
- Dir.chdir(Souls.get_mother_path.to_s) do
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
10
  file_path = "#{file_dir}/#{options[:mutation]}.rbs"
11
11
  FileUtils.rm_f(file_path)
12
- Souls::Painter.delete_file(file_path.to_s)
12
+ SOULs::Painter.delete_file(file_path.to_s)
13
13
  end
14
14
  file_path
15
15
  end