souls 2.0.4 → 3.0.2

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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -28
  3. data/lib/souls/app/utils/firebase_id_token.rb +1 -1
  4. data/lib/souls/cli/create/index.rb +0 -62
  5. data/lib/souls/cli/db/create_migration.rb +0 -1
  6. data/lib/souls/cli/db/index.rb +0 -2
  7. data/lib/souls/cli/delete/application.rb +2 -18
  8. data/lib/souls/cli/delete/job.rb +0 -1
  9. data/lib/souls/cli/delete/manager.rb +0 -1
  10. data/lib/souls/cli/delete/migration_file.rb +0 -1
  11. data/lib/souls/cli/gcloud/iam/index.rb +17 -19
  12. data/lib/souls/cli/gcloud/sql/index.rb +2 -0
  13. data/lib/souls/cli/generate/application.rb +2 -27
  14. data/lib/souls/cli/generate/job.rb +0 -1
  15. data/lib/souls/cli/generate/manager.rb +0 -1
  16. data/lib/souls/cli/generate/mutation.rb +2 -2
  17. data/lib/souls/cli/init/index.rb +0 -9
  18. data/lib/souls/cli/update/index.rb +0 -7
  19. data/lib/souls/cli/upgrade/index.rb +0 -1
  20. data/lib/souls/cli.rb +2 -20
  21. data/lib/souls/utils/index.rb +0 -13
  22. data/lib/souls/version.rb +1 -1
  23. data/lib/souls/versions/.souls_api_version +1 -1
  24. data/lib/souls/versions/.souls_worker_version +1 -1
  25. metadata +5 -26
  26. data/lib/souls/cli/db/create_migration_rbs.rb +0 -25
  27. data/lib/souls/cli/db/model_rbs.rb +0 -22
  28. data/lib/souls/cli/delete/connection_rbs.rb +0 -16
  29. data/lib/souls/cli/delete/edge_rbs.rb +0 -15
  30. data/lib/souls/cli/delete/job_rbs.rb +0 -22
  31. data/lib/souls/cli/delete/manager_rbs.rb +0 -17
  32. data/lib/souls/cli/delete/mutation_rbs.rb +0 -15
  33. data/lib/souls/cli/delete/query_rbs.rb +0 -16
  34. data/lib/souls/cli/delete/resolver_rbs.rb +0 -16
  35. data/lib/souls/cli/delete/type_rbs.rb +0 -16
  36. data/lib/souls/cli/generate/connection_rbs.rb +0 -25
  37. data/lib/souls/cli/generate/edge_rbs.rb +0 -28
  38. data/lib/souls/cli/generate/job_rbs.rb +0 -40
  39. data/lib/souls/cli/generate/manager_rbs.rb +0 -32
  40. data/lib/souls/cli/generate/mutation_rbs.rb +0 -241
  41. data/lib/souls/cli/generate/query_rbs.rb +0 -38
  42. data/lib/souls/cli/generate/resolver_rbs.rb +0 -42
  43. data/lib/souls/cli/generate/type_rbs.rb +0 -56
  44. data/lib/souls/cli/update/mutation_rbs.rb +0 -126
  45. data/lib/souls/cli/update/type_rbs.rb +0 -44
  46. data/lib/souls/cli/upgrade/submodule.rb +0 -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: 2.0.4
4
+ version: 3.0.2
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: 2022-03-12 00:00:00.000000000 Z
13
+ date: 2022-08-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -168,7 +168,7 @@ dependencies:
168
168
  version: 1.2.1
169
169
  description: |-
170
170
  Ruby Serverless Framework 'SOULs' | Ruby サーバーレスフレームワーク SOULs.
171
- Powered by Ruby GraphQL, RBS/Steep, Active Record, RSpec, RuboCop, and Google Cloud.
171
+ Powered by Ruby GraphQL, Active Record, RSpec, RuboCop, and Google Cloud.
172
172
  email:
173
173
  - f.kawasaki@elsoul.nl
174
174
  - s.kishi@elsoul.nl
@@ -214,28 +214,19 @@ files:
214
214
  - lib/souls/cli/create/templates/functions/ruby/app.rb
215
215
  - lib/souls/cli/create/templates/functions/ruby/gemfile.rb
216
216
  - lib/souls/cli/db/create_migration.rb
217
- - lib/souls/cli/db/create_migration_rbs.rb
218
217
  - lib/souls/cli/db/index.rb
219
218
  - lib/souls/cli/db/model.rb
220
- - lib/souls/cli/db/model_rbs.rb
221
219
  - lib/souls/cli/db/rspec_model.rb
