souls 0.56.0 → 0.56.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b11027355d2156abdaa8807eda594fd4ba96fde1fdb0cf546e6f5f1cd34487a
4
- data.tar.gz: cba26dd0ea25bafe8ecce20ef66a10f1f2ef86f0bfb0b5f6c54594d332c3400c
3
+ metadata.gz: e8375336866a4c6367ebfabd3230872f7eb82a5d20da41f6165a28952d214d01
4
+ data.tar.gz: e20a0b07c5d7127acac26abab668a415776c59f3973857332a7b7447eef7259b
5
5
  SHA512:
6
- metadata.gz: 5bd75f70b0284d5ecab2a2eda7a013557db7578d69caec27dd9296c3649838413bfe011ea573a63fb8ce94cb9469bb7882b37951de7ec18ff84dd87e03de94ca
7
- data.tar.gz: 61b91ab91c7cd6b277718b3f9f6bba5451d956d386099a941e2f0f9e4632ad69cec3d897804b36fc0ebb9c0a528d6f2008fdc1140d2e3b01bd7d93874f7aba42
6
+ metadata.gz: 3f5f786c164a2ec2d5205109e40e2225aebd2530ef429cdc422bd125f17204ddb5034671a511a657a2505e7f0b8ef263d9c5e4226a14f3f9158cf16610ad4306
7
+ data.tar.gz: 737fb2a3e627d7189443d6e17236f03484fa2c9bd7105b7de33f75d2300f3fa5cfbe6da6c0e647f073e7a2f14f15d390aef13d65d2e8d822e28bf6a2854a8ef0
@@ -1,6 +1,7 @@
1
1
  require_paths = []
2
2
  dev_path = "lib/souls/api/generate/*"
3
- gem_path = "#{Gem.dir}/gems/souls-#{Souls::VERSION}/lib/souls/api/generate/*"
3
+ souls_path = Dir["#{Gem.dir}/gems/souls-*"].last
4
+ gem_path = "#{souls_path}/lib/souls/api/generate/*"
4
5
  file_paths = File.exist?("souls.gemspec") ? dev_path : gem_path
5
6
  Dir[file_paths].map do |n|
6
7
  next if n.include?("index.rb")
@@ -4,7 +4,7 @@ module Souls
4
4
  def policy_rbs(class_name)
5
5
  file_path = ""
6
6
  Dir.chdir(Souls.get_mother_path.to_s) do
7
- file_dir = "./sig/api/app/graphql/types/policies/"
7
+ file_dir = "./sig/api/app/graphql/policies/"
8
8
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
9
  singularized_class_name = class_name.underscore.singularize
10
10
  file_path = "#{file_dir}#{singularized_class_name}_policy.rbs"
@@ -48,7 +48,6 @@ module Souls
48
48
 
49
49
  File.open(file_path, "a") do |f|
50
50
  f.write(<<~TEXT)
51
- end
52
51
  end
53
52
  end
54
53
  module Types
@@ -112,19 +112,22 @@ module Souls
112
112
  end
113
113
 
114
114
  def get_relation_params(class_name: "user", col: "")
115
- cols =
116
- if col == "mutation"
117
- get_columns_num_no_timestamp(class_name: class_name)
118
- else
119
- get_columns_num(class_name: class_name)
120
- end
121
- relation_params = cols.select { |col| col[:column_name].match?(/_id$/) }
122
- user_check =
123
- relation_params.map do |param|
124
- param[:column_name] == "user_id"
125
- end
126
- user_exist = user_check.include?(true)
127
- { user_exist: user_exist, params: cols, relation_params: relation_params }
115
+ require("#{Souls.get_api_path}/config/souls")
116
+ Dir.chdir(Souls.get_api_path.to_s) do
117
+ cols =
118
+ if col == "mutation"
119
+ get_columns_num_no_timestamp(class_name: class_name)
120
+ else
121
+ get_columns_num(class_name: class_name)
122
+ end
123
+ relation_params = cols.select { |col| col[:column_name].match?(/_id$/) }
124
+ user_check =
125
+ relation_params.map do |param|
126
+ param[:column_name] == "user_id"
127
+ end
128
+ user_exist = user_check.include?(true)
129
+ return { user_exist: user_exist, params: cols, relation_params: relation_params }
130
+ end
128
131
  end
129
132
 
130
133
  def get_columns_num(class_name: "user")
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.56.0".freeze
2
+ VERSION = "0.56.4".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.35.0
1
+ 0.35.4
@@ -1 +1 @@
1
- 0.35.0
1
+ 0.35.4
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.56.0
4
+ version: 0.56.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI