souls 0.58.1 → 0.59.1

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: 0df3e97f09a33df717c37504932a277cc12db4f5ae7afb7f2aac641d102667bf
4
- data.tar.gz: 6475f26cd6de63284c674a2f7260fda05d2519d7dabc6480da19d4614bb2b710
3
+ metadata.gz: 56b456c1559798f49b0e0c7804bea985816f077e5ca90d41678ab64a57c143a6
4
+ data.tar.gz: c7faba385e7615c85b2a8f1dadcbc057b3bf6d98cd5ece76975ec125b29b3270
5
5
  SHA512:
6
- metadata.gz: c814aae89079dbca22d511821b8d0dbbfcb5dd6330ad925f790afed826d4e3a97f944b982264293e3e8ba5c06913523e9ce3959f3297a99453a0056a88a8a8b8
7
- data.tar.gz: 1e69761fd775545dc58cc8bb5170fba3b3364572bd0fdfb1d8c0c62474b052b4f31ae034174b799d6cbe41fce4197d9c7240679b54719963d0ce3e01dbd2663e
6
+ metadata.gz: d151483cfab1cc36b0cf2d90657a575c8812403a9c53585899ff7830ab0b820f64312c0e1cd1c5078118c73bb187c32f48b8815a889fa476c50ce68d3c2e7fe2
7
+ data.tar.gz: f38d7ea5c80f1c4ae127a9b40c77d83a59f8635c36256bdcdc4355776cb8788d76084ec233726026d8e6f33774d243872e3d780372b149ca10abeb8c328c176c
@@ -12,7 +12,7 @@ module Souls
12
12
  f.write(<<~TEXT)
13
13
  module Types
14
14
  class #{singularized_class_name.camelize}Connection < Types::BaseConnection
15
- def edge_type: (*untyped) -> untyped
15
+ def self.edge_type: (*untyped) -> untyped
16
16
  end
17
17
  end
18
18
  TEXT
@@ -12,9 +12,9 @@ module Souls
12
12
  f.write(<<~TEXT)
13
13
  module Types
14
14
  class #{singularized_class_name.camelize}Edge < BaseObject
15
- def self.implements: (*untyped) -> untyped
15
+ def self.edge_type: (*untyped) -> untyped
16
+ def self.node_type: (*untyped) -> untyped
16
17
  def self.global_id_field: (*untyped) -> untyped
17
- def self.field: (*untyped) -> untyped
18
18
  def self.connection_type: ()-> untyped
19
19
  end
20
20
  end
@@ -159,6 +159,7 @@ module Souls
159
159
  new_line.write(<<-TEXT)
160
160
 
161
161
  def resolve args
162
+ params = args.dup
162
163
  _, params[:id] = SoulsApiSchema.from_global_id(args[:id])
163
164
  TEXT
164
165
  end
@@ -102,7 +102,11 @@ module Souls
102
102
  module Base
103
103
  module #{class_name.camelize}
104
104
  class Update#{class_name.camelize} < BaseMutation
