souls 1.4.1 → 1.4.5
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 +4 -4
- data/lib/souls/cli/create/index.rb +1 -1
- data/lib/souls/cli/generate/application.rb +5 -5
- data/lib/souls/cli/generate/mutation.rb +6 -6
- data/lib/souls/cli/generate/mutation_rbs.rb +6 -6
- data/lib/souls/cli/generate/type_rbs.rb +1 -1
- data/lib/souls/utils/index.rb +3 -3
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 426055d995980f34133e97a2bd481c333cb29e88f340d74c08b398e4570459c6
|
4
|
+
data.tar.gz: b8266448605e3ae53cfe5eb3043e02d0e3e3ce0453fa3294388441f7f232adae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba35b4d0cf88fd3266700dac70bad5171fb8027f5c67de9d488afe083f64032eba3ce868b19c29e086f2e981b42d79cd71ff2812a3da145712610dafa08901df
|
7
|
+
data.tar.gz: e1370b953c6d64db731826c3a59525bbbfced8148ed1c6ffe7ddb40e75f3ce0ae020c83de8793d4df0f76509cb9e5eb6322a4525d67d0ed431dc1b3e13c6d564
|
@@ -62,7 +62,7 @@ module Souls
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
def souls_conf_update(worker_name, strain)
|
65
|
+
def souls_conf_update(worker_name, strain = "mother")
|
66
66
|
workers = Souls.configuration.workers
|
67
67
|
port = 3000 + workers.size
|
68
68
|
file_path = strain == "mother" ? "config/souls.rb" : "apps/api/config/souls.rb"
|
@@ -5,9 +5,9 @@ module Souls
|
|
5
5
|
def scaffold(class_name)
|
6
6
|
singularized_class_name = class_name.singularize
|
7
7
|
if options[:rbs]
|
8
|
-
run_rbs_scaffold(
|
8
|
+
run_rbs_scaffold(singularized_class_name)
|
9
9
|
else
|
10
|
-
run_scaffold(
|
10
|
+
run_scaffold(singularized_class_name)
|
11
11
|
end
|
12
12
|
true
|
13
13
|
rescue Thor::Error => e
|
@@ -32,7 +32,7 @@ module Souls
|
|
32
32
|
|
33
33
|
private
|
34
34
|
|
35
|
-
def run_scaffold(class_name
|
35
|
+
def run_scaffold(class_name)
|
36
36
|
type(class_name)
|
37
37
|
type_rbs(class_name)
|
38
38
|
query(class_name)
|
@@ -54,7 +54,7 @@ module Souls
|
|
54
54
|
rspec_policy(class_name)
|
55
55
|
end
|
56
56
|
|
57
|
-
def run_rbs_scaffold(class_name
|
57
|
+
def run_rbs_scaffold(class_name)
|
58
58
|
type_rbs(class_name)
|
59
59
|
query_rbs(class_name)
|
60
60
|
mutation_rbs(class_name)
|
@@ -64,7 +64,7 @@ module Souls
|
|
64
64
|
resolver_rbs(class_name)
|
65
65
|
end
|
66
66
|
|
67
|
-
def generated_paths(class_name
|
67
|
+
def generated_paths(class_name)
|
68
68
|
singularized_class_name = class_name.singularize.underscore
|
69
69
|
pluralized_class_name = class_name.pluralize.underscore
|
70
70
|
[
|
@@ -10,10 +10,10 @@ module Souls
|
|
10
10
|
file_path = "./app/graphql/mutations/base/#{singularized_class_name}/create_#{singularized_class_name}.rb"
|
11
11
|
return "Mutation already exist! #{file_path}" if File.exist?(file_path)
|
12
12
|
|
13
|
-
create_mutation(
|
14
|
-
update_mutation(
|
15
|
-
delete_mutation(
|
16
|
-
destroy_delete_mutation(
|
13
|
+
create_mutation(singularized_class_name)
|
14
|
+
update_mutation(singularized_class_name)
|
15
|
+
delete_mutation(singularized_class_name)
|
16
|
+
destroy_delete_mutation(singularized_class_name)
|
17
17
|
end
|
18
18
|
rescue Thor::Error => e
|
19
19
|
raise(Thor::Error, e)
|
@@ -28,7 +28,7 @@ module Souls
|
|
28
28
|
file_path = "#{file_dir}/create_#{singularized_class_name}.rb"
|
29
29
|
raise(Thor::Error, "Mutation RBS already exist! #{file_path}") if File.exist?(file_path)
|
30
30
|
|
31
|
-
params = Souls.get_relation_params(
|
31
|
+
params = Souls.get_relation_params(singularized_class_name, "mutation")
|
32
32
|
File.open(file_path, "a") do |f|
|
33
33
|
f.write(<<~TEXT)
|
34
34
|
module Mutations
|
@@ -98,7 +98,7 @@ module Souls
|
|
98
98
|
file_path = "#{file_dir}/update_#{singularized_class_name}.rb"
|
99
99
|
raise(Thor::Error, "Mutation RBS already exist! #{file_path}") if File.exist?(file_path)
|
100
100
|
|
101
|
-
params = Souls.get_relation_params(
|
101
|
+
params = Souls.get_relation_params(singularized_class_name, "mutation")
|
102
102
|
File.open(file_path, "w") do |f|
|
103
103
|
f.write(<<~TEXT)
|
104
104
|
module Mutations
|
@@ -3,10 +3,10 @@ module Souls
|
|
3
3
|
desc "mutation_rbs [CLASS_NAME]", "Generate GraphQL Mutation RBS from schema.rb"
|
4
4
|
def mutation_rbs(class_name)
|
5
5
|
singularized_class_name = class_name.underscore.singularize
|
6
|
-
create_rbs_mutation(
|
7
|
-
update_rbs_mutation(
|
8
|
-
delete_rbs_mutation(
|
9
|
-
destroy_delete_rbs_mutation(
|
6
|
+
create_rbs_mutation(singularized_class_name)
|
7
|
+
update_rbs_mutation(singularized_class_name)
|
8
|
+
delete_rbs_mutation(singularized_class_name)
|
9
|
+
destroy_delete_rbs_mutation(singularized_class_name)
|
10
10
|
rescue Thor::Error => e
|
11
11
|
raise(Thor::Error, e)
|
12
12
|
end
|
@@ -21,7 +21,7 @@ module Souls
|
|
21
21
|
file_path = "#{file_dir}/create_#{class_name}.rbs"
|
22
22
|
raise(Thor::Error, "Mutation RBS already exist! #{file_path}") if File.exist?(file_path)
|
23
23
|
|
24
|
-
params = Souls.get_relation_params(class_name
|
24
|
+
params = Souls.get_relation_params(class_name, "mutation")
|
25
25
|
File.open(file_path, "w") do |f|
|
26
26
|
f.write(<<~TEXT)
|
27
27
|
class Boolean
|
@@ -102,7 +102,7 @@ module Souls
|
|
102
102
|
file_dir = "./sig/api/app/graphql/mutations/base/#{class_name}"
|
103
103
|
FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
|
104
104
|
file_path = "#{file_dir}/update_#{class_name}.rbs"
|
105
|
-
params = Souls.get_relation_params(class_name
|
105
|
+
params = Souls.get_relation_params(class_name, "mutation")
|
106
106
|
params[:params] < { column_name: "id", type: "string", array: false }
|
107
107
|
File.open(file_path, "w") do |f|
|
108
108
|
f.write(<<~TEXT)
|
@@ -10,7 +10,7 @@ module Souls
|
|
10
10
|
file_path = "#{file_dir}/#{singularized_class_name}_type.rbs"
|
11
11
|
raise(Thor::Error, "Type RBS already exist! #{file_path}") if File.exist?(file_path)
|
12
12
|
|
13
|
-
params = Souls.get_relation_params(
|
13
|
+
params = Souls.get_relation_params(singularized_class_name)
|
14
14
|
File.open(file_path, "w") do |f|
|
15
15
|
f.write(<<~TEXT)
|
16
16
|
module Types
|
data/lib/souls/utils/index.rb
CHANGED
@@ -111,7 +111,7 @@ module Souls
|
|
111
111
|
end
|
112
112
|
end
|
113
113
|
|
114
|
-
def get_relation_params(class_name
|
114
|
+
def get_relation_params(class_name, col = "")
|
115
115
|
Dir.chdir(Souls.get_api_path.to_s) do
|
116
116
|
cols =
|
117
117
|
if col == "mutation"
|
@@ -129,7 +129,7 @@ module Souls
|
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
132
|
-
def get_columns_num(class_name
|
132
|
+
def get_columns_num(class_name)
|
133
133
|
pluralized_class_name = class_name.pluralize
|
134
134
|
file_path = "./db/schema.rb"
|
135
135
|
class_check_flag = false
|
@@ -149,7 +149,7 @@ module Souls
|
|
149
149
|
cols
|
150
150
|
end
|
151
151
|
|
152
|
-
def get_columns_num_no_timestamp(class_name
|
152
|
+
def get_columns_num_no_timestamp(class_name)
|
153
153
|
pluralized_class_name = class_name.pluralize
|
154
154
|
file_path = "./db/schema.rb"
|
155
155
|
class_check_flag = false
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.5
|
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.5
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: souls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
8
8
|
- KishiTheMechanic
|
9
9
|
- James Neve
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-11-
|
13
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -232,7 +232,7 @@ metadata:
|
|
232
232
|
homepage_uri: https://souls.elsoul.nl
|
233
233
|
source_code_uri: https://github.com/elsoul/souls
|
234
234
|
changelog_uri: https://github.com/elsoul/souls
|
235
|
-
post_install_message:
|
235
|
+
post_install_message:
|
236
236
|
rdoc_options: []
|
237
237
|
require_paths:
|
238
238
|
- lib
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
version: '0'
|
249
249
|
requirements: []
|
250
250
|
rubygems_version: 3.2.22
|
251
|
-
signing_key:
|
251
|
+
signing_key:
|
252
252
|
specification_version: 4
|
253
253
|
summary: Build Serverless Apps faster like Rails. Powered by Ruby GraphQL, RBS/Steep,
|
254
254
|
Active Record, RSpec, RuboCop, and Google Cloud.
|