souls 0.30.3 → 0.30.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/souls/api/generate/application.rb +13 -0
- data/lib/souls/api/update/mutation.rb +8 -6
- 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 +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 756bdf615c6f15e853a4d6262b5b3746d5413df7a0326a83e5402b49970e9968
|
4
|
+
data.tar.gz: 193eb321bf1c071422470e708d2a7662589c4521f8345564766f457de04ed8c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 859afb0501215e723f57ca61bc7ad2e0e8911853c2cac70f91bd410b31ac56f09a954320c3eafd52aaa1154a15cd0714517a7fdaa2e4c0d93fd0e13fa27c1252
|
7
|
+
data.tar.gz: 30de9af84c98f30ac8e51b504b8b0a38f3bbf3908e9f24ab2d29bfc5db846c17383ffab19acd2e5cdf607c309054afe516f7b27ceb5c90085adf4614fee8146a
|
@@ -74,6 +74,19 @@ module Souls
|
|
74
74
|
}[type.to_sym]
|
75
75
|
end
|
76
76
|
|
77
|
+
def self.get_type(type)
|
78
|
+
{
|
79
|
+
bigint: "Integer",
|
80
|
+
string: "String",
|
81
|
+
float: "Float",
|
82
|
+
text: "String",
|
83
|
+
datetime: "GraphQL::Types::ISO8601DateTime",
|
84
|
+
date: "GraphQL::Types::ISO8601DateTime",
|
85
|
+
boolean: "Boolean",
|
86
|
+
integer: "Integer"
|
87
|
+
}[type.to_sym]
|
88
|
+
end
|
89
|
+
|
77
90
|
def self.get_test_type(type)
|
78
91
|
{
|
79
92
|
bigint: "rand(1..10)",
|
@@ -19,9 +19,10 @@ module Souls
|
|
19
19
|
type = Souls::Api::Generate.type_check(col[:type])
|
20
20
|
type = "[#{type}]" if col[:array]
|
21
21
|
args = check_mutation_argument(class_name: class_name)
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
next if args.include?(col[:column_name])
|
23
|
+
next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
|
24
|
+
|
25
|
+
new_line.write(" argument :#{col[:column_name]}, #{type}, required: false\n")
|
25
26
|
end
|
26
27
|
argument = true
|
27
28
|
end
|
@@ -49,9 +50,10 @@ module Souls
|
|
49
50
|
type = Souls::Api::Generate.type_check(col[:type])
|
50
51
|
type = "[#{type}]" if col[:array]
|
51
52
|
args = check_mutation_argument(class_name: class_name, action: "update")
|
52
|
-
|
53
|
-
|
54
|
-
|
53
|
+
next if args.include?(col[:column_name])
|
54
|
+
next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
|
55
|
+
|
56
|
+
new_line.write(" argument :#{col[:column_name]}, #{type}, required: false\n")
|
55
57
|
end
|
56
58
|
argument = true
|
57
59
|
end
|
@@ -16,7 +16,7 @@ module Souls
|
|
16
16
|
next unless line.include?("field") && !argument
|
17
17
|
|
18
18
|
new_cols.each do |col|
|
19
|
-
type = Souls::Api::Generate.
|
19
|
+
type = Souls::Api::Generate.get_type(col[:type])
|
20
20
|
type = "[#{type}]" if col[:array]
|
21
21
|
args = check_type_argument(class_name: class_name)
|
22
22
|
unless args.include?(col[:column_name])
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.4
|
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.4
|