souls 0.11.8 → 0.11.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/Gemfile.lock +1 -1
- data/exe/souls +2 -2
- data/lib/souls/init.rb +43 -1
- data/lib/souls/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71f35c6279e7208c219e0a2c4940e0d489cd2ee08cdbc81ca70171ec144da144
|
4
|
+
data.tar.gz: 2f16a97ba993bbe48d9b283b90113402e2fffd939b2d272f4ed659eba7c2577d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 234b0e85daf9298fc7c074b2d7925bd7ee2f6eaf4f053a077b6b9998f6f65ce773155e584e1e65526527e1c22255a505d8bfaf1b0c44be5842c2a2a1f8d948c0
|
7
|
+
data.tar.gz: 0b3eb2a277257a1768668294c25d603cb14b7ee2709b6b2b3ae1e8001b6553c6449d03b66dcd5e02018f81a2dbe6aec2081d0eacb739514be748ecf1af4bc60b
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
data/exe/souls
CHANGED
@@ -46,7 +46,7 @@ begin
|
|
46
46
|
when "g", "generate"
|
47
47
|
case ARGV[1]
|
48
48
|
when "test"
|
49
|
-
Souls::Init.
|
49
|
+
Souls::Init.single_migrate class_name: "user"
|
50
50
|
when "model"
|
51
51
|
Souls::Init.model class_name: ARGV[2]
|
52
52
|
when "mutation"
|
@@ -56,7 +56,7 @@ begin
|
|
56
56
|
when "type"
|
57
57
|
Souls::Init.type class_name: ARGV[2]
|
58
58
|
when "migrate"
|
59
|
-
Souls::Init.
|
59
|
+
Souls::Init.single_migrate class_name: ARGV[2]
|
60
60
|
when "migrate_all"
|
61
61
|
Souls::Init.migrate_all
|
62
62
|
when "migration"
|
data/lib/souls/init.rb
CHANGED
@@ -582,7 +582,12 @@ module Souls
|
|
582
582
|
field = '["tag1", "tag2", "tag3"]' if line.include?("array: true")
|
583
583
|
type, name = line.split(",")[0].gsub("\"", "").scan(/((?<=t\.).+(?=\s)) (.+)/)[0]
|
584
584
|
field ||= get_test_type type
|
585
|
-
|
585
|
+
if type == "bigint" && name.include?("_id")
|
586
|
+
id_name = name.gsub("_id", "")
|
587
|
+
new_line.write " association :#{id_name}, factory: :#{id_name}\n"
|
588
|
+
else
|
589
|
+
new_line.write " #{name} { #{field} }\n"
|
590
|
+
end
|
586
591
|
end
|
587
592
|
if table_check(line: line, class_name: class_name)
|
588
593
|
@on = true
|
@@ -942,6 +947,43 @@ end
|
|
942
947
|
]
|
943
948
|
end
|
944
949
|
|
950
|
+
def single_migrate class_name: "user"
|
951
|
+
puts "◆◆◆ Let's Auto Generate CRUD API ◆◆◆\n"
|
952
|
+
result = migrate class_name: class_name
|
953
|
+
puts result[0][:model]
|
954
|
+
puts result[0][:type]
|
955
|
+
puts result[0][:rspec_factory]
|
956
|
+
puts result[0][:rspec_model]
|
957
|
+
puts result[0][:rspec_mutation]
|
958
|
+
puts result[0][:rspec_query]
|
959
|
+
puts result[0][:query]
|
960
|
+
puts result[0][:mutation]
|
961
|
+
|
962
|
+
puts "\nAll files created from ./db/schema.rb"
|
963
|
+
puts "\n\n"
|
964
|
+
puts "##########################################################\n"
|
965
|
+
puts "# #\n"
|
966
|
+
puts "# Add These Lines at ./app/graphql/types/query_type.rb #\n"
|
967
|
+
puts "# #\n"
|
968
|
+
puts "##########################################################\n\n\n"
|
969
|
+
result[0][:add_query_type].each do |path|
|
970
|
+
puts path
|
971
|
+
end
|
972
|
+
puts "\n ## Connection Type\n\n"
|
973
|
+
puts " def #{class_name.pluralize}"
|
974
|
+
puts " #{class_name.singularize.camelize}.all.order(id: :desc)"
|
975
|
+
puts " end\n\n\n"
|
976
|
+
|
977
|
+
puts "#############################################################\n"
|
978
|
+
puts "# #\n"
|
979
|
+
puts "# Add These Lines at ./app/graphql/types/mutation_type.rb #\n"
|
980
|
+
puts "# #\n"
|
981
|
+
puts "#############################################################\n\n\n"
|
982
|
+
result[0][:add_mutation_type].each do |path|
|
983
|
+
puts path
|
984
|
+
end
|
985
|
+
end
|
986
|
+
|
945
987
|
def migrate_all
|
946
988
|
puts "◆◆◆ Let's Auto Generate CRUD API ◆◆◆\n"
|
947
989
|
paths = get_tables.map do |class_name|
|
data/lib/souls/version.rb
CHANGED
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: 0.11.
|
4
|
+
version: 0.11.9
|
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: 2021-01-
|
13
|
+
date: 2021-01-28 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: SOULS is a Web Application Framework for Microservices on Multi Cloud
|
16
16
|
Platform such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud.
|