souls 0.29.10 → 0.30.3

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: 89783d118ae3fb409bc17f2aea50b67a213f91d34afb3d56135827466e4da20e
4
- data.tar.gz: 2404c4ff229731768621ab122c3d5fe614cc8d54679354664b217ce0493cc28f
3
+ metadata.gz: 4a726d34c53e9d5c3d6faced80c9969fb57583800dc0bb8d037df70cb7aa52a7
4
+ data.tar.gz: 05bc438a0b75dea4dc910f249fad1b1580cdca60c2ce527d9da8fa408b69d602
5
5
  SHA512:
6
- metadata.gz: 0f36b58d66ba66b8885fe9ad9b1a04609fdf76d6632bd50b9ece3a1d569107bb29bccaaa11ac1f6c8e4209e625a765d42746085eaf0442c9395792fe7bbd6159
7
- data.tar.gz: 554f856869f9336d705477cb621d634ebb7ff2ebf48ab1434bd8c9ecfcec1c8492041bd5275f77f98d376c7541814980fa2d1cf2d955afa981b37c41c477b8c5
6
+ metadata.gz: d587c45bbbc5887bcc8cfb02647326e070dbca7fe1971399ffe91a858121667c92baf5d25947e5cbeb032a5731180c05836f15ba36ba95b0ee4dd222598fd892
7
+ data.tar.gz: 1861aea9fceeba6a02d37ada11ef0e6b5b8a1e088d2bde2f76d322faeff2889e16bba81dd0eb094027cc4444b5a57bc173bd163dc1e0c50c2a5e708f392cafb6
data/exe/souls CHANGED
@@ -22,11 +22,18 @@ begin
22
22
  end
23
23
  when "schema:update"
24
24
  class_name = ARGV[2]
25
- Souls::Api::Update.create_mutation(class_name: class_name)
26
- Souls::Api::Update.update_mutation(class_name: class_name)
27
- Souls::Api::Update.rspec_factory(class_name: class_name)
28
- Souls::Api::Update.rspec_mutation(class_name: class_name)
29
- Souls::Api::Update.rspec_resolver(class_name: class_name)
25
+ status = Paint["Running SOULs Update Commands...", :yellow]
26
+ Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
27
+ Whirly.status = status
28
+ Souls::Api::Update.create_mutation(class_name: class_name)
29
+ Souls::Api::Update.update_mutation(class_name: class_name)
30
+ Souls::Api::Update.resolver(class_name: class_name)
31
+ Souls::Api::Update.type(class_name: class_name)
32
+ Souls::Api::Update.rspec_factory(class_name: class_name)
33
+ Souls::Api::Update.rspec_mutation(class_name: class_name)
34
+ Souls::Api::Update.rspec_resolver(class_name: class_name)
35
+ Whirly.status = "Done!"
36
+ end
30
37
  else
31
38
  puts(Paint["Comannd doesn't exist.Check you command again!...", :red])
32
39
  end
@@ -4,7 +4,7 @@ module Souls
4
4
  class << self
5
5
  def create_mutation(class_name: "user")
6
6
  singularized_class_name = class_name.singularize.underscore
7
- new_cols = Souls.get_last_migration_type(class_name: singularized_class_name, action: "add")
7
+ new_cols = Souls.get_columns_num(class_name: singularized_class_name)
8
8
  dir_name = "./app/graphql/mutations/base/#{singularized_class_name}"
9
9
  new_file_path = "tmp/create_mutation.rb"
10
10
  file_path = "#{dir_name}/create_#{singularized_class_name}.rb"
@@ -16,7 +16,8 @@ module Souls
16
16
  next unless line.include?("argument") && !argument
17
17
 
18
18
  new_cols.each do |col|
19
- type = col[:array] ? "[#{col[:type].camelize}]" : col[:type].camelize
19
+ type = Souls::Api::Generate.type_check(col[:type])
20
+ type = "[#{type}]" if col[:array]
20
21
  args = check_mutation_argument(class_name: class_name)
21
22
  unless args.include?(col[:column_name])
22
23
  new_line.write(" argument :#{col[:column_name]}, #{type}, required: false\n")
@@ -31,9 +32,9 @@ module Souls
31
32
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
32
33
  end
33
34
 
34
- def update_update_mutation(class_name: "user")
35
+ def update_mutation(class_name: "user")
35
36
  singularized_class_name = class_name.singularize.underscore
36
- new_cols = Souls.get_last_migration_type(class_name: singularized_class_name, action: "add")
37
+ new_cols = Souls.get_columns_num(class_name: singularized_class_name)
37
38
  dir_name = "./app/graphql/mutations/base/#{singularized_class_name}"
38
39
  new_file_path = "tmp/update_mutation.rb"
39
40
  file_path = "#{dir_name}/update_#{singularized_class_name}.rb"
@@ -4,7 +4,7 @@ module Souls
4
4
  class << self
5
5
  def resolver(class_name: "user")
6
6
  singularized_class_name = class_name.singularize.underscore
