souls 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/souls/cli/generate/mutation.rb +2 -2
- 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 +1 -1
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
|
@@ -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
|