souls 0.9.8 → 0.9.9
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/init.rb +6 -2
- data/lib/souls/version.rb +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: 5426be38dac47ec1aed9a6dfad5cca1e57996bb84288d143c0e89e15490a48c4
|
4
|
+
data.tar.gz: 03c05301799061cd7e1929ddf117116ee3d8bba7c15aaa7db83bae62461669ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 539da594c3c5c147da4d5d549beda06fff35056197a3098fdb9361b70a7515a329b089f53a3ead10934cfbcba7f2be03933a2d88c972b5220263620f42b5c9ec
|
7
|
+
data.tar.gz: 7f016159015af63519cf9023db6e73614e66267be9d282c6bbf2233ff34a29685a9980a6093a67f6c5a9bdca028fad3c140e2949bd777e9c5eea19a004458c25
|
data/lib/souls/init.rb
CHANGED
@@ -261,6 +261,7 @@ module Souls
|
|
261
261
|
float: "Float",
|
262
262
|
text: "String",
|
263
263
|
datetime: "GraphQL::Types::ISO8601DateTime",
|
264
|
+
date: "GraphQL::Types::ISO8601DateTime",
|
264
265
|
boolean: "Boolean",
|
265
266
|
integer: "Integer"
|
266
267
|
}[type.to_sym]
|
@@ -273,6 +274,7 @@ module Souls
|
|
273
274
|
string: '"MyString"',
|
274
275
|
text: '"MyString"',
|
275
276
|
datetime: "Time.now",
|
277
|
+
date: "Time.now",
|
276
278
|
boolean: false,
|
277
279
|
integer: 1
|
278
280
|
}[type.to_sym]
|
@@ -526,8 +528,9 @@ module Souls
|
|
526
528
|
f.each_line.with_index do |line, i|
|
527
529
|
if @on
|
528
530
|
new_line.write "\n" && break if line.include?("end") || line.include?("t.index")
|
531
|
+
field = "[String]" if line.include?("array: true")
|
529
532
|
type, name = line.split(",")[0].gsub("\"", "").scan(/((?<=t\.).+(?=\s)) (.+)/)[0]
|
530
|
-
field
|
533
|
+
field ||= type_check type
|
531
534
|
new_line.write " field :#{name}, #{field}, null: true\n"
|
532
535
|
end
|
533
536
|
if table_check(line: line, class_name: class_name)
|
@@ -576,8 +579,9 @@ module Souls
|
|
576
579
|
f.each_line.with_index do |line, i|
|
577
580
|
if @on
|
578
581
|
new_line.write "\n" && break if line.include?("end") || line.include?("t.index")
|
582
|
+
field = '["tag1", "tag2", "tag3"]' if line.include?("array: true")
|
579
583
|
type, name = line.split(",")[0].gsub("\"", "").scan(/((?<=t\.).+(?=\s)) (.+)/)[0]
|
580
|
-
field
|
584
|
+
field ||= get_test_type type
|
581
585
|
new_line.write " #{name} { #{field} }\n"
|
582
586
|
end
|
583
587
|
if table_check(line: line, class_name: class_name)
|
data/lib/souls/version.rb
CHANGED