222
220
  - lib/souls/cli/delete/application.rb
223
221
  - lib/souls/cli/delete/connection.rb
224
- - lib/souls/cli/delete/connection_rbs.rb
225
222
  - lib/souls/cli/delete/edge.rb
226
- - lib/souls/cli/delete/edge_rbs.rb
227
223
  - lib/souls/cli/delete/index.rb
228
224
  - lib/souls/cli/delete/job.rb
229
- - lib/souls/cli/delete/job_rbs.rb
230
225
  - lib/souls/cli/delete/manager.rb
231
- - lib/souls/cli/delete/manager_rbs.rb
232
226
  - lib/souls/cli/delete/migration_file.rb
233
227
  - lib/souls/cli/delete/mutation.rb
234
- - lib/souls/cli/delete/mutation_rbs.rb
235
228
  - lib/souls/cli/delete/query.rb
236
- - lib/souls/cli/delete/query_rbs.rb
237
229
  - lib/souls/cli/delete/resolver.rb
238
- - lib/souls/cli/delete/resolver_rbs.rb
239
230
  - lib/souls/cli/delete/rspec_factory.rb
240
231
  - lib/souls/cli/delete/rspec_job.rb
241
232
  - lib/souls/cli/delete/rspec_manager.rb
@@ -243,7 +234,6 @@ files:
243
234
  - lib/souls/cli/delete/rspec_query.rb
244
235
  - lib/souls/cli/delete/rspec_resolver.rb
245
236
  - lib/souls/cli/delete/type.rb
246
- - lib/souls/cli/delete/type_rbs.rb
247
237
  - lib/souls/cli/docker/index.rb
248
238
  - lib/souls/cli/gcloud/compute/index.rb
249
239
  - lib/souls/cli/gcloud/functions/index.rb
@@ -257,20 +247,13 @@ files:
257
247
  - lib/souls/cli/gcloud/sql/index.rb
258
248
  - lib/souls/cli/generate/application.rb
259
249
  - lib/souls/cli/generate/connection.rb
260
- - lib/souls/cli/generate/connection_rbs.rb
261
250
  - lib/souls/cli/generate/edge.rb
262
- - lib/souls/cli/generate/edge_rbs.rb
263
251
  - lib/souls/cli/generate/index.rb
264
252
  - lib/souls/cli/generate/job.rb
265
- - lib/souls/cli/generate/job_rbs.rb
266
253
  - lib/souls/cli/generate/manager.rb
267
- - lib/souls/cli/generate/manager_rbs.rb
268
254
  - lib/souls/cli/generate/mutation.rb
269
- - lib/souls/cli/generate/mutation_rbs.rb
270
255
  - lib/souls/cli/generate/query.rb
271
- - lib/souls/cli/generate/query_rbs.rb
272
256
  - lib/souls/cli/generate/resolver.rb
273
- - lib/souls/cli/generate/resolver_rbs.rb
274
257
  - lib/souls/cli/generate/rspec_factory.rb
275
258
  - lib/souls/cli/generate/rspec_job.rb
276
259
  - lib/souls/cli/generate/rspec_manager.rb
@@ -278,7 +261,6 @@ files:
278
261
  - lib/souls/cli/generate/rspec_query.rb
279
262
  - lib/souls/cli/generate/rspec_resolver.rb
280
263
  - lib/souls/cli/generate/type.rb
281
- - lib/souls/cli/generate/type_rbs.rb
282
264
  - lib/souls/cli/github/index.rb
283
265
  - lib/souls/cli/index.rb
284
266
  - lib/souls/cli/init/index.rb
@@ -291,17 +273,14 @@ files:
291
273
  - lib/souls/cli/sync/pubsub.rb
292
274
  - lib/souls/cli/update/index.rb
293
275
  - lib/souls/cli/update/mutation.rb
294
- - lib/souls/cli/update/mutation_rbs.rb
295
276
  - lib/souls/cli/update/resolver.rb
296
277
  - lib/souls/cli/update/rspec_factory.rb
297
278
  - lib/souls/cli/update/rspec_mutation.rb
298
279
  - lib/souls/cli/update/rspec_resolver.rb
299
280
  - lib/souls/cli/update/type.rb
300
- - lib/souls/cli/update/type_rbs.rb
301
281
  - lib/souls/cli/upgrade/config.rb
302
282
  - lib/souls/cli/upgrade/gemfile.rb
303
283
  - lib/souls/cli/upgrade/index.rb
