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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9720aa65c9827862e45cafc511e8607c430767aa62f18172adfd18e05ad7ef49
4
- data.tar.gz: f707c017b93e52827444e880aa3365f8897796f189d788e5c570b88cd3f13415
3
+ metadata.gz: 0e9786dc0b6c9ac9f0c21e01a7d6046a32c2669eab48bcfe8cf5f8c49724ab63
4
+ data.tar.gz: 765d4f4e9d7c8e598792ea4315d80f1160656aeb74c796010c77abcf39e6bfe4
5
5
  SHA512:
6
- metadata.gz: 3035bb95a8e121cf2ef107fe468e3feb73bc6bb5a8b17206559c863770c65cd1887c46c4c1a053e705de26c6e9de27da33a573926e4cd4afa5141b3cca4774ea
7
- data.tar.gz: ca66f342d077f0b28dc48a7459ec448a0c7436e08adf8dee0f186096f98260831cf507bec0ed7f19b34652d3335b778c763c75dc3c938f654467c81ff855c090
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?("end") || line.include?("t.index")
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
- argument :start_date, String, required: false
61
- argument :end_date, String, required: false
62
- end
61
+ argument :start_date, String, required: false
62
+ argument :end_date, String, required: false
63
+ end
63
64
 
64
- option :filter, type: #{class_name.camelize}Filter, with: :apply_filter
65
- option :first, type: types.Int, with: :apply_first
66
- option :skip, type: types.Int, with: :apply_skip
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
- def apply_filter(scope, value)
69
- branches = normalize_filters(value).inject { |a, b| a.or(b) }
70
- scope.merge branches
71
- end
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
- def normalize_filters(value, branches = [])
74
- scope = ::#{class_name.camelize}.all
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?("end") || line.include?("t.index")
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,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.28.4".freeze
2
+ VERSION = "0.28.5".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.7.4
1
+ 0.7.5
@@ -1 +1 @@
1
- 0.7.4
1
+ 0.7.5
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.28.4
4
+ version: 0.28.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI