souls 0.44.6 → 0.45.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.
@@ -2,7 +2,7 @@ module Souls
2
2
  module Api::Generate
3
3
  class << self
4
4
  ## Generate Type
5
- def create_type_head(class_name: "souls")
5
+ def create_type_head(class_name: "user")
6
6
  file_dir = "./app/graphql/types/"
7
7
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
8
8
  file_path = "./app/graphql/types/#{class_name}_type.rb"
@@ -16,7 +16,7 @@ module Souls
16
16
  end
17
17
  end
18
18
 
19
- def create_type_params(class_name: "souls")
19
+ def create_type_params(class_name: "user")
20
20
  file_path = "./app/graphql/types/#{class_name}_type.rb"
21
21
  path = "./db/schema.rb"
22
22
  @on = false
@@ -52,7 +52,7 @@ module Souls
52
52
  end
53
53
  end
54
54
 
55
- def create_type_end(class_name: "souls")
55
+ def create_type_end(class_name: "user")
56
56
  file_path = "./app/graphql/types/#{class_name}_type.rb"
57
57
  File.open(file_path, "a") do |f|
58
58
  f.write(<<~TEXT)
@@ -63,7 +63,7 @@ module Souls
63
63
  file_path
64
64
  end
65
65
 
66
- def type(class_name: "souls")
66
+ def type(class_name: "user")
67
67
  singularized_class_name = class_name.singularize
68
68
  file_path = "./app/graphql/types/#{singularized_class_name}_type.rb"
69
69
  return "Type already exist! #{file_path}" if File.exist?(file_path)
@@ -30,7 +30,7 @@ module Souls
30
30
  def mother_procfile(worker_name: "mailer")
31
31
  file_path = "Procfile.dev"
32
32
  File.open(file_path, "a") do |f|
33
- f.write("\n#{worker_name}: foreman start -f ./apps/#{worker_name}/Procfile")
33
+ f.write("\n#{worker_name}: foreman start -f ./apps/#{worker_name}/Procfile.dev")
34
34
  end
35
35
  end
36
36
 
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.44.6".freeze
2
+ VERSION = "0.45.3".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.23.6
1
+ 0.24.3
@@ -1 +1 @@
1
- 0.23.6
1
+ 0.24.3
@@ -43,6 +43,7 @@ module Souls
43
43
  rescue StandardError => e
44
44
  GraphQL::ExecutionError.new(e.to_s)
45
45
  end
46
+ end
46
47
  end
47
48
  TEXT
48
49
  end
@@ -2,11 +2,20 @@ module Souls
2
2
  module Worker
3
3
  module Generate
4
4
  class << self
5
- def mutation(class_name: "csv_export")
5
+ def mutation(class_name: "send-mailer", option: "")
6
+ case option
7
+ when "--mailer"
8
+ mailer(class_name: class_name)
9
+ else
10
+ create_mutation(class_name: class_name)
11
+ end
12
+ end
13
+
14
+ def create_mutation(class_name: "send-mailer")
6
15
  file_dir = "./app/graphql/mutations/"
7
16
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
8
17
  file_path = "#{file_dir}#{class_name.singularize}.rb"
9
- raise(StandardError, "Mailer already exist! #{file_path}") if File.exist?(file_path)
18
+ raise(StandardError, "Mutation already exist! #{file_path}") if File.exist?(file_path)
10
19
 
11
20
  File.open(file_path, "w") do |f|
12
21
  f.write(<<~TEXT)
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.44.6
4
+ version: 0.45.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI