souls 0.29.9 → 0.30.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.
- checksums.yaml +4 -4
- data/exe/souls +10 -5
- data/lib/souls/api/generate/rspec_mutation.rb +2 -2
- data/lib/souls/api/update/mutation.rb +5 -4
- data/lib/souls/api/update/resolver.rb +1 -1
- data/lib/souls/api/update/rspec_factory.rb +1 -1
- data/lib/souls/api/update/rspec_mutation.rb +2 -2
- data/lib/souls/api/update/rspec_resolver.rb +4 -3
- data/lib/souls/api/update/type.rb +1 -1
- 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: 57344fa4d1e1a552326fa4572562bab54bfee433567f8a4542b7f121a9e75e1d
|
4
|
+
data.tar.gz: 3d8b499794eaca93df04196d6b64b021f2e2d8f04c1609872e8fd893c84c6eb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1bf7c8623d14d159eaf63c1e5923fe4e62deba80ab729af1685d9e308e459e03d5592dbacf492ea5de0982b968b973a09e8adf79c58ae39fd1cc72961031467
|
7
|
+
data.tar.gz: 8372df71883cbb82bd04ebb0a8b4c5cba93997a44447f65915ef1c19b4b2bf889349458a1a8dec1b7af160f9cf71e3387578ca02af481af9991a340aa05be3d4
|
data/exe/souls
CHANGED
@@ -22,11 +22,16 @@ begin
|
|
22
22
|
end
|
23
23
|
when "schema:update"
|
24
24
|
class_name = ARGV[2]
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
status = Paint["Running SOULs Update Commands...", :yellow]
|
26
|
+
Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
|
27
|
+
Whirly.status = status
|
28
|
+
Souls::Api::Update.create_mutation(class_name: class_name)
|
29
|
+
Souls::Api::Update.update_mutation(class_name: class_name)
|
30
|
+
Souls::Api::Update.rspec_factory(class_name: class_name)
|
31
|
+
Souls::Api::Update.rspec_mutation(class_name: class_name)
|
32
|
+
Souls::Api::Update.rspec_resolver(class_name: class_name)
|
33
|
+
Whirly.status = "Done!"
|
34
|
+
end
|
30
35
|
else
|
31
36
|
puts(Paint["Comannd doesn't exist.Check you command again!...", :red])
|
32
37
|
end
|
@@ -92,10 +92,10 @@ module Souls
|
|
92
92
|
" #{camel}: \"\#{#{class_name.singularize}[:#{name.singularize.underscore}]}\"\n"
|
93
93
|
)
|
94
94
|
else
|
95
|
+
camel = name.singularize.camelize(:lower)
|
96
|
+
camels = name.pluralize.camelize(:lower)
|
95
97
|
case type
|
96
98
|
when "string", "text", "date", "datetime"
|
97
|
-
camel = name.singularize.camelize(:lower)
|
98
|
-
camels = name.pluralize.camelize(:lower)
|
99
99
|
if array_true
|
100
100
|
new_line.write(
|
101
101
|
" #{camels}: \#{#{class_name.singularize}[:#{name.pluralize.underscore}]}\n"
|
@@ -4,7 +4,7 @@ module Souls
|
|
4
4
|
class << self
|
5
5
|
def create_mutation(class_name: "user")
|
6
6
|
singularized_class_name = class_name.singularize.underscore
|
7
|
-
new_cols = Souls.
|
7
|
+
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
8
8
|
dir_name = "./app/graphql/mutations/base/#{singularized_class_name}"
|
9
9
|
new_file_path = "tmp/create_mutation.rb"
|
10
10
|
file_path = "#{dir_name}/create_#{singularized_class_name}.rb"
|
@@ -16,7 +16,8 @@ module Souls
|
|
16
16
|
next unless line.include?("argument") && !argument
|
17
17
|
|
18
18
|
new_cols.each do |col|
|
19
|
-
type =
|
19
|
+
type = Souls::Api::Generate.type_check(col[:type])
|
20
|
+
type = "[#{type}]" if col[:array]
|
20
21
|
args = check_mutation_argument(class_name: class_name)
|
21
22
|
unless args.include?(col[:column_name])
|
22
23
|
new_line.write(" argument :#{col[:column_name]}, #{type}, required: false\n")
|
@@ -31,9 +32,9 @@ module Souls
|
|
31
32
|
puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
|
32
33
|
end
|
33
34
|
|
34
|
-
def
|
35
|
+
def update_mutation(class_name: "user")
|
35
36
|
singularized_class_name = class_name.singularize.underscore
|
36
|
-
new_cols = Souls.
|
37
|
+
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
37
38
|
dir_name = "./app/graphql/mutations/base/#{singularized_class_name}"
|
38
39
|
new_file_path = "tmp/update_mutation.rb"
|
39
40
|
file_path = "#{dir_name}/update_#{singularized_class_name}.rb"
|
@@ -4,7 +4,7 @@ module Souls
|
|
4
4
|
class << self
|
5
5
|
def resolver(class_name: "user")
|
6
6
|
singularized_class_name = class_name.singularize.underscore
|
7
|
-
new_cols = Souls.
|
7
|
+
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
8
8
|
dir_name = "./app/graphql/resolvers"
|
9
9
|
new_file_path = "tmp/update_resolver.rb"
|
10
10
|
file_path = "#{dir_name}/#{singularized_class_name}_search.rb"
|
@@ -5,7 +5,7 @@ module Souls
|
|
5
5
|
def rspec_factory(class_name: "user")
|
6
6
|
singularized_class_name = class_name.singularize.underscore
|
7
7
|
pluralized_class_name = class_name.pluralize.underscore
|
8
|
-
new_cols = Souls.
|
8
|
+
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
9
9
|
dir_name = "./spec/factories"
|
10
10
|
new_file_path = "tmp/create_factory.rb"
|
11
11
|
file_path = "#{dir_name}/#{pluralized_class_name}.rb"
|
@@ -4,7 +4,7 @@ module Souls
|
|
4
4
|
class << self
|
5
5
|
def rspec_mutation(class_name: "user")
|
6
6
|
singularized_class_name = class_name.singularize.underscore
|
7
|
-
new_cols = Souls.
|
7
|
+
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
8
8
|
dir_name = "./spec/mutations/base"
|
9
9
|
new_file_path = "tmp/rspec_mutation.rb"
|
10
10
|
file_path = "#{dir_name}/#{singularized_class_name}_spec.rb"
|
@@ -54,7 +54,7 @@ module Souls
|
|
54
54
|
col[:array] ? "be_all(String)" : "be_a(String)"
|
55
55
|
end
|
56
56
|
unless test_args.include?(col[:column_name])
|
57
|
-
new_line.write("
|
57
|
+
new_line.write(" \"#{col[:column_name]}\" => #{text},\n")
|
58
58
|
end
|
59
59
|
end
|
60
60
|
test_res = false
|
@@ -4,7 +4,7 @@ module Souls
|
|
4
4
|
class << self
|
5
5
|
def rspec_resolver(class_name: "user")
|
6
6
|
singularized_class_name = class_name.singularize.underscore
|
7
|
-
new_cols = Souls.
|
7
|
+
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
8
8
|
dir_name = "./spec/resolvers"
|
9
9
|
new_file_path = "tmp/rspec_resolver.rb"
|
10
10
|
file_path = "#{dir_name}/#{singularized_class_name}_search_spec.rb"
|
@@ -22,14 +22,15 @@ module Souls
|
|
22
22
|
if node_res && !line.include?("{")
|
23
23
|
node_args = check_rspec_resolver_argument(class_name: class_name, action: "node_args")
|
24
24
|
new_cols.each do |col|
|
25
|
-
|
25
|
+
unless node_args.include?(col[:column_name])
|
26
|
+
new_line.write(" #{col[:column_name].camelize}\n")
|
27
|
+
end
|
26
28
|
end
|
27
29
|
node_res = false
|
28
30
|
elsif test_res && line.include?("=> be_")
|
29
31
|
test_args = check_rspec_resolver_argument(class_name: class_name, action: "test_args")
|
30
32
|
new_cols.each do |col|
|
31
33
|
type = Souls::Api::Generate.type_check(col[:type])
|
32
|
-
p type
|
33
34
|
text =
|
34
35
|
case type
|
35
36
|
when "String"
|
@@ -4,7 +4,7 @@ module Souls
|
|
4
4
|
class << self
|
5
5
|
def type(class_name: "user")
|
6
6
|
singularized_class_name = class_name.singularize.underscore
|
7
|
-
new_cols = Souls.
|
7
|
+
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
8
8
|
dir_name = "./app/graphql/types"
|
9
9
|
new_file_path = "tmp/create_type.rb"
|
10
10
|
file_path = "#{dir_name}/#{singularized_class_name}_type.rb"
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.2
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.2
|
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: 0.
|
4
|
+
version: 0.30.2
|
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-08-
|
13
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -152,7 +152,7 @@ metadata:
|
|
152
152
|
homepage_uri: https://souls.elsoul.nl
|
153
153
|
source_code_uri: https://github.com/elsoul/souls
|
154
154
|
changelog_uri: https://github.com/elsoul/souls
|
155
|
-
post_install_message:
|
155
|
+
post_install_message:
|
156
156
|
rdoc_options: []
|
157
157
|
require_paths:
|
158
158
|
- lib
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubygems_version: 3.2.22
|
171
|
-
signing_key:
|
171
|
+
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: SOULs is a Serverless Application Framework with Ruby GraphQL. SOULs has
|
174
174
|
3 strains, API, Worker, and Frontend. It can be used in combination according to
|