7
- new_cols = Souls.get_last_migration_type(class_name: singularized_class_name, action: "add")
7
+ new_cols = Souls.get_columns_num(class_name: singularized_class_name)
8
8
  dir_name = "./app/graphql/resolvers"
9
9
  new_file_path = "tmp/update_resolver.rb"
10
10
  file_path = "#{dir_name}/#{singularized_class_name}_search.rb"
@@ -5,7 +5,7 @@ module Souls
5
5
  def rspec_factory(class_name: "user")
6
6
  singularized_class_name = class_name.singularize.underscore
7
7
  pluralized_class_name = class_name.pluralize.underscore
8
- new_cols = Souls.get_last_migration_type(class_name: singularized_class_name, action: "add")
8
+ new_cols = Souls.get_columns_num(class_name: singularized_class_name)
9
9
  dir_name = "./spec/factories"
10
10
  new_file_path = "tmp/create_factory.rb"
11
11
  file_path = "#{dir_name}/#{pluralized_class_name}.rb"
@@ -4,7 +4,7 @@ module Souls
4
4
  class << self
5
5
  def rspec_mutation(class_name: "user")
6
6
  singularized_class_name = class_name.singularize.underscore
7
- new_cols = Souls.get_last_migration_type(class_name: singularized_class_name, action: "add")
7
+ new_cols = Souls.get_columns_num(class_name: singularized_class_name)
8
8
  dir_name = "./spec/mutations/base"
9
9
  new_file_path = "tmp/rspec_mutation.rb"
10
10
  file_path = "#{dir_name}/#{singularized_class_name}_spec.rb"
@@ -54,7 +54,7 @@ module Souls
54
54
  col[:array] ? "be_all(String)" : "be_a(String)"
55
55
  end
56
56
  unless test_args.include?(col[:column_name])
57
- new_line.write(" \"#{col[:column_name]}\" => #{text},\n")
57
+ new_line.write(" \"#{col[:column_name]}\" => #{text},\n")
58
58
  end
59
59
  end
60
60
  test_res = false
@@ -4,7 +4,7 @@ module Souls
4
4
  class << self
5
5
  def rspec_resolver(class_name: "user")
6
6
  singularized_class_name = class_name.singularize.underscore
7
- new_cols = Souls.get_last_migration_type(class_name: singularized_class_name, action: "add")
7
+ new_cols = Souls.get_columns_num(class_name: singularized_class_name)
8
8
  dir_name = "./spec/resolvers"
9
9
  new_file_path = "tmp/rspec_resolver.rb"
10
10
  file_path = "#{dir_name}/#{singularized_class_name}_search_spec.rb"
@@ -22,14 +22,15 @@ module Souls
22
22
  if node_res && !line.include?("{")
23
23
  node_args = check_rspec_resolver_argument(class_name: class_name, action: "node_args")
24
24
  new_cols.each do |col|
25
- new_line.write(" #{col[:column_name].camelize}\n") unless node_args.include?(col[:column_name])
25
+ unless node_args.include?(col[:column_name])
26
+ new_line.write(" #{col[:column_name].camelize}\n")
27
+ end
26
28
  end
27
29
  node_res = false
28
30
  elsif test_res && line.include?("=> be_")
29
31
  test_args = check_rspec_resolver_argument(class_name: class_name, action: "test_args")
30
32
  new_cols.each do |col|
31
33
  type = Souls::Api::Generate.type_check(col[:type])
32
- p type
33
34
  text =
34
35
  case type
35
36
  when "String"
@@ -4,7 +4,7 @@ module Souls
4
4
  class << self
5
5
  def type(class_name: "user")
6
6
  singularized_class_name = class_name.singularize.underscore
7
- new_cols = Souls.get_last_migration_type(class_name: singularized_class_name, action: "add")
7
+ new_cols = Souls.get_columns_num(class_name: singularized_class_name)
8
8
  dir_name = "./app/graphql/types"
9
9
  new_file_path = "tmp/create_type.rb"
10
10
  file_path = "#{dir_name}/#{singularized_class_name}_type.rb"
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.29.10".freeze
2
+ VERSION = "0.30.3".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.8.10
1
+ 0.9.3
@@ -1 +1 @@
1
- 0.8.10
1
+ 0.9.3
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.29.10
4
+ version: 0.30.3
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-08-17 00:00:00.000000000 Z
13
+ date: 2021-08-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -152,7 +152,7 @@ metadata:
152
152
  homepage_uri: https://souls.elsoul.nl
153
153
  source_code_uri: https://github.com/elsoul/souls
154
154
  changelog_uri: https://github.com/elsoul/souls
155
- post_install_message:
155
+ post_install_message:
156
156
  rdoc_options: []
157
157
  require_paths:
158
158
  - lib
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubygems_version: 3.2.22
171
- signing_key:
171
+ signing_key:
172
172
  specification_version: 4
173
173
  summary: SOULs is a Serverless Application Framework with Ruby GraphQL. SOULs has
174
174
  3 strains, API, Worker, and Frontend. It can be used in combination according to