105
+ String: String
106
+ Boolean: Boolean
107
+ Integer: Integer
105
108
  def resolve: ({
109
+ id: String,
106
110
  TEXT
107
111
  end
108
112
  File.open(file_path, "a") do |f|
@@ -127,10 +131,11 @@ module Souls
127
131
  type = Souls.type_check(param[:type])
128
132
  rbs_type = Souls.rbs_type_check(param[:type])
129
133
  type = "[#{type}]" if param[:array]
134
+ required = param[:column_name] == "id" ? "required: true" : "required: false"
130
135
  if i.zero?
131
- f.write(" def self.argument: (:#{param[:column_name]}, #{type}, required: false ) -> #{rbs_type}\n")
136
+ f.write(" def self.argument: (:#{param[:column_name]}, #{type}, #{required} ) -> #{rbs_type}\n")
132
137
  else
133
- f.write(" | (:#{param[:column_name]}, #{type}, required: false ) -> #{rbs_type}\n")
138
+ f.write(" | (:#{param[:column_name]}, #{type}, #{required} ) -> #{rbs_type}\n")
134
139
  end
135
140
  end
136
141
  end
@@ -10,12 +10,15 @@ module Souls
10
10
  file_path = "#{file_dir}/#{singularized_class_name}_search.rbs"
11
11
  raise(Thor::Error, "Mutation RBS already exist! #{file_path}") if File.exist?(file_path)
12
12
 
13
- params = Souls.get_relation_params(class_name: singularized_class_name)
14
13
  File.open(file_path, "w") do |f|
15
14
  f.write(<<~TEXT)
16
15
  class Base
17
16
  end
17
+ module SearchObject
18
+ def self.module: (Symbol) -> untyped
19
+ end
18
20
  class #{singularized_class_name.camelize}Search < Base
21
+ include SearchObject
19
22
  def self.scope: () ?{ () -> nil } -> [Hash[Symbol, untyped]]
20
23
  def self.type: (*untyped) -> String
21
24
  def self.option: (:filter, type: untyped, with: :apply_filter) -> String
@@ -25,33 +28,11 @@ module Souls
25
28
  def self.types: (*untyped) -> String
26
29
  def decode_global_key: (String value) -> Integer
27
30
  def apply_filter: (untyped scope, untyped value) -> untyped
28
- def normalize_filters: (untyped value, ?Array[untyped] branches) -> Array[untyped]
29
31
 
30
32
  class #{singularized_class_name.camelize}Filter
31
33
  String: String
32
34
  Boolean: Boolean
33
35
  Integer: Integer
34
- TEXT
35
- end
36
- File.open(file_path, "a") do |f|
37
- params[:params].each_with_index do |param, i|
38
- type = Souls.rbs_type_check(param[:type])
39
- type = "[#{type}]" if param[:array]
40
- rbs_type = Souls.rbs_type_check(param[:type])
41
- if i.zero?
42
- f.write(" def self.argument: (:OR, [self], required: false) -> String\n")
43
- else
44
- f.write(" | (:#{param[:column_name]}, #{type}, required: false) -> #{rbs_type}\n")
45
- end
46
- end
47
- end
48
-
49
- File.open(file_path, "a") do |f|
50
- f.write(<<~TEXT)
51
- end
52
- end
53
- module Types
54
- class BaseBaseInputObject
55
36
  end
56
37
  end
57
38
  TEXT
@@ -21,13 +21,13 @@ module Souls
21
21
  end
22
22
  File.open(file_path, "a") do |f|
23
23
  params[:params].each_with_index do |param, i|
24
- type = Souls.rbs_type_check(param[:type])
24
+ type = Souls.type_check(param[:type])
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: false) -> #{rbs_type}\n")
28
+ f.write(" def self.field: (:#{param[:column_name]}, #{type}, null: true) -> #{rbs_type}\n")
29
29
  else
30
- f.write(" | (:#{param[:column_name]}, #{type}, null: false) -> #{rbs_type}\n")
30
+ f.write(" | (:#{param[:column_name]}, #{type}, null: true) -> #{rbs_type}\n")
31
31
  end
32
32
  end
33
33
  end
@@ -14,7 +14,7 @@ module Souls
14
14
 
15
15
  def update_gem
16
16
  file_path = "./Gemfile"
17
- tmp_file = "./tmp/Gemfile"
17
+ tmp_file = "./config/Gemfile"
18
18
  new_gems = gemfile_latest_version
19
19
  logs = []
20
20
  message = Paint["\nAlready Up to date!", :green]
@@ -70,7 +70,7 @@ module Souls
70
70
  end
71
71
  FileUtils.rm("./Gemfile")
72
72
  FileUtils.rm("./Gemfile.lock")
73
- FileUtils.mv("./tmp/Gemfile", "./Gemfile")
73
+ FileUtils.mv("./config/Gemfile", "./Gemfile")
74
74
  system("bundle update")
75
75
  success = Paint["\n\nSuccessfully Updated These Gems!\n", :green]
76
76
  puts(success)
@@ -112,7 +112,6 @@ module Souls
112
112
  end
113
113
 
114
114
  def get_relation_params(class_name: "user", col: "")
115
- require("#{Souls.get_api_path}/config/souls")
116
115
  Dir.chdir(Souls.get_api_path.to_s) do
117
116
  cols =
118
117
  if col == "mutation"
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.58.1".freeze
2
+ VERSION = "0.59.1".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.37.1
1
+ 0.38.1
@@ -1 +1 @@
1
- 0.37.1
1
+ 0.38.1
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.58.1
4
+ version: 0.59.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
8
8
  - KishiTheMechanic
9
9
  - James Neve
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-09-25 00:00:00.000000000 Z
13
+ date: 2021-09-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -200,7 +200,7 @@ metadata:
200
200
  homepage_uri: https://souls.elsoul.nl
201
201
  source_code_uri: https://github.com/elsoul/souls
202
202
  changelog_uri: https://github.com/elsoul/souls
203
- post_install_message:
203
+ post_install_message:
204
204
  rdoc_options: []
205
205
  require_paths:
206
206
  - lib
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  version: '0'
217
217
  requirements: []
218
218
  rubygems_version: 3.2.22
219
- signing_key:
219
+ signing_key:
220
220
  specification_version: 4
221
221
  summary: SOULs はサーバーレスフルスタックフレームワークです。柔軟な Ruby GraphQL API と Worker はルーティングの必要がありません。
222
222
  クラウド環境への自動デプロイ、CI/CD ワークフローを標準装備。開発者がビジネスロジックに集中し、楽しくコードが書けるような環境を目指しています。