souls 0.71.0 → 0.71.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: b722e511cf4e7f9ca061776be361d4d30a3020fbf08d7df2b31c711960681484
4
- data.tar.gz: f5d0d91fad2bfebb573cf996265431fd9fd5f557a2b75e3ccd90e4c93ef46d09
3
+ metadata.gz: 3da971c3f76a283d4a81f8a4319cc7f64c5cdd9d9c5c2bdc0e859deae66c9c73
4
+ data.tar.gz: 196039d967ba3094a7313efd78d48150d4d8151a873475262c019b6eadc0749c
5
5
  SHA512:
6
- metadata.gz: 11dc02dcbac8a8cf91e5dbef64cae38c9b3c60faf42618495b5b26b1f17f595435821cecd048e9aed6d2691652bedafb69ea4de7ba1f645446497791f2e6a2d1
7
- data.tar.gz: 2732140c8becba6b20f10dcde04ed23d32f9085ea75f6487cd54d91a063ef83086e1bc2cd10bd355bb1750026c6241d032f44580b71cb1a56bc2023ce71fb900
6
+ metadata.gz: 94f7f3a5768042f6ea3e66bf2dcf48ee24b9f1289fbe757bc8d4c81f18d01a6bf3f9c9f4a783617dc33d8e8593a994c397fe7b7b6c54dcd7d73c87c13718ea2e
7
+ data.tar.gz: 5e475d71483c8276b593e91c353bce495304672e9566887cf826b6a85e4f0f7f8aae17a5ac4256cebfc7b423987da2238c1a0584abdcdbb7f05433edf6e5adb7
@@ -10,17 +10,19 @@ require_relative "./rspec_resolver"
10
10
  module Souls
11
11
  class Update < Thor
12
12
  desc "scaffold [CLASS_NAME]", "Update Scaffold Params"
13
- def scaffold(_class_name)
14
- invoke(:create_mutation)
15
- invoke(:update_mutation)
16
- invoke(:create_mutation_rbs)
17
- invoke(:update_mutation_rbs)
18
- invoke(:resolver)
19
- invoke(:type)
20
- invoke(:type_rbs)
21
- invoke(:rspec_factory)
22
- invoke(:rspec_mutation)
23
- invoke(:rspec_resolver)
13
+ def scaffold(class_name)
14
+ create_mutation(class_name)
15
+ update_mutation(class_name)
16
+ resolver(class_name)
17
+ type(class_name)
18
+ rspec_factory(class_name)
19
+ rspec_mutation(class_name)
20
+ rspec_resolver(class_name)
21
+ Dir.chdir(Souls.get_mother_path.to_s) do
22
+ create_mutation_rbs(class_name)
23
+ update_mutation_rbs(class_name)
24
+ type_rbs(class_name)
25
+ end
24
26
  end
25
27
  end
26
28
  end
@@ -3,7 +3,10 @@ module Souls
3
3
  desc "create_mutation_rbs [CLASS_NAME]", "Update GraphQL Type from schema.rb"
4
4
  def create_mutation_rbs(class_name)
5
5
  singularized_class_name = class_name.singularize.underscore
6
- new_cols = Souls.get_columns_num(class_name: singularized_class_name)
6
+ new_cols = ""
7
+ Dir.chdir(Souls.get_api_path.to_s) do
8
+ new_cols = Souls.get_columns_num(class_name: singularized_class_name)
9
+ end
7
10
  dir_name = "./sig/api/app/graphql/mutations/base/#{singularized_class_name}"
8
11
  new_file_path = "tmp/create_mutation.rbs"
9
12
  file_path = "#{dir_name}/create_#{singularized_class_name}.rbs"
@@ -23,8 +26,6 @@ module Souls
23
26
  new_cols.each_with_index do |col, i|
24
27
  type = Souls.type_check(col[:type])
25
28
  type = "[#{type}]" if col[:array]
26
- args = check_mutation_argument(class_name: class_name)
27
- next if args.include?(col[:column_name])
28
29
  next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
29
30
 
30
31
  if i.zero?
@@ -38,8 +39,6 @@ module Souls
38
39
  new_cols.each_with_index do |col, i|
39
40
  type = Souls.type_check(col[:type])
40
41
  type = "[#{type}]" if col[:array]
41
- args = check_mutation_argument(class_name: class_name)
42
- next if args.include?(col[:column_name])
43
42
  next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
44
43
 
45
44
  if i.zero?
@@ -89,8 +88,6 @@ module Souls
89
88
  new_cols.each_with_index do |col, i|
90
89
  type = Souls.type_check(col[:type])
91
90
  type = "[#{type}]" if col[:array]
92
- args = check_mutation_argument(class_name: class_name)
93
- next if args.include?(col[:column_name])
94
91
  next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
95
92
 
96
93
  if i.zero?
@@ -105,8 +102,6 @@ module Souls
105
102
  new_cols.each_with_index do |col, i|
106
103
  type = Souls.type_check(col[:type])
107
104
  type = "[#{type}]" if col[:array]
108
- args = check_mutation_argument(class_name: class_name)
109
- next if args.include?(col[:column_name])
110
105
  next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
111
106
 
112
107
  if i.zero?
@@ -132,20 +127,5 @@ module Souls
132
127
  rescue Thor::Error => e
133
128
  raise(Thor::Error, e)
134
129
  end
135
-
136
- private
137
-
138
- def check_mutation_argument(class_name: "user", action: "create")
139
- singularized_class_name = class_name.singularize.underscore
140
- dir_name = "./sig/api/app/graphql/mutations/base/#{singularized_class_name}"
141
- file_path = "#{dir_name}/#{action}_#{singularized_class_name}.rbs"
142
- args = []
143
- File.open(file_path) do |f|
144
- f.each_line do |line|
145
- args << line.split(",")[0].gsub("argument :", "").strip.underscore if line.include?("argument")
146
- end
147
- end
148
- args
149
- end
150
130
  end
151
131
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.71.0".freeze
2
+ VERSION = "0.71.4".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.50.0
1
+ 0.50.4
@@ -1 +1 @@
1
- 0.50.0
1
+ 0.50.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.71.0
4
+ version: 0.71.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI