souls 1.4.4 → 1.4.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: 64feb95ffcd5c0557a7f862cb502fff99e18d9251d89c84db9d2e5d85090d518
4
- data.tar.gz: aa631218fcc6bfa93feb92de43e18e4253498928c773a96eb4dae19eb381378b
3
+ metadata.gz: 426055d995980f34133e97a2bd481c333cb29e88f340d74c08b398e4570459c6
4
+ data.tar.gz: b8266448605e3ae53cfe5eb3043e02d0e3e3ce0453fa3294388441f7f232adae
5
5
  SHA512:
6
- metadata.gz: ecd51636811d2b850074572d8208610634afea9b88e6a439a85e5487d2766e1231714504879beb07f1a66dc4843a364f97f4319d44a9ca8b7bc31741f89ceeba
7
- data.tar.gz: 6c4e715d411c34cdc516954be2c38ddb93a6c7771fcdccc8e5d466f877acdb50664eca44b74be72da272b31294d4f89c0404a090117ec03554d61b32f8151f4a
6
+ metadata.gz: ba35b4d0cf88fd3266700dac70bad5171fb8027f5c67de9d488afe083f64032eba3ce868b19c29e086f2e981b42d79cd71ff2812a3da145712610dafa08901df
7
+ data.tar.gz: e1370b953c6d64db731826c3a59525bbbfced8148ed1c6ffe7ddb40e75f3ce0ae020c83de8793d4df0f76509cb9e5eb6322a4525d67d0ed431dc1b3e13c6d564
@@ -28,7 +28,7 @@ module Souls
28
28
  file_path = "#{file_dir}/create_#{singularized_class_name}.rb"
29
29
  raise(Thor::Error, "Mutation RBS already exist! #{file_path}") if File.exist?(file_path)
30
30
 
31
- params = Souls.get_relation_params(class_name: singularized_class_name, col: "mutation")
31
+ params = Souls.get_relation_params(singularized_class_name, "mutation")
32
32
  File.open(file_path, "a") do |f|
33
33
  f.write(<<~TEXT)
34
34
  module Mutations
@@ -98,7 +98,7 @@ module Souls
98
98
  file_path = "#{file_dir}/update_#{singularized_class_name}.rb"
99
99
  raise(Thor::Error, "Mutation RBS already exist! #{file_path}") if File.exist?(file_path)
100
100
 
101
- params = Souls.get_relation_params(class_name: singularized_class_name, col: "mutation")
101
+ params = Souls.get_relation_params(singularized_class_name, "mutation")
102
102
  File.open(file_path, "w") do |f|
103
103
  f.write(<<~TEXT)
104
104
  module Mutations
@@ -3,10 +3,10 @@ module Souls
3
3
  desc "mutation_rbs [CLASS_NAME]", "Generate GraphQL Mutation RBS from schema.rb"
4
4
  def mutation_rbs(class_name)
5
5
  singularized_class_name = class_name.underscore.singularize
6
- create_rbs_mutation(class_name: singularized_class_name)
7
- update_rbs_mutation(class_name: singularized_class_name)
8
- delete_rbs_mutation(class_name: singularized_class_name)
9
- destroy_delete_rbs_mutation(class_name: singularized_class_name)
6
+ create_rbs_mutation(singularized_class_name)
7
+ update_rbs_mutation(singularized_class_name)
8
+ delete_rbs_mutation(singularized_class_name)
9
+ destroy_delete_rbs_mutation(singularized_class_name)
10
10
  rescue Thor::Error => e
11
11
  raise(Thor::Error, e)
12
12
  end
@@ -21,7 +21,7 @@ module Souls
21
21
  file_path = "#{file_dir}/create_#{class_name}.rbs"
22
22
  raise(Thor::Error, "Mutation RBS already exist! #{file_path}") if File.exist?(file_path)
23
23
 
24
- params = Souls.get_relation_params(class_name: class_name, col: "mutation")
24
+ params = Souls.get_relation_params(class_name, "mutation")
25
25
  File.open(file_path, "w") do |f|
26
26
  f.write(<<~TEXT)
27
27
  class Boolean
@@ -102,7 +102,7 @@ module Souls
102
102
  file_dir = "./sig/api/app/graphql/mutations/base/#{class_name}"
103
103
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
104
104
  file_path = "#{file_dir}/update_#{class_name}.rbs"
105
- params = Souls.get_relation_params(class_name: class_name, col: "mutation")
105
+ params = Souls.get_relation_params(class_name, "mutation")
106
106
  params[:params] < { column_name: "id", type: "string", array: false }
107
107
  File.open(file_path, "w") do |f|
108
108
  f.write(<<~TEXT)
@@ -10,7 +10,7 @@ module Souls
10
10
  file_path = "#{file_dir}/#{singularized_class_name}_type.rbs"
11
11
  raise(Thor::Error, "Type RBS already exist! #{file_path}") if File.exist?(file_path)
12
12
 
13
- params = Souls.get_relation_params(class_name: singularized_class_name)
13
+ params = Souls.get_relation_params(singularized_class_name)
14
14
  File.open(file_path, "w") do |f|
15
15
  f.write(<<~TEXT)
16
16
  module Types
@@ -111,7 +111,7 @@ module Souls
111
111
  end
112
112
  end
113
113
 
114
- def get_relation_params(class_name: "user", col: "")
114
+ def get_relation_params(class_name, col = "")
115
115
  Dir.chdir(Souls.get_api_path.to_s) do
116
116
  cols =
117
117
  if col == "mutation"
@@ -129,7 +129,7 @@ module Souls
129
129
  end
130
130
  end
131
131
 
132
- def get_columns_num(class_name: "user")
132
+ def get_columns_num(class_name)
133
133
  pluralized_class_name = class_name.pluralize
134
134
  file_path = "./db/schema.rb"
135
135
  class_check_flag = false
@@ -149,7 +149,7 @@ module Souls
149
149
  cols
150
150
  end
151
151
 
152
- def get_columns_num_no_timestamp(class_name: "user")
152
+ def get_columns_num_no_timestamp(class_name)
153
153
  pluralized_class_name = class_name.pluralize
154
154
  file_path = "./db/schema.rb"
155
155
  class_check_flag = false
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.4.4".freeze
2
+ VERSION = "1.4.5".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.4.4
1
+ 1.4.5
@@ -1 +1 @@
1
- 1.4.4
1
+ 1.4.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: 1.4.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI