souls 0.25.17 → 0.25.21
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/README.md +5 -11
- data/exe/souls +3 -27
- data/lib/souls/generate/methods.rb +2 -0
- data/lib/souls/generate/mutation.rb +3 -3
- data/lib/souls/init.rb +100 -6
- 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
- metadata +38 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d302739333f55f0b68fb0c8a8fa5f35c9554835ef2ac2450d1cdb5f5e471d744
|
4
|
+
data.tar.gz: 9bb8ffc40893c6df1c9c3ef96bb66be49e8d6172f1cd553f852e7b8667ac7f62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7d433ecd0936e89f176a2f78b2fa8a93ec450c3a002e24c168f1f733285bfa2dcec9a4f97d6ec774b096f7ff86f9a815b2691d1a533743a7e6c2046e05b0f8e
|
7
|
+
data.tar.gz: 21a103c93a45cc00e8910d11b0dc2e6163e9fa6112b809d5a7344941012f6fea730fbbeb482fa9851cf238848819c1f2831f41424e29a09ff4cb826f061808ec
|
data/README.md
CHANGED
@@ -22,19 +22,16 @@
|
|
22
22
|
Welcome to SOULs Serverless Application Framework!
|
23
23
|
|
24
24
|
SOULs is a Serverless Application Framework with Ruby GraphQL.
|
25
|
-
SOULs has
|
26
|
-
You can focus on your business logic.
|
25
|
+
SOULs has 3 strains, API, Worker, and Frontend. It can be used in combination according to the purpose. SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google Cloud. No more routing for Backends!
|
26
|
+
You can focus on your business logic.
|
27
27
|
|
28
28
|

