souls 1.4.1 → 1.4.5

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: dbb16141ab19f58659aeb2e45587f68cf946f86a0560fd16f795f7a1d9a62a6c
4
- data.tar.gz: 381b9878c2e9aae9377f8ccf89527f205948f771c5488b0514b236090e7b685f
3
+ metadata.gz: 426055d995980f34133e97a2bd481c333cb29e88f340d74c08b398e4570459c6
4
+ data.tar.gz: b8266448605e3ae53cfe5eb3043e02d0e3e3ce0453fa3294388441f7f232adae
5
5
  SHA512:
6
- metadata.gz: 2db6f4571323641f101d9fbcc4c8323346bb7e585b027338a2404bd8205379bb8cb8d1723f549e6d09fdebe0d390f7d985d72a1de1649822babb61ae75fc9751
7
- data.tar.gz: 3dbb68d38591725177e54af26172d6476bf6fe802b097df4bb840c0d4d9fac8fa1a4f939e36ad94e53f25987b63c5be0a17b335dbe87b351e69a01f6a6359d49
6
+ metadata.gz: ba35b4d0cf88fd3266700dac70bad5171fb8027f5c67de9d488afe083f64032eba3ce868b19c29e086f2e981b42d79cd71ff2812a3da145712610dafa08901df
7
+ data.tar.gz: e1370b953c6d64db731826c3a59525bbbfced8148ed1c6ffe7ddb40e75f3ce0ae020c83de8793d4df0f76509cb9e5eb6322a4525d67d0ed431dc1b3e13c6d564
@@ -62,7 +62,7 @@ module Souls
62
62
  end
63
63
  end
64
64
 
65
- def souls_conf_update(worker_name, strain)
65
+ def souls_conf_update(worker_name, strain = "mother")
66
66
  workers = Souls.configuration.workers
67
67
  port = 3000 + workers.size
68
68
  file_path = strain == "mother" ? "config/souls.rb" : "apps/api/config/souls.rb"
@@ -5,9 +5,9 @@ module Souls
5
5
  def scaffold(class_name)
6
6
  singularized_class_name = class_name.singularize
7
7
  if options[:rbs]
8
- run_rbs_scaffold(class_name: singularized_class_name)
8
+ run_rbs_scaffold(singularized_class_name)
9
9
  else
10
- run_scaffold(class_name: singularized_class_name)
10
+ run_scaffold(singularized_class_name)
11
11
  end
12
12
  true
13
13
  rescue Thor::Error => e
@@ -32,7 +32,7 @@ module Souls
32
32
 
33
33
  private
34
34
 
35
- def run_scaffold(class_name: "user")
35
+ def run_scaffold(class_name)
36
36
  type(class_name)
37
37
  type_rbs(class_name)
38
38
  query(class_name)
@@ -54,7 +54,7 @@ module Souls
54
54
  rspec_policy(class_name)
55
55
  end
56
56
 
57
- def run_rbs_scaffold(class_name: "user")
57
+ def run_rbs_scaffold(class_name)
58
58
  type_rbs(class_name)
59
59
  query_rbs(class_name)
60
60
  mutation_rbs(class_name)
@@ -64,7 +64,7 @@ module Souls
64
64
  resolver_rbs(class_name)
65
65
  end
66
66
 
67
- def generated_paths(class_name: "user")
67
+ def generated_paths(class_name)
68
68
  singularized_class_name = class_name.singularize.underscore
69
69
  pluralized_class_name = class_name.pluralize.underscore
70
70
  [
@@ -10,10 +10,10 @@ module Souls
10
10
  file_path = "./app/graphql/mutations/base/#{singularized_class_name}/create_#{singularized_class_name}.rb"
11
11
  return "Mutation already exist! #{file_path}" if File.exist?(file_path)
12
12
 
13
- create_mutation(class_name: singularized_class_name)
14
- update_mutation(class_name: singularized_class_name)
15
- delete_mutation(class_name: singularized_class_name)
16
- destroy_delete_mutation(class_name: singularized_class_name)
13
+ create_mutation(singularized_class_name)
14
+ update_mutation(singularized_class_name)
15
+ delete_mutation(singularized_class_name)
16
+ destroy_delete_mutation(singularized_class_name)
17
17
  end
18
18
  rescue Thor::Error => e
19
19
  raise(Thor::Error, e)
@@ -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.1".freeze
2
+ VERSION = "1.4.5".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.4.1
1
+ 1.4.5
@@ -1 +1 @@
1
- 1.4.1
1
+ 1.4.5
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: 1.4.1
4
+ version: 1.4.5
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-11-05 00:00:00.000000000 Z
13
+ date: 2021-11-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -232,7 +232,7 @@ metadata:
232
232
  homepage_uri: https://souls.elsoul.nl
233
233
  source_code_uri: https://github.com/elsoul/souls
234
234
  changelog_uri: https://github.com/elsoul/souls
235
- post_install_message:
235
+ post_install_message:
236
236
  rdoc_options: []
237
237
  require_paths:
238
238
  - lib
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  version: '0'
249
249
  requirements: []
250
250
  rubygems_version: 3.2.22
251
- signing_key:
251
+ signing_key:
252
252
  specification_version: 4
253
253
  summary: Build Serverless Apps faster like Rails. Powered by Ruby GraphQL, RBS/Steep,
254
254
  Active Record, RSpec, RuboCop, and Google Cloud.