souls 0.29.0 β 0.29.4
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 +4 -4
- data/exe/souls +27 -13
- data/lib/souls.rb +2 -26
- data/lib/souls/api/generate.rb +1 -0
- data/lib/souls/api/generate/manager.rb +26 -0
- data/lib/souls/docker.rb +5 -0
- data/lib/souls/docker/docker.rb +31 -0
- data/lib/souls/gcloud/iam.rb +2 -2
- data/lib/souls/init.rb +1 -3
- data/lib/souls/release.rb +1 -1
- data/lib/souls/release/{methods.rb β release.rb} +1 -1
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- data/lib/souls/worker.rb +6 -1
- data/lib/souls/worker/generate.rb +7 -0
- data/lib/souls/worker/generate/application.rb +150 -0
- data/lib/souls/worker/generate/mailer.rb +62 -0
- metadata +9 -4
- data/lib/souls/api/generate/methods.rb +0 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38f1426f6565e7de43cf5aa3bd13036852422a771f8ee0ed7c65f347b1c445de
|
4
|
+
data.tar.gz: 2f55a9ce5dfd853bc3e3c792cf5926d0ca12c4dfc1b9f93fec251d017c2d6d5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c51d9c2e49be34e63084a2df271b49dd4c6f3b6e3301f126f37ab18c88bcd522c21d22decea0a86b6f316d8455ee439cd8aa27d4b02bfd1050e5a48fb479cd22
|
7
|
+
data.tar.gz: a1f3d6efacfee90a65d1598a53453b42568db5a101f42d9fca8e0f0bccca519f46914f848a25cead23e92b2bd35ef8e91d65821453de23f3325e25dfda876f89
|
data/exe/souls
CHANGED
@@ -21,13 +21,28 @@ begin
|
|
21
21
|
Whirly.status = "Done!"
|
22
22
|
end
|
23
23
|
else
|
24
|
-
Paint["Comannd doesn't exist.Check you command again!...", :red]
|
24
|
+
puts(Paint["Comannd doesn't exist.Check you command again!...", :red])
|
25
25
|
end
|
26
26
|
when "worker"
|
27
|
-
|
27
|
+
api_command = ARGV[1]
|
28
|
+
case api_command
|
29
|
+
when "generate", "g"
|
30
|
+
method_name = ARGV[2]
|
31
|
+
class_name = ARGV[3]
|
32
|
+
args = { class_name: class_name }
|
33
|
+
args[:option] = ARGV[4] if ARGV.size > 4
|
34
|
+
status = Paint["Running SOULs Generate Commands...", :yellow]
|
35
|
+
Whirly.start(spinner: "clock", interval: 420, stop: "π") do
|
36
|
+
Whirly.status = status
|
37
|
+
Souls::Worker::Generate.public_send(method_name, **args)
|
38
|
+
Whirly.status = "Done!"
|
39
|
+
end
|
40
|
+
else
|
41
|
+
puts(Paint["Comannd doesn't exist.Check you command again!...", :red])
|
42
|
+
end
|
28
43
|
when "new"
|
29
44
|
args = ARGV
|
30
|
-
Souls::Init.
|
45
|
+
Souls::Init.start(args)
|
31
46
|
when "s", "server"
|
32
47
|
system("foreman start -f Procfile.dev")
|
33
48
|
when "c", "console"
|
@@ -44,9 +59,9 @@ begin
|
|
44
59
|
system("bundle exec irb")
|
45
60
|
end
|
46
61
|
end
|
47
|
-
when "i", "infra"
|
62
|
+
when "i", "infra", "docker"
|
48
63
|
send_method = ARGV[1]
|
49
|
-
Souls.public_send(send_method)
|
64
|
+
Souls::Docker.public_send(send_method)
|
50
65
|
when "gcloud"
|
51
66
|
args = ARGV
|
52
67
|
status = Paint["Running Gcloud Commands...", :yellow]
|
@@ -65,7 +80,7 @@ begin
|
|
65
80
|
Whirly.status = "Done!"
|
66
81
|
end
|
67
82
|
when "release"
|
68
|
-
Souls::Release.
|
83
|
+
Souls::Release.gem_release
|
69
84
|
when "model:update"
|
70
85
|
status = Paint["Syncing Models...", :yellow]
|
71
86
|
Whirly.start(spinner: "clock", interval: 420, stop: "π") do
|
@@ -90,13 +105,12 @@ begin
|
|
90
105
|
puts(Paint["Wrong Argument!", :red])
|
91
106
|
end
|
92
107
|
when "g", "generate"
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
Whirly.status = done
|
108
|
+
g_command = ARGV[1]
|
109
|
+
case g_command
|
110
|
+
when "worker"
|
111
|
+
Souls::Init.download_worker
|
112
|
+
else
|
113
|
+
puts(Paint["Coming Soon...", :green])
|
100
114
|
end
|
101
115
|
when "d", "delete"
|
102
116
|
class_name = ARGV[1]
|
data/lib/souls.rb
CHANGED
@@ -2,8 +2,10 @@ require_relative "souls/version"
|
|
2
2
|
require "active_support/core_ext/string/inflections"
|
3
3
|
require_relative "souls/init"
|
4
4
|
require_relative "souls/api"
|
5
|
+
require_relative "souls/worker"
|
5
6
|
require_relative "souls/gcloud"
|
6
7
|
require_relative "souls/release"
|
8
|
+
require_relative "souls/docker"
|
7
9
|
require "date"
|
8
10
|
require "dotenv/load"
|
9
11
|
require "json"
|
@@ -33,32 +35,6 @@ module Souls
|
|
33
35
|
class << self
|
34
36
|
attr_accessor :configuration
|
35
37
|
|
36
|
-
def psql
|
37
|
-
system(
|
38
|
-
"docker run --rm -d \
|
39
|
-
-p 5433:5432 \
|
40
|
-
-v postgres-tmp:/var/lib/postgresql/data \
|
41
|
-
-e POSTGRES_USER=postgres \
|
42
|
-
-e POSTGRES_PASSWORD=postgres \
|
43
|
-
-e POSTGRES_DB=souls_test \
|
44
|
-
postgres:13-alpine"
|
45
|
-
)
|
46
|
-
system("docker ps")
|
47
|
-
end
|
48
|
-
|
49
|
-
def mysql
|
50
|
-
system(
|
51
|
-
"docker run --rm -d \
|
52
|
-
-p 3306:3306 \
|
53
|
-
-v mysql-tmp:/var/lib/mysql \
|
54
|
-
-e MYSQL_USER=mysql \
|
55
|
-
-e MYSQL_ROOT_PASSWORD=mysql \
|
56
|
-
-e MYSQL_DB=souls_test \
|
57
|
-
mysql:latest"
|
58
|
-
)
|
59
|
-
system("docker ps")
|
60
|
-
end
|
61
|
-
|
62
38
|
def gemfile_latest_version
|
63
39
|
file_path = "./Gemfile"
|
64
40
|
updated_gems = []
|
data/lib/souls/api/generate.rb
CHANGED
@@ -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/docker.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
module Souls
|
2
|
+
module Docker
|
3
|
+
class << self
|
4
|
+
def psql
|
5
|
+
system(
|
6
|
+
"docker run --rm -d \
|
7
|
+
-p 5433:5432 \
|
8
|
+
-v postgres-tmp:/var/lib/postgresql/data \
|
9
|
+
-e POSTGRES_USER=postgres \
|
10
|
+
-e POSTGRES_PASSWORD=postgres \
|
11
|
+
-e POSTGRES_DB=souls_test \
|
12
|
+
postgres:13-alpine"
|
13
|
+
)
|
14
|
+
system("docker ps")
|
15
|
+
end
|
16
|
+
|
17
|
+
def mysql
|
18
|
+
system(
|
19
|
+
"docker run --rm -d \
|
20
|
+
-p 3306:3306 \
|
21
|
+
-v mysql-tmp:/var/lib/mysql \
|
22
|
+
-e MYSQL_USER=mysql \
|
23
|
+
-e MYSQL_ROOT_PASSWORD=mysql \
|
24
|
+
-e MYSQL_DB=souls_test \
|
25
|
+
mysql:latest"
|
26
|
+
)
|
27
|
+
system("docker ps")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/souls/gcloud/iam.rb
CHANGED
@@ -63,8 +63,8 @@ module Souls
|
|
63
63
|
roles = [
|
64
64
|
"roles/cloudsql.instanceUser",
|
65
65
|
"roles/containerregistry.ServiceAgent",
|
66
|
-
"roles/pubsub.
|
67
|
-
"roles/firestore.
|
66
|
+
"roles/pubsub.serviceAdmin",
|
67
|
+
"roles/firestore.serviceAdmin",
|
68
68
|
"roles/iam.serviceAccountUser",
|
69
69
|
"roles/storage.objectAdmin",
|
70
70
|
"roles/run.admin"
|
data/lib/souls/init.rb
CHANGED
@@ -21,7 +21,6 @@ module Souls
|
|
21
21
|
config.project_id = "souls-app"
|
22
22
|
config.strain = "#{app_name}"
|
23
23
|
config.github_repo = "elsoul/souls"
|
24
|
-
config.worker_endpoint = "https://worker.test.com"
|
25
24
|
config.fixed_gems = ["excluded_gem"]
|
26
25
|
end
|
27
26
|
TEXT
|
@@ -51,7 +50,6 @@ module Souls
|
|
51
50
|
config.project_id = "#{app_name}"
|
52
51
|
config.strain = "mother"
|
53
52
|
config.github_repo = "elsoul/souls"
|
54
|
-
config.worker_endpoint = "https://worker.test.com"
|
55
53
|
config.fixed_gems = ["excluded_gem"]
|
56
54
|
end
|
57
55
|
TEXT
|
@@ -60,7 +58,7 @@ module Souls
|
|
60
58
|
puts(e)
|
61
59
|
end
|
62
60
|
|
63
|
-
def self.
|
61
|
+
def self.start(args)
|
64
62
|
app_name = args[1]
|
65
63
|
if app_name.nil?
|
66
64
|
puts(Paint["you need to specify your app name", :red])
|
data/lib/souls/release.rb
CHANGED
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.4
|
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.4
|
data/lib/souls/worker.rb
CHANGED
@@ -0,0 +1,150 @@
|
|
1
|
+
module Souls
|
2
|
+
module Worker
|
3
|
+
module Generate
|
4
|
+
## Common Methods
|
5
|
+
def self.generated_paths(class_name: "user")
|
6
|
+
singularized_class_name = class_name.singularize.underscore
|
7
|
+
pluralized_class_name = class_name.pluralize.underscore
|
8
|
+
[
|
9
|
+
"./app/models/#{singularized_class_name}.rb",
|
10
|
+
"./app/policies/#{singularized_class_name}_policy.rb",
|
11
|
+
"./app/graphql/mutations/create_#{singularized_class_name}.rb",
|
12
|
+
"./app/graphql/mutations/delete_#{singularized_class_name}.rb",
|
13
|
+
"./app/graphql/mutations/destroy_delete_#{singularized_class_name}.rb",
|
14
|
+
"./app/graphql/mutations/update_#{singularized_class_name}.rb",
|
15
|
+
"./app/graphql/queries/#{singularized_class_name}.rb",
|
16
|
+
"./app/graphql/queries/#{pluralized_class_name}.rb",
|
17
|
+
"./app/graphql/resolvers/#{singularized_class_name}_search.rb",
|
18
|
+
"./app/graphql/types/#{singularized_class_name}_type.rb",
|
19
|
+
"./app/graphql/types/edges/#{singularized_class_name}_edge.rb",
|
20
|
+
"./app/graphql/types/connections/#{singularized_class_name}_connection.rb",
|
21
|
+
"./spec/factories/#{pluralized_class_name}.rb",
|
22
|
+
"./spec/mutations/#{singularized_class_name}_spec.rb",
|
23
|
+
"./spec/models/#{singularized_class_name}_spec.rb",
|
24
|
+
"./spec/queries/#{singularized_class_name}_spec.rb",
|
25
|
+
"./spec/policies/#{singularized_class_name}_policy_spec.rb",
|
26
|
+
"./spec/resolvers/#{singularized_class_name}_search_spec.rb"
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.get_type_and_name(line)
|
31
|
+
line.split(",")[0].gsub("\"", "").scan(/((?<=t\.).+(?=\s)) (.+)/)[0]
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.get_tables
|
35
|
+
path = "./db/schema.rb"
|
36
|
+
tables = []
|
37
|
+
File.open(path, "r") do |f|
|
38
|
+
f.each_line.with_index do |line, _i|
|
39
|
+
tables << line.split("\"")[1] if line.include?("create_table")
|
40
|
+
end
|
41
|
+
end
|
42
|
+
tables
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.type_check(type)
|
46
|
+
{
|
47
|
+
bigint: "Integer",
|
48
|
+
string: "String",
|
49
|
+
float: "Float",
|
50
|
+
text: "String",
|
51
|
+
datetime: "String",
|
52
|
+
date: "String",
|
53
|
+
boolean: "Boolean",
|
54
|
+
integer: "Integer"
|
55
|
+
}[type.to_sym]
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.get_test_type(type)
|
59
|
+
{
|
60
|
+
bigint: 1,
|
61
|
+
float: 4.2,
|
62
|
+
string: '"MyString"',
|
63
|
+
text: '"MyString"',
|
64
|
+
datetime: "Time.now",
|
65
|
+
date: "Time.now",
|
66
|
+
boolean: false,
|
67
|
+
integer: 1
|
68
|
+
}[type.to_sym]
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.table_check(line: "", class_name: "")
|
72
|
+
if line.include?("create_table") && (line.split[1].gsub("\"", "").gsub(",", "") == class_name.pluralize.to_s)
|
73
|
+
|
74
|
+
return true
|
75
|
+
end
|
76
|
+
|
77
|
+
false
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.migrate(class_name: "souls")
|
81
|
+
singularized_class_name = class_name.singularize
|
82
|
+
model(class_name: singularized_class_name)
|
83
|
+
type(class_name: singularized_class_name)
|
84
|
+
edge(class_name: singularized_class_name)
|
85
|
+
connection(class_name: singularized_class_name)
|
86
|
+
resolver(class_name: singularized_class_name)
|
87
|
+
rspec_factory(class_name: singularized_class_name)
|
88
|
+
rspec_model(class_name: singularized_class_name)
|
89
|
+
rspec_mutation(class_name: singularized_class_name)
|
90
|
+
rspec_query(class_name: singularized_class_name)
|
91
|
+
rspec_resolver(class_name: singularized_class_name)
|
92
|
+
query(class_name: singularized_class_name)
|
93
|
+
mutation(class_name: singularized_class_name)
|
94
|
+
policy(class_name: singularized_class_name)
|
95
|
+
rspec_policy(class_name: singularized_class_name)
|
96
|
+
rescue StandardError => e
|
97
|
+
raise(StandardError, e)
|
98
|
+
end
|
99
|
+
|
100
|
+
def self.migrate_all
|
101
|
+
puts(Paint["Let's Go SOULs AUTO CRUD Assist!\n", :cyan])
|
102
|
+
Souls::Api::Generate.get_tables.each do |table|
|
103
|
+
Souls::Api::Generate.migrate(class_name: table.singularize)
|
104
|
+
puts(Paint["Generated #{table.camelize} CRUD Files\n", :yellow])
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def self.delete_all(class_name: "souls")
|
109
|
+
singularized_class_name = class_name.singularize.underscore
|
110
|
+
pluralized_class_name = class_name.pluralize.underscore
|
111
|
+
FileUtils.rm("./app/models/#{singularized_class_name}.rb")
|
112
|
+
FileUtils.rm("./app/policies/#{singularized_class_name}_policy.rb")
|
113
|
+
FileUtils.rm_rf("./app/graphql/mutations/base/#{singularized_class_name}")
|
114
|
+
FileUtils.rm("./app/graphql/queries/#{singularized_class_name}.rb")
|
115
|
+
FileUtils.rm("./app/graphql/queries/#{pluralized_class_name}.rb")
|
116
|
+
FileUtils.rm("./app/graphql/resolvers/#{singularized_class_name}_search.rb")
|
117
|
+
FileUtils.rm("./app/graphql/types/#{singularized_class_name}_type.rb")
|
118
|
+
FileUtils.rm("./app/graphql/types/edges/#{singularized_class_name}_edge.rb")
|
119
|
+
FileUtils.rm("./app/graphql/types/connections/#{singularized_class_name}_connection.rb")
|
120
|
+
FileUtils.rm("./spec/factories/#{pluralized_class_name}.rb")
|
121
|
+
FileUtils.rm("./spec/mutations/base/#{singularized_class_name}_spec.rb")
|
122
|
+
FileUtils.rm("./spec/models/#{singularized_class_name}_spec.rb")
|
123
|
+
FileUtils.rm("./spec/queries/#{singularized_class_name}_spec.rb")
|
124
|
+
FileUtils.rm("./spec/policies/#{singularized_class_name}_policy_spec.rb")
|
125
|
+
FileUtils.rm("./spec/resolvers/#{singularized_class_name}_search_spec.rb")
|
126
|
+
puts(Paint["deleted #{class_name.camelize} CRUD!", :yellow])
|
127
|
+
rescue StandardError => e
|
128
|
+
raise(StandardError, e)
|
129
|
+
end
|
130
|
+
|
131
|
+
def self.update_delete(class_name: "souls")
|
132
|
+
singularized_class_name = class_name.singularize.underscore
|
133
|
+
pluralized_class_name = class_name.pluralize.underscore
|
134
|
+
FileUtils.rm_rf("./app/graphql/mutations/#{singularized_class_name}")
|
135
|
+
FileUtils.rm("./app/graphql/queries/#{singularized_class_name}.rb")
|
136
|
+
FileUtils.rm("./app/graphql/queries/#{pluralized_class_name}.rb")
|
137
|
+
FileUtils.rm("./app/graphql/resolvers/#{singularized_class_name}_search.rb")
|
138
|
+
FileUtils.rm("./app/graphql/types/#{singularized_class_name}_type.rb")
|
139
|
+
FileUtils.rm("./app/graphql/types/edges/#{singularized_class_name}_edge.rb")
|
140
|
+
FileUtils.rm("./app/graphql/types/connections/#{singularized_class_name}_connection.rb")
|
141
|
+
FileUtils.rm("./spec/mutations/#{singularized_class_name}_spec.rb")
|
142
|
+
FileUtils.rm("./spec/queries/#{singularized_class_name}_spec.rb")
|
143
|
+
FileUtils.rm("./spec/resolvers/#{singularized_class_name}_search_spec.rb")
|
144
|
+
puts("deleted #{class_name.camelize} CRUD!")
|
145
|
+
rescue StandardError => e
|
146
|
+
raise(StandardError, e)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
module Souls
|
2
|
+
module Worker
|
3
|
+
module Generate
|
4
|
+
class << self
|
5
|
+
def mailer(class_name: "mailer", option: "")
|
6
|
+
puts(option)
|
7
|
+
if option.to_sym == :sendgrid
|
8
|
+
sendgrid_mailer(class_name: class_name)
|
9
|
+
else
|
10
|
+
mailgun_mailer(class_name: class_name)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def mailgun_mailer(class_name: "mailer")
|
17
|
+
file_dir = "./app/graphql/mutations/mailers/"
|
18
|
+
FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
|
19
|
+
file_path = "#{file_dir}#{class_name.singularize}_mailer.rb"
|
20
|
+
raise(StandardError, "Mailer already exist! #{file_path}") if File.exist?(file_path)
|
21
|
+
|
22
|
+
File.open(file_path, "w") do |f|
|
23
|
+
f.write(<<~TEXT)
|
24
|
+
module Mutations
|
25
|
+
module Mailers
|
26
|
+
class #{class_name.camelize}Mailer < BaseMutation
|
27
|
+
description "Mail γιδΏ‘γγΎγγ"
|
28
|
+
field :response, String, null: false
|
29
|
+
|
30
|
+
def resolve
|
31
|
+
# First, instantiate the Mailgun Client with your API key
|
32
|
+
mg_client = ::Mailgun::Client.new("YOUR-API-KEY")
|
33
|
+
|
34
|
+
# Define your message parameters
|
35
|
+
message_params = {
|
36
|
+
from: "postmaster@YOUR-DOMAIN",
|
37
|
+
to: "sending@to.mail.com",
|
38
|
+
subject: "SOULs Mailer test!",
|
39
|
+
text: "It is really easy to send a message!"
|
40
|
+
}
|
41
|
+
|
42
|
+
# Send your message through the client
|
43
|
+
mg_client.send_message("YOUR-MAILGUN-DOMAIN", message_params)
|
44
|
+
{ response: "Job done!" }
|
45
|
+
rescue StandardError => e
|
46
|
+
GraphQL::ExecutionError.new(e.to_s)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
TEXT
|
51
|
+
end
|
52
|
+
puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
|
53
|
+
file_path
|
54
|
+
end
|
55
|
+
|
56
|
+
def sendgrid_mailer(class_name: "mailer")
|
57
|
+
p("Coming Soon..")
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
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.
|
4
|
+
version: 0.29.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-08-
|
13
|
+
date: 2021-08-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -106,7 +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/
|
109
|
+
- lib/souls/api/generate/manager.rb
|
110
110
|
- lib/souls/api/generate/migration.rb
|
111
111
|
- lib/souls/api/generate/model.rb
|
112
112
|
- lib/souls/api/generate/mutation.rb
|
@@ -120,6 +120,8 @@ files:
|
|
120
120
|
- lib/souls/api/generate/rspec_query.rb
|
121
121
|
- lib/souls/api/generate/rspec_resolver.rb
|
122
122
|
- lib/souls/api/generate/type.rb
|
123
|
+
- lib/souls/docker.rb
|
124
|
+
- lib/souls/docker/docker.rb
|
123
125
|
- lib/souls/gcloud.rb
|
124
126
|
- lib/souls/gcloud/compute.rb
|
125
127
|
- lib/souls/gcloud/iam.rb
|
@@ -128,11 +130,14 @@ files:
|
|
128
130
|
- lib/souls/gcloud/run.rb
|
129
131
|
- lib/souls/init.rb
|
130
132
|
- lib/souls/release.rb
|
131
|
-
- lib/souls/release/
|
133
|
+
- lib/souls/release/release.rb
|
132
134
|
- lib/souls/version.rb
|
133
135
|
- lib/souls/versions/.souls_api_version
|
134
136
|
- lib/souls/versions/.souls_worker_version
|
135
137
|
- lib/souls/worker.rb
|
138
|
+
- lib/souls/worker/generate.rb
|
139
|
+
- lib/souls/worker/generate/application.rb
|
140
|
+
- lib/souls/worker/generate/mailer.rb
|
136
141
|
homepage: https://souls.elsoul.nl
|
137
142
|
licenses:
|
138
143
|
- Apache-2.0
|
@@ -1,64 +0,0 @@
|
|
1
|
-
module Souls
|
2
|
-
module Api::Generate
|
3
|
-
class << self
|
4
|
-
def return_method(args)
|
5
|
-
graphql_class = args[1]
|
6
|
-
class_name = args[2]
|
7
|
-
case graphql_class
|
8
|
-
when "test_dir"
|
9
|
-
Souls::Api::Generate.test_dir
|
10
|
-
when "model"
|
11
|
-
Souls::Api::Generate.model(class_name: class_name)
|
12
|
-
when "mutation"
|
13
|
-
Souls::Api::Generate.mutation(class_name: class_name)
|
14
|
-
when "query"
|
15
|
-
Souls::Api::Generate.query(class_name: class_name)
|
16
|
-
when "type"
|
17
|
-
Souls::Api::Generate.type(class_name: class_name)
|
18
|
-
when "edge"
|
19
|
-
Souls::Api::Generate.edge(class_name: class_name)
|
20
|
-
when "connection"
|
21
|
-
Souls::Api::Generate.connection(class_name: class_name)
|
22
|
-
when "resolver"
|
23
|
-
Souls::Api::Generate.resolver(class_name: class_name)
|
24
|
-
when "policy"
|
25
|
-
Souls::Api::Generate.policy(class_name: class_name)
|
26
|
-
when "rspec_factory"
|
27
|
-
Souls::Api::Generate.rspec_factory(class_name: class_name)
|
28
|
-
when "rspec_model"
|
29
|
-
Souls::Api::Generate.rspec_model(class_name: class_name)
|
30
|
-
when "rspec_mutation"
|
31
|
-
Souls::Api::Generate.rspec_mutation(class_name: class_name)
|
32
|
-
when "rspec_query"
|
33
|
-
Souls::Api::Generate.rspec_query(class_name: class_name)
|
34
|
-
when "rspec_resolver"
|
35
|
-
Souls::Api::Generate.rspec_resolver(class_name: class_name)
|
36
|
-
when "rspec_policy"
|
37
|
-
Souls::Api::Generate.rspec_policy(class_name: class_name)
|
38
|
-
when "node_type"
|
39
|
-
Souls::Api::Generate.node_type(class_name: class_name)
|
40
|
-
when "job"
|
41
|
-
Souls::Api::Generate.job(class_name: class_name)
|
42
|
-
when "migrate"
|
43
|
-
Souls::Api::Generate.migrate(class_name: class_name)
|
44
|
-
when "migrate_all"
|
45
|
-
puts(Paint["Let's Go SOULs AUTO CRUD Assist!\n", :cyan])
|
46
|
-
Souls::Api::Generate.get_tables.each do |table|
|
47
|
-
Souls::Api::Generate.migrate(class_name: table.singularize)
|
48
|
-
puts(Paint["Generated #{table.camelize} CRUD Files\n", :yellow])
|
49
|
-
end
|
50
|
-
when "migration"
|
51
|
-
pluralized_class_name = class_name.underscore.pluralize
|
52
|
-
system("rake db:create_migration NAME=create_#{pluralized_class_name}")
|
53
|
-
when "update"
|
54
|
-
Souls::Api::Generate.update_delete(class_name: class_name)
|
55
|
-
Souls::Api::Generate.migrate(class_name: class_name)
|
56
|
-
when "worker"
|
57
|
-
Souls::Init.download_worker
|
58
|
-
else
|
59
|
-
"SOULs!"
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|