|
29
29
|
|
30
|
-
SOULs creates
|
30
|
+
SOULs creates 3 types of framework.
|
31
31
|
|
32
32
|
1. API - GraphQL (Ruby) - Simple API - Cloud Run
|
33
33
|
2. Worker - Google Pub/Sub Worker API (Ruby) - Cloud Run
|
34
|
-
3.
|
35
|
-
4. Admin Web Client - Admin Console and CMS (TypeScript)
|
36
|
-
5. Media Web Client - Media web client with SSG (TypeScript)
|
37
|
-
6. Doc Web Client - Doc web client with SSG (TypeScript)
|
34
|
+
3. Frontend - React Application (TypeScript) - Firebase
|
38
35
|
|
39
36
|
## Dependency
|
40
37
|
|
@@ -81,10 +78,7 @@ And Create Your APP
|
|
81
78
|
Select Strain:
|
82
79
|
1. SOULs GraphQL API
|
83
80
|
2. SOULs Worker
|
84
|
-
3. SOULs
|
85
|
-
4. SOULs Admin Web
|
86
|
-
5. SOULs Media Web
|
87
|
-
6. SOULs Doc Web
|
81
|
+
3. SOULs Frontend Web
|
88
82
|
|
89
83
|
|
90
84
|
## Gemfile 自動更新アップデート
|
data/exe/souls
CHANGED
@@ -9,32 +9,8 @@ begin
|
|
9
9
|
souls_command = ARGV[0]
|
10
10
|
case souls_command
|
11
11
|
when "new"
|
12
|
-
|
13
|
-
|
14
|
-
if app_name.nil?
|
15
|
-
puts(Paint["you need to specify your app name", :red])
|
16
|
-
puts(Paint["`souls new app_name`", :yellow])
|
17
|
-
exit
|
18
|
-
end
|
19
|
-
|
20
|
-
prompt = TTY::Prompt.new
|
21
|
-
choices = [
|
22
|
-
"1. SOULs GraphQL API",
|
23
|
-
"2. SOULs Pub/Sub Worker",
|
24
|
-
"3. SOULs Console Web",
|
25
|
-
"4. SOULs Admin Web",
|
26
|
-
"5. SOULs Media Web",
|
27
|
-
"6. SOULs Doc Web"
|
28
|
-
]
|
29
|
-
choice_num = prompt.select(Paint["Select Strain: ", :cyan], choices)[0].to_i
|
30
|
-
case choice_num
|
31
|
-
when 1, 2
|
32
|
-
service_name = (STRAINS[choice_num.to_i - 1]).to_s
|
33
|
-
Souls::Init.download_souls(app_name: app_name, service_name: service_name)
|
34
|
-
Souls::Init.initial_config_init(app_name: app_name, service_name: service_name)
|
35
|
-
else
|
36
|
-
puts(Paint["Coming Soon...", :blue])
|
37
|
-
end
|
12
|
+
args = ARGV
|
13
|
+
Souls::Init.return_method(args)
|
38
14
|
when "s", "server"
|
39
15
|
strain = Souls.configuration.strain
|
40
16
|
case strain
|
@@ -130,7 +106,7 @@ begin
|
|
130
106
|
when "g", "generate"
|
131
107
|
args = ARGV
|
132
108
|
status = Paint["Generating Files...", :yellow]
|
133
|
-
done = Paint["
|
109
|
+
done = Paint["You're All Set ☻", :yellow]
|
134
110
|
Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
|
135
111
|
Whirly.status = status
|
136
112
|
Souls::Generate.return_method(args)
|
@@ -104,7 +104,7 @@ module Souls
|
|
104
104
|
File.open(file_path, "w") do |new_line|
|
105
105
|
new_line.write(<<~TEXT)
|
106
106
|
module Mutations
|
107
|
-
module
|
107
|
+
module Base::#{class_name.camelize}
|
108
108
|
class Update#{class_name.camelize} < BaseMutation
|
109
109
|
field :#{class_name}_edge, Types::#{class_name.camelize}Type.edge_type, null: false
|
110
110
|
|
@@ -211,7 +211,7 @@ module Souls
|
|
211
211
|
File.open(file_path, "w") do |f|
|
212
212
|
f.write(<<~TEXT)
|
213
213
|
module Mutations
|
214
|
-
module
|
214
|
+
module Base::#{class_name.camelize}
|
215
215
|
class Delete#{class_name.camelize} < BaseMutation
|
216
216
|
field :#{class_name}, Types::#{class_name.camelize}Type, null: false
|
217
217
|
argument :id, String, required: true
|
@@ -240,7 +240,7 @@ module Souls
|
|
240
240
|
File.open(file_path, "w") do |f|
|
241
241
|
f.write(<<~TEXT)
|
242
242
|
module Mutations
|
243
|
-
module
|
243
|
+
module Base::#{class_name.camelize}
|
244
244
|
class DestroyDelete#{class_name.camelize} < BaseMutation
|
245
245
|
field :#{class_name}, Types::#{class_name.camelize}Type, null: false
|
246
246
|
argument :id, String, required: true
|
data/lib/souls/init.rb
CHANGED
@@ -10,13 +10,15 @@ module Souls
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.initial_config_init(app_name: "souls", service_name: "api")
|
13
|
-
|
14
|
-
|
13
|
+
config_dir = "./#{app_name}/apps/#{service_name}/config"
|
14
|
+
FileUtils.mkdir_p(config_dir) unless Dir.exist?(config_dir)
|
15
|
+
FileUtils.touch("#{config_dir}/souls.rb")
|
16
|
+
file_path = "#{config_dir}/souls.rb"
|
15
17
|
File.open(file_path, "w") do |f|
|
16
18
|
f.write(<<~TEXT)
|
17
19
|
Souls.configure do |config|
|
18
20
|
config.app = "#{app_name}"
|
19
|
-
config.project_id = "souls-
|
21
|
+
config.project_id = "souls-app"
|
20
22
|
config.strain = "#{service_name}"
|
21
23
|
config.worker_endpoint = "https://worker.com"
|
22
24
|
config.fixed_gems = ["excluded_gem"]
|
@@ -27,13 +29,59 @@ module Souls
|
|
27
29
|
puts(e)
|
28
30
|
end
|
29
31
|
|
32
|
+
def self.mother_config_init(app_name: "souls-app")
|
33
|
+
config_dir = "./#{app_name}/config"
|
34
|
+
FileUtils.mkdir_p(config_dir) unless Dir.exist?(config_dir)
|
35
|
+
FileUtils.touch("#{config_dir}/souls.rb")
|
36
|
+
file_path = "#{config_dir}/souls.rb"
|
37
|
+
File.open(file_path, "w") do |f|
|
38
|
+
f.write(<<~TEXT)
|
39
|
+
Souls.configure do |config|
|
40
|
+
config.app = "#{app_name}"
|
41
|
+
config.project_id = "souls-app"
|
42
|
+
config.strain = "mother"
|
43
|
+
config.api = true
|
44
|
+
config.worker = false
|
45
|
+
config.frontend = false
|
46
|
+
config.worker_endpoint = ""
|
47
|
+
config.fixed_gems = ["excluded_gem"]
|
48
|
+
end
|
49
|
+
TEXT
|
50
|
+
end
|
51
|
+
rescue StandardError => e
|
52
|
+
puts(e)
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.return_method(args)
|
56
|
+
strains = %w[api worker console admin media doc].freeze
|
57
|
+
app_name = args[1]
|
58
|
+
if app_name.nil?
|
59
|
+
puts(Paint["you need to specify your app name", :red])
|
60
|
+
puts(Paint["`souls new souls-app`", :yellow])
|
61
|
+
exit
|
62
|
+
end
|
63
|
+
|
64
|
+
prompt = TTY::Prompt.new
|
65
|
+
choices = ["1. SOULs GraphQL API", "2. SOULs Pub/Sub Worker", "3. SOULs Frontend Web"]
|
66
|
+
choice_num = prompt.select(Paint["Select Strain: ", :cyan], choices)[0].to_i
|
67
|
+
case choice_num
|
68
|
+
when 1, 2
|
69
|
+
service_name = (strains[choice_num.to_i - 1]).to_s
|
70
|
+
Souls::Init.download_souls(app_name: app_name, service_name: service_name)
|
71
|
+
Souls::Init.mother_config_init(app_name: app_name)
|
72
|
+
Souls::Init.initial_config_init(app_name: app_name, service_name: service_name)
|
73
|
+
else
|
74
|
+
puts(Paint["Coming Soon...", :blue])
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
30
78
|
def self.download_souls(app_name: "souls", service_name: "api")
|
31
79
|
version = Souls.get_latest_version_txt(service_name: service_name).join(".")
|
32
80
|
file_name = "#{service_name}-v#{version}.tgz"
|
33
81
|
url = "https://storage.googleapis.com/souls-bucket/boilerplates/#{service_name.pluralize}/#{file_name}"
|
34
82
|
system("curl -OL #{url}")
|
35
|
-
system("mkdir -p #{app_name}/#{service_name}")
|
36
|
-
system("tar -zxvf ./#{file_name} -C #{app_name}/")
|
83
|
+
system("mkdir -p #{app_name}/apps/#{service_name}")
|
84
|
+
system("tar -zxvf ./#{file_name} -C #{app_name}/apps/")
|
37
85
|
FileUtils.rm(file_name)
|
38
86
|
line = Paint["====================================", :yellow]
|
39
87
|
puts("\n")
|
@@ -59,8 +107,54 @@ module Souls
|
|
59
107
|
puts(line)
|
60
108
|
endroll = <<~TEXT
|
61
109
|
Easy to Run
|
62
|
-
$ cd #{app_name}/#{service_name}
|
110
|
+
$ cd #{app_name}/apps/#{service_name}
|
111
|
+
$ bundle
|
112
|
+
$ souls s
|
113
|
+
Go To : http://localhost:4000
|
114
|
+
|
115
|
+
Doc: https://souls.elsoul.nl
|
116
|
+
TEXT
|
117
|
+
cd = Paint[endroll, :white]
|
118
|
+
puts(cd)
|
119
|
+
puts(line)
|
120
|
+
end
|
121
|
+
|
122
|
+
def self.download_worker
|
123
|
+
current_dir_name = FileUtils.pwd.to_s.match(%r{/([^/]+)/?$})[1]
|
124
|
+
version = Souls.get_latest_version_txt(service_name: "worker").join(".")
|
125
|
+
file_name = "worker-v#{version}.tgz"
|
126
|
+
url = "https://storage.googleapis.com/souls-bucket/boilerplates/workers/#{file_name}"
|
127
|
+
system("curl -OL #{url}")
|
128
|
+
system("mkdir -p ./apps/worker")
|
129
|
+
system("tar -zxvf ./#{file_name} -C ./apps/")
|
130
|
+
FileUtils.rm(file_name)
|
131
|
+
line = Paint["====================================", :yellow]
|
132
|
+
puts("\n")
|
133
|
+
puts(line)
|
134
|
+
txt2 = <<~TEXT
|
135
|
+
_____ ____ __ ____#{' '}
|
136
|
+
/ ___// __ \\/ / / / / %{red1}
|
137
|
+
\\__ \\/ / / / / / / / %{red2}
|
138
|
+
___/ / /_/ / /_/ / /___%{red3}#{' '}
|
139
|
+
/____/\\____/\\____/_____%{red4}#{' '}
|
140
|
+
TEXT
|
141
|
+
red1 = ["_____", :red]
|
142
|
+
red2 = ["/ ___/", :red]
|
143
|
+
red3 = ["(__ )", :red]
|
144
|
+
red4 = ["/____/", :red]
|
145
|
+
ms = Paint % [txt2, :cyan, { red1: red1, red2: red2, red3: red3, red4: red4 }]
|
146
|
+
puts(ms)
|
147
|
+
puts(line)
|
148
|
+
welcome = Paint["SOULs Worker Activated!", :white]
|
149
|
+
puts(welcome)
|
150
|
+
souls_ver = Paint["SOULs Version: #{Souls::VERSION}", :white]
|
151
|
+
puts(souls_ver)
|
152
|
+
puts(line)
|
153
|
+
endroll = <<~TEXT
|
154
|
+
Easy to Run
|
155
|
+
$ cd ./apps/worker
|
63
156
|
$ bundle
|
157
|
+
$ souls model:update
|
64
158
|
$ souls s
|
65
159
|
Go To : http://localhost:3000
|
66
160
|
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.24
|
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.24
|
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.25.
|
4
|
+
version: 0.25.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
@@ -10,8 +10,36 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-08-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: activesupport
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - '='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 6.1.4
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - '='
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: 6.1.4
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: dotenv
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 2.7.6
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - '='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 2.7.6
|
15
43
|
- !ruby/object:Gem::Dependency
|
16
44
|
name: paint
|
17
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -55,9 +83,10 @@ dependencies:
|
|
55
83
|
- !ruby/object:Gem::Version
|
56
84
|
version: 0.3.0
|
57
85
|
description: |-
|
58
|
-
SOULs is a Serverless Application Framework.
|
59
|
-
SOULs has
|
60
|
-
SOULs
|
86
|
+
SOULs is a Serverless Application Framework with Ruby GraphQL.
|
87
|
+
SOULs has 3 strains, API, Worker, and Frontend. It can be used in combination according to the purpose.
|
88
|
+
SOULs Ruby GraphQL API / Worker and Easy to deploy to Google Cloud. No more routing for Backends!
|
89
|
+
You can focus on your business logic.
|
61
90
|
email:
|
62
91
|
- f.kawasaki@elsoul.nl
|
63
92
|
- s.kishi@elsoul.nl
|
@@ -123,8 +152,8 @@ requirements: []
|
|
123
152
|
rubygems_version: 3.2.22
|
124
153
|
signing_key:
|
125
154
|
specification_version: 4
|
126
|
-
summary: SOULs is a Serverless Application Framework. SOULs has
|
127
|
-
|
128
|
-
|
129
|
-
|
155
|
+
summary: SOULs is a Serverless Application Framework with Ruby GraphQL. SOULs has
|
156
|
+
3 strains, API, Worker, and Frontend. It can be used in combination according to
|
157
|
+
the purpose. SOULs Ruby GraphQL API / Worker and Easy to deploy to Google Cloud.
|
158
|
+
No more routing for Backends! You can focus on your business logic.
|
130
159
|
test_files: []
|