304
- - lib/souls/cli/upgrade/submodule.rb
305
284
  - lib/souls/index.rb
306
285
  - lib/souls/souls_path.rb
307
286
  - lib/souls/utils/index.rb
@@ -328,9 +307,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
328
307
  - !ruby/object:Gem::Version
329
308
  version: '0'
330
309
  requirements: []
331
- rubygems_version: 3.3.3
310
+ rubygems_version: 3.3.7
332
311
  signing_key:
333
312
  specification_version: 4
334
313
  summary: Ruby Serverless Framework 'SOULs' | Ruby サーバーレスフレームワーク SOULs. Powered by
335
- Ruby GraphQL, RBS/Steep, Active Record, RSpec, RuboCop, and Google Cloud.
314
+ Ruby GraphQL, Active Record, RSpec, RuboCop, and Google Cloud.
336
315
  test_files: []
@@ -1,25 +0,0 @@
1
- module SOULs
2
- class DB < Thor
3
- desc "create_migration_rbs [CLASS_NAME]", "Generate ActiveRecord Migration's RBS Template"
4
- def create_migration_rbs(class_name)
5
- file_path = ""
6
- Dir.chdir(SOULs.get_mother_path.to_s) do
7
- file_dir = "./sig/api/db/migrate"
8
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
- pluralized_class_name = class_name.underscore.pluralize
10
- file_path = "#{file_dir}/create_#{pluralized_class_name}.rbs"
11
- File.open(file_path, "w") do |f|
12
- f.write(<<~TEXT)
13
- class Create#{pluralized_class_name.camelize}
14
- def change: () -> untyped
15
- def create_table: (:#{pluralized_class_name}) { (untyped) -> untyped } -> untyped
16
- def add_index: (:#{pluralized_class_name}, *untyped) -> untyped
17
- end
18
- TEXT
19
- end
20
- SOULs::Painter.create_file(file_path.to_s)
21
- end
22
- file_path
23
- end
24
- end
25
- end
@@ -1,22 +0,0 @@
1
- module SOULs
2
- class DB < Thor
3
- desc "model_rbs [CLASS_NAME]", "Generate GraphQL Model RBS from schema.rb"
4
- def model_rbs(class_name)
5
- file_path = ""
6
- Dir.chdir(SOULs.get_mother_path.to_s) do
7
- file_dir = "./sig/api/app/models/"
8
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
- singularized_class_name = class_name.underscore.singularize
10
- file_path = "#{file_dir}#{singularized_class_name}.rbs"
11
- File.open(file_path, "w") do |f|
12
- f.write(<<~TEXT)
13
- class #{singularized_class_name.camelize} < ActiveRecord::Base
14
- end
15
- TEXT
16
- end
17
- SOULs::Painter.create_file(file_path.to_s)
18
- end
19
- file_path
20
- end
21
- end
22
- end
@@ -1,16 +0,0 @@
1
- module SOULs
2
- class Delete < Thor
3
- desc "connection_rbs [CLASS_NAME]", "Delete GraphQL Connection RBS"
4
- def connection_rbs(class_name)
5
- file_path = ""
6
- Dir.chdir(SOULs.get_mother_path.to_s) do
7
- singularized_class_name = class_name.underscore.singularize
8
- file_dir = "./sig/api/app/graphql/types/connections/"
9
- file_path = "#{file_dir}#{singularized_class_name}_connection.rbs"
10
- FileUtils.rm_f(file_path)
11
- SOULs::Painter.delete_file(file_path.to_s)
12
- end
13
- file_path
14
- end
15
- end
16
- end
@@ -1,15 +0,0 @@
1
- module SOULs
2
- class Delete < Thor
3
- desc "edge_rbs [CLASS_NAME]", "Delete GraphQL Edge RBS"
4
- def edge_rbs(class_name)
5
- Dir.chdir(SOULs.get_mother_path.to_s) do
6
- file_dir = "./sig/api/app/graphql/types/edges/"
7
- singularized_class_name = class_name.underscore.singularize
8
- file_path = "#{file_dir}#{singularized_class_name}_edge.rbs"
9
- FileUtils.rm_f(file_path)
10
- SOULs::Painter.delete_file(file_path)
11
- file_path
12
- end
13
- end
14
- end
15
- end
@@ -1,22 +0,0 @@
1
- module SOULs
2
- class Delete < Thor
3
- desc "job_rbs [CLASS_NAME]", "Delete SOULs Job Mutation RBS Template"
4
- def job_rbs(class_name)
5
- file_path = ""
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
-
11
- Dir.chdir(SOULs.get_mother_path.to_s) do
12
- singularized_class_name = class_name.underscore.singularize
13
- file_dir = "./sig/#{worker_name}/app/graphql/queries/"
14
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
15
- file_path = "#{file_dir}#{singularized_class_name}.rbs"
16
- FileUtils.rm_f(file_path)
17
- SOULs::Painter.delete_file(file_path.to_s)
18
- end
19
- file_path
20
- end
21
- end
22
- end
@@ -1,17 +0,0 @@
1
- module SOULs
2
- class Delete < Thor
3
- desc "manager_rbs [CLASS_NAME]", "Delete SOULs Manager RBS Template"
4
- method_option :mutation, aliases: "--mutation", required: true, desc: "Mutation File Name"
5
- def manager_rbs(class_name)
6
- file_path = ""
7
- singularized_class_name = class_name.underscore.singularize
8
- Dir.chdir(SOULs.get_mother_path.to_s) do
9
- file_dir = "./sig/api/app/graphql/mutations/managers/#{singularized_class_name}_manager"
10
- file_path = "#{file_dir}/#{options[:mutation]}.rbs"
11
- FileUtils.rm_f(file_path)
12
- SOULs::Painter.delete_file(file_path.to_s)
13
- end
14
- file_path
15
- end
16
- end
17
- end
@@ -1,15 +0,0 @@
1
- module SOULs
2
- class Delete < Thor
3
- desc "mutation_rbs [CLASS_NAME]", "Delete GraphQL Mutation RBS"
4
- def mutation_rbs(class_name)
5
- singularized_class_name = class_name.underscore.singularize
6
- file_path = ""
7
- Dir.chdir(SOULs.get_mother_path.to_s) do
8
- file_dir = "./sig/api/app/graphql/mutations/base/#{singularized_class_name}"
9
- FileUtils.rm_rf(file_dir)
10
- end
11
- SOULs::Painter.delete_file(file_path.to_s)
12
- file_path
13
- end
14
- end
15
- end
@@ -1,16 +0,0 @@
1
- module SOULs
2
- class Delete < Thor
3
- desc "query_rbs [CLASS_NAME]", "Delete GraphQL Query RBS"
4
- def query_rbs(class_name)
5
- file_path = ""
6
- Dir.chdir(SOULs.get_mother_path.to_s) do
7
- file_dir = "./sig/api/app/graphql/queries/"
8
- singularized_class_name = class_name.underscore.singularize
9
- file_path = "#{file_dir}#{singularized_class_name}*.rbs"
10
- FileUtils.rm_f(file_path)
11
- SOULs::Painter.delete_file(file_path.to_s)
12
- file_path
13
- end
14
- end
15
- end
16
- end
@@ -1,16 +0,0 @@
1
- module SOULs
2
- class Delete < Thor
3
- desc "resolver_rbs [CLASS_NAME]", "Delete GraphQL Resolver RBS"
4
- def resolver_rbs(class_name)
5
- singularized_class_name = class_name.underscore.singularize
6
- file_path = ""
7
- Dir.chdir(SOULs.get_mother_path.to_s) do
8
- file_dir = "./sig/api/app/graphql/resolvers"
9
- file_path = "#{file_dir}/#{singularized_class_name}_search.rbs"
10
- FileUtils.rm_f(file_path)
11
- end
12
- SOULs::Painter.delete_file(file_path.to_s)
13
- file_path
14
- end
15
- end
16
- end
@@ -1,16 +0,0 @@
1
- module SOULs
2
- class Delete < Thor
3
- desc "type_rbs [CLASS_NAME]", "Delete GraphQL Type RBS"
4
- def type_rbs(class_name)
5
- singularized_class_name = class_name.underscore.singularize
6
- file_path = ""
7
- Dir.chdir(SOULs.get_mother_path.to_s) do
8
- file_dir = "./sig/api/app/graphql/types"
9
- file_path = "#{file_dir}/#{singularized_class_name}_type.rbs"
10
- FileUtils.rm_f(file_path)
11
- end
12
- SOULs::Painter.delete_file(file_path.to_s)
13
- file_path
14
- end
15
- end
16
- end
@@ -1,25 +0,0 @@
1
- module SOULs
2
- class Generate < Thor
3
- desc "connection_rbs [CLASS_NAME]", "Generate GraphQL Connection RBS from schema.rb"
4
- def connection_rbs(class_name)
5
- file_path = ""
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
- singularized_class_name = class_name.underscore.singularize
10
- file_path = "#{file_dir}#{singularized_class_name}_connection.rbs"
11
- File.open(file_path, "w") do |f|
12
- f.write(<<~TEXT)
13
- module Types
14
- class #{singularized_class_name.camelize}Connection < Types::BaseConnection
15
- def self.edge_type: (*untyped) -> untyped
16
- end
17
- end
18
- TEXT
19
- end
20
- SOULs::Painter.create_file(file_path.to_s)
21
- end
22
- file_path
23
- end
24
- end
25
- end
@@ -1,28 +0,0 @@
1
- module SOULs
2
- class Generate < Thor
3
- desc "edge_rbs [CLASS_NAME]", "Generate GraphQL Edge RBS from schema.rb"
4
- def edge_rbs(class_name)
5
- file_path = ""
6
- Dir.chdir(SOULs.get_mother_path.to_s) do
7
- file_dir = "./sig/api/app/graphql/types/edges/"
8
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
- singularized_class_name = class_name.underscore.singularize
10
- file_path = "#{file_dir}#{singularized_class_name}_edge.rbs"
11
- File.open(file_path, "w") do |f|
12
- f.write(<<~TEXT)
13
- module Types
14
- class #{singularized_class_name.camelize}Edge < Types::BaseEdge
15
- def self.edge_type: (*untyped) -> untyped
16
- def self.node_type: (*untyped) -> untyped
17
- def self.global_id_field: (*untyped) -> untyped
18
- def self.connection_type: ()-> untyped
19
- end
20
- end
21
- TEXT
22
- end
23
- SOULs::Painter.create_file(file_path.to_s)
24
- end
25
- file_path
26
- end
27
- end
28
- end
@@ -1,40 +0,0 @@
1
- module SOULs
2
- class Generate < Thor
3
- desc "job_rbs [CLASS_NAME]", "Generate SOULs Job Mutation RBS Template"
4
- def job_rbs(class_name)
5
- file_path = ""
6
- worker_name = FileUtils.pwd.split("/").last
7
- Dir.chdir(SOULs.get_mother_path.to_s) do
8
- singularized_class_name = class_name.underscore.singularize
9
- file_dir = "./sig/#{worker_name}/app/graphql/queries/"
10
- FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
11
- file_path = "#{file_dir}#{singularized_class_name}.rbs"
12
- sig_type_path = "./sig/#{worker_name}/app/graphql/types"
13
- FileUtils.mkdir_p(sig_type_path) unless Dir.exist?(sig_type_path)
14
- type_file_path = "#{sig_type_path}/#{singularized_class_name}_type.rbs"
15
- File.open(file_path, "w") do |f|
16
- f.write(<<~TEXT)
17
- module Queries
18
- class #{singularized_class_name.camelize} < BaseQuery
19
- def self.description: (String) -> untyped
20
- def self.field: (:response, String, null: false) -> untyped
21
- def self.type: (untyped, null: false) -> untyped
22
- end
23
- end
24
- TEXT
25
- end
26
- File.open(type_file_path, "w") do |f|
27
- f.write(<<~TEXT)
28
- module Types
29
- class #{singularized_class_name.camelize}Type < SOULs::Types::BaseObject
30
- def self.field: (:response, String, null: true) -> untyped
31
- end
32
- end
33
- TEXT
34
- end
35
- SOULs::Painter.create_file(file_path.to_s)
36
- end
37
- file_path
38
- end
39
- end
40
- end
@@ -1,32 +0,0 @@
1
- module SOULs
2
- class Generate < Thor
3
- desc "manager_rbs [CLASS_NAME]", "Generate SOULs Manager RBS Template"
4
- method_option :mutation, aliases: "--mutation", required: true, desc: "Mutation File Name"
5
- def manager_rbs(class_name)
6
- file_path = ""
7
- singularized_class_name = class_name.underscore.singularize
8
- Dir.chdir(SOULs.get_mother_path.to_s) do
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
- file_path = "#{file_dir}/#{options[:mutation]}.rbs"
12
- File.open(file_path, "w") do |f|
13
- f.write(<<~TEXT)
14
- module Mutations
15
- module Managers
16
- module #{singularized_class_name.camelize}Manager
17
- class #{options[:mutation].singularize.camelize} < BaseMutation
18
- def self.description: (String)-> untyped
19
- def self.argument: (untyped, untyped, untyped)-> untyped
20
- def self.field: (untyped, untyped, untyped)-> untyped
21
- end
22
- end
23
- end
24
- end
25
- TEXT
26
- SOULs::Painter.create_file(file_path.to_s)
27
- end
28
- end
29
- file_path
30
- end
31
- end
32
- end