souls 0.28.4 → 0.28.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/generate/resolver.rb +15 -14
- 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: 0e9786dc0b6c9ac9f0c21e01a7d6046a32c2669eab48bcfe8cf5f8c49724ab63
|
4
|
+
data.tar.gz: 765d4f4e9d7c8e598792ea4315d80f1160656aeb74c796010c77abcf39e6bfe4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 285bad5aacaf63b860d0454e9265999554a3417668b15ae69883cec4bde592f1c5dc90d757c017506407accf8947c0846504e787af6d29cbfc3757564caa85c3
|
7
|
+
data.tar.gz: 93235aa1f7ad3deece6088a556dee0401f7458ea5563ea2861265fe3ab69ca5d94c9fca5d9570bb8077eeb6b13a6e4f627449191f985c6875ee496c093ddddc8
|
@@ -30,11 +30,12 @@ module Souls
|
|
30
30
|
File.open(path, "r") do |f|
|
31
31
|
f.each_line.with_index do |line, _i|
|
32
32
|
if @on
|
33
|
-
break if line.include?("
|
33
|
+
break if line.include?("t.index") || line.strip == "end"
|
34
34
|
|
35
35
|
field = "[String]" if line.include?("array: true")
|
36
36
|
type, name = get_type_and_name(line)
|
37
37
|
field ||= type_check(type)
|
38
|
+
puts(line)
|
38
39
|
case name
|
39
40
|
when "user_id"
|
40
41
|
@user_exist = true
|
@@ -57,21 +58,21 @@ module Souls
|
|
57
58
|
file_path = "./app/graphql/resolvers/#{class_name.singularize}_search.rb"
|
58
59
|
File.open(file_path, "a") do |f|
|
59
60
|
f.write(<<-TEXT)
|
60
|
-
|
61
|
-
|
62
|
-
|
61
|
+
argument :start_date, String, required: false
|
62
|
+
argument :end_date, String, required: false
|
63
|
+
end
|
63
64
|
|
64
|
-
|
65
|
-
|
66
|
-
|
65
|
+
option :filter, type: #{class_name.camelize}Filter, with: :apply_filter
|
66
|
+
option :first, type: types.Int, with: :apply_first
|
67
|
+
option :skip, type: types.Int, with: :apply_skip
|
67
68
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
def apply_filter(scope, value)
|
70
|
+
branches = normalize_filters(value).inject { |a, b| a.or(b) }
|
71
|
+
scope.merge branches
|
72
|
+
end
|
72
73
|
|
73
|
-
|
74
|
-
|
74
|
+
def normalize_filters(value, branches = [])
|
75
|
+
scope = ::#{class_name.camelize}.all
|
75
76
|
TEXT
|
76
77
|
end
|
77
78
|
end
|
@@ -86,7 +87,7 @@ module Souls
|
|
86
87
|
File.open(path, "r") do |f|
|
87
88
|
f.each_line.with_index do |line, _i|
|
88
89
|
if @on
|
89
|
-
break if line.include?("
|
90
|
+
break if line.include?("t.index") || line.strip == "end"
|
90
91
|
|
91
92
|
type, name = get_type_and_name(line)
|
92
93
|
if line.include?("array: true")
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.5
|
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.5
|