souls 0.65.0 → 0.65.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: 73e33f00be1dd636e4ecb2bfa311e4b893643b75dde7264763fb86f8d2e6f7e5
4
- data.tar.gz: 34a0d428e24d4040e6010a2d6166914b1489790272b95cb9d0522c81f0b7ff06
3
+ metadata.gz: 57f8f27aa8628383a5be6f93140a07aa1a7a386f6b42859a538339f1f719ff44
4
+ data.tar.gz: 445b08e504ad79fc36b3c6ca60ef26ea04e299496284cdd7fc0b6753b8662a13
5
5
  SHA512:
6
- metadata.gz: 411130be7a78c60cb8e0284d2ffa655c362d1fbb5a73ae68a70608835abe481d93c571ccafdb816e04b05a24012e3c44ca8020855eb5264f2e573d604cee0982
7
- data.tar.gz: 10eca27e01886d6d83073186ff82ab594b0277eafd37862b51a51a14ce4753372b49a5ff10fea8c2264779cc003bc69e9d4f1f0bca554dd81eb28d696d833f73
6
+ metadata.gz: f67a5b0cc1784a43f38c12bca5d37e1d7dba8a36676476a22f878bbc9f0c2c0a48e759c65d9d148cbc63b63939875b93cedb78ccd0698fae94a95c62c7d71c96
7
+ data.tar.gz: 19649c52d26137a06dc0b8eb5e7cc55489ca02df5653abd216cf72ca39e2bd8c10d945649c216b2dc5e74de618ed8bf01dbdd6acd47254abeb4866b030e293bd
@@ -45,6 +45,8 @@ module Souls
45
45
  type = Souls.type_check(param[:type])
46
46
  type = "[#{type}]" if param[:array]
47
47
  type = "String" if param[:column_name].match?(/$*_id\z/)
48
+ next if params[:column_name] == "user_id"
49
+
48
50
  if i == params[:params].size - 1
49
51
  f.write(" argument :#{param[:column_name]}, #{type}, required: false\n\n")
50
52
  f.write(" def resolve(args)\n")
@@ -105,6 +107,7 @@ module Souls
105
107
  field :#{singularized_class_name}_edge, Types::#{singularized_class_name.camelize}Type.edge_type, null: false
106
108
  field :error, String, null: true
107
109
 
110
+ argument :id, String, required: true
108
111
  TEXT
109
112
  end
110
113
 
@@ -113,6 +116,8 @@ module Souls
113
116
  type = Souls.type_check(param[:type])
114
117
  type = "[#{type}]" if param[:array]
115
118
  type = "String" if param[:column_name].match?(/$*_id\z/)
119
+ next if param[:column_name] == "user_id"
120
+
116
121
  if i == params[:params].size - 1
117
122
  f.write(" argument :#{param[:column_name]}, #{type}, required: false\n\n")
118
123
  f.write(" def resolve(args)\n")
@@ -138,7 +143,7 @@ module Souls
138
143
  f.write(" data = ::#{singularized_class_name.camelize}.find(article_id)\n")
139
144
  f.write(" data.update(new_record)\n")
140
145
  else
141
- f.write(" data = ::#{singularized_class_name.camelize}.find(article_id)\n")
146
+ f.write(" data = ::#{singularized_class_name.camelize}.find(args[:id])\n")
142
147
  f.write(" data.update(args)\n")
143
148
  end
144
149
  end
@@ -42,6 +42,8 @@ module Souls
42
42
  type = "[#{type}]" if param[:array]
43
43
  if i == params[:params].size - 1
44
44
  f.write(" #{param[:column_name]}: #{type}?\n")
45
+ elsif param[:column_name].match?(/$*_id\z/)
46
+ f.write(" #{param[:column_name]}: String?,\n")
45
47
  else
46
48
  f.write(" #{param[:column_name]}: #{type}?,\n")
47
49
  end
@@ -60,6 +62,8 @@ module Souls
60
62
  type = "[#{type}]" if param[:array]
61
63
  if i.zero?
62
64
  f.write(" def self.argument: (:#{param[:column_name]}, #{type}, required: false ) -> #{rbs_type}\n")
65
+ elsif param[:column_name].match?(/$*_id\z/)
66
+ f.write(" | (:#{param[:column_name]}, String, required: false ) -> String\n")
63
67
  else
64
68
  f.write(" | (:#{param[:column_name]}, #{type}, required: false ) -> #{rbs_type}\n")
65
69
  end
@@ -25,10 +25,15 @@ module Souls
25
25
  type = "[#{type}]" if param[:array]
26
26
  rbs_type = Souls.rbs_type_check(param[:type])
27
27
  if i.zero?
28
- f.write(" def self.field: (:#{param[:column_name]}, #{type}, null: true) -> #{rbs_type}\n")
28
+ if param[:column_name].match?(/$*_id\z/)
29
+ col_name = param[:column_name].gsub("_id", "")
30
+ f.write(" def self.field: (:#{col_name}, untyped, null: false) -> untyped\n")
31
+ else
32
+ f.write(" def self.field: (:#{param[:column_name]}, #{type}, null: true) -> #{rbs_type}\n")
33
+ end
29
34
  elsif param[:column_name].match?(/$*_id\z/)
30
35
  col_name = param[:column_name].gsub("_id", "")
31
- f.write(" def self.field: (:#{col_name}, untyped, null: false) -> untyped\n")
36
+ f.write(" | (:#{col_name}, untyped, null: false) -> untyped\n")
32
37
  else
33
38
  f.write(" | (:#{param[:column_name]}, #{type}, null: true) -> #{rbs_type}\n")
34
39
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.65.0".freeze
2
+ VERSION = "0.65.4".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.44.0
1
+ 0.44.4
@@ -1 +1 @@
1
- 0.44.0
1
+ 0.44.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.65.0
4
+ version: 0.65.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI