souls 0.33.7 β†’ 0.33.8

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: 0a6f4928cb5e49f41978f3820bdb8d7382e8433b0af9ca9910dd46fef8192c71
4
- data.tar.gz: 36933a33337761ef2a04487ca141036f000c0312e0ffa8bbad819a118bfa2cac
3
+ metadata.gz: ac3801b7cc5089209a6d5d6b01289f4d35bd4868ca9e911b32a12dd138172aa0
4
+ data.tar.gz: 7c240fc7c4afce0db3189758196293199761dc8f44d1f621aa86951f12270c44
5
5
  SHA512:
6
- metadata.gz: d7fb6c262cddaa13bfd101456ba195e37503894f1c0de81b0a5c77d58e9993bd4b5f241c8a37b2a6a2a47ea201c11cc7d71afb53d37240a1c44d9c692b7ddb48
7
- data.tar.gz: b6b5de2a7db9ae4796b2881d0a15573b380ac6adfa63b100944d7b700e480c145ac9bf7a2ca32eb67f324a8c8b7deae5c422859a815be8f16d9c79c2df9269c3
6
+ metadata.gz: 150e24efafed4e5673125dba72143a17605107e7ff916499580b48eb8fcbb3e42cc81bafb82594931d9880ae93f620a5c37326efda27bc4b037d228e78cc08e4
7
+ data.tar.gz: 112bac58b55863b8fc896bbdebea7fbd047a2627415163b8ab89de7323800b5fca2690dd71aecf48970b559c301702a17bab65e3a96aca04d03d22aabf8ca353
data/exe/souls CHANGED
@@ -14,10 +14,12 @@ begin
14
14
  when "generate", "g"
15
15
  method_name = ARGV[2]
16
16
  class_name = ARGV[3]
17
+ args = { class_name: class_name }
18
+ args[:mutation] = ARGV[4] if ARGV.size > 4
17
19
  status = Paint["Running SOULs Generate Commands...", :yellow]
18
20
  Whirly.start(spinner: "clock", interval: 420, stop: "πŸŽ‰") do
19
21
  Whirly.status = status
20
- Souls::Api::Generate.public_send(method_name, class_name: class_name)
22
+ Souls::Api::Generate.public_send(method_name, **args)
21
23
  Whirly.status = "Done!"
22
24
  end
23
25
  when "update"
@@ -1,19 +1,31 @@
1
1
  module Souls
2
2
  module Api::Generate
3
- def self.manager(class_name: "souls")
3
+ def self.manager(class_name: "user", mutation: "user_login")
4
+ p(mutation)
4
5
  singularized_class_name = class_name.underscore.singularize
5
6
  file_dir = "./app/graphql/mutations/managers/#{singularized_class_name}_manager"
6
7
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
7
- file_path = "#{file_dir}/#{singularized_class_name}.rb"
8
+ file_path = "#{file_dir}/#{mutation}.rb"
9
+ raise(StandardError, "Already Exist!") if File.exist?(file_path)
10
+
8
11
  File.open(file_path, "w") do |f|
9
12
  f.write(<<~TEXT)
10
- class Types::#{singularized_class_name.camelize}Edge < module Mutations
11
- module Mailers
12
- class #{singularized_class_name.camelize}Mailer < BaseMutation
13
- description "Mail を送俑します。"
13
+ module Mutations
14
+ module Managers::#{singularized_class_name.camelize}Manager
15
+ class #{mutation.underscore.camelize} < BaseMutation
16
+ description "#{mutation} description"
17
+ ## Edit `argument` and `field`
18
+ argument :argment, String, required: true
19
+
14
20
  field :response, String, null: false
15
21
 
16
- node_type(Types::#{singularized_class_name.camelize}Type)
22
+ def resolve(**args)
23
+ # Define Here
24
+ rescue StandardError => e
25
+ GraphQL::ExecutionError.new(e.to_s)
26
+ end
27
+ end
28
+ end
17
29
  end
18
30
  TEXT
19
31
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.33.7".freeze
2
+ VERSION = "0.33.8".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.12.7
1
+ 0.12.8
@@ -1 +1 @@
1
- 0.12.7
1
+ 0.12.8
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.33.7
4
+ version: 0.33.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI