souls 0.29.2 → 0.29.3

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: 730068b7f3f94de4766fe3868d5b8d16cdcbdf9c1c2ba4b94f047052bfe7ac69
4
- data.tar.gz: fbd205b97defe15233528f17af4ac35718fb75da3ab7f593110ec9e1d019b306
3
+ metadata.gz: 676dd947f68cd5f0fc4d8971a560308151010d39fcb71bd07d2f7c5bb5d9410f
4
+ data.tar.gz: c1216a0b9cbf4a35722728164caa4cdf4a11b7ea4749a5de290cea66cb0ecb65
5
5
  SHA512:
6
- metadata.gz: 6eb87212d994fc4296aae60c39358f1f323416c9e1ca6d9c837f8eed0f432dfeacf8a39a2be57e38c41d38bb2c83dcd1cd27f1648ef819dd5300daa0b416c885
7
- data.tar.gz: 25a74b86d4d8877e1fb569015a06b1c8cd82d11754a2d8992eff6964de98e4319a3ec3712806c2061f03b3c3e8998454b8186b8fd9afa5dd0839cef9552c7a64
6
+ metadata.gz: 271aaf367d445863910ed8973cfb7cbcb8fcad5fa05d64ce985b67d2042dcf333c4aa2c600a7de0ce299fdc660bc37c5036444e8512c19fdfd8e61ced4a1903e
7
+ data.tar.gz: c47be0a5c8489bc71155bb46b15ded04aa5ef761298edd1c72ed6b401dbd0c7336df2939debdf37f61d7c91c016e505fae5ffc611f210912f952c3e681c95273
@@ -16,6 +16,7 @@ require_relative "./generate/edge"
16
16
  require_relative "./generate/connection"
17
17
  require_relative "./generate/application"
18
18
  require_relative "./generate/migration"
19
+ require_relative "./generate/manager"
19
20
 
20
21
  module Souls
21
22
  module Api::Generate
@@ -0,0 +1,26 @@
1
+ module Souls
2
+ module Api::Generate
3
+ def self.manager(class_name: "souls")
4
+ singularized_class_name = class_name.underscore.singularize
5
+ file_dir = "./app/graphql/mutations/managers/#{singularized_class_name}_manager"
6
+ FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
7
+ file_path = "#{file_dir}/#{singularized_class_name}.rb"
8
+ File.open(file_path, "w") do |f|
9
+ 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 を送信します。"
14
+ field :response, String, null: false
15
+
16
+ node_type(Types::#{singularized_class_name.camelize}Type)
17
+ end
18
+ TEXT
19
+ end
20
+ puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
21
+ file_path
22
+ rescue StandardError => e
23
+ raise(StandardError, e)
24
+ end
25
+ end
26
+ end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.29.2".freeze
2
+ VERSION = "0.29.3".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.8.2
1
+ 0.8.3
@@ -1 +1 @@
1
- 0.8.2
1
+ 0.8.3
@@ -15,7 +15,7 @@ module Souls
15
15
  def mailgun_mailer(class_name: "mailer")
16
16
  file_dir = "./app/graphql/mutations/mailers/"
17
17
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
18
- file_path = "#{file_dir}#{class_name.singularize}.rb"
18
+ file_path = "#{file_dir}#{class_name.singularize}_mailer.rb"
19
19
  raise(StandardError, "Mailer already exist! #{file_path}") if File.exist?(file_path)
20
20
 
21
21
  File.open(file_path, "w") do |f|
@@ -28,7 +28,7 @@ module Souls
28
28
 
29
29
  def resolve
30
30
  # First, instantiate the Mailgun Client with your API key
31
- mg_client = Mailgun::Client.new("YOUR-API-KEY")
31
+ mg_client = ::Mailgun::Client.new("YOUR-API-KEY")
32
32
 
33
33
  # Define your message parameters
34
34
  message_params = {
@@ -39,7 +39,7 @@ module Souls
39
39
  }
40
40
 
41
41
  # Send your message through the client
42
- mg_client.send_message("YOUR-sandbox.mailgun.org", message_params)
42
+ mg_client.send_message("YOUR-MAILGUN-DOMAIN", message_params)
43
43
  { response: "Job done!" }
44
44
  rescue StandardError => e
45
45
  GraphQL::ExecutionError.new(e.to_s)
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.29.2
4
+ version: 0.29.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -106,6 +106,7 @@ files:
106
106
  - lib/souls/api/generate/application.rb
107
107
  - lib/souls/api/generate/connection.rb
108
108
  - lib/souls/api/generate/edge.rb
109
+ - lib/souls/api/generate/manager.rb
109
110
  - lib/souls/api/generate/migration.rb
110
111
  - lib/souls/api/generate/model.rb
111
112
  - lib/souls/api/generate/mutation.rb