souls 0.25.18 → 0.26.0

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: b37b1bd07ccc1f56e0d2bec995d2e0a25870c5b2fae39ccba829fb714250c658
4
- data.tar.gz: 4e09f36c6d09ab3573b2f3eed08ef0b7d5a485ad87e36cc8c3045a925965145b
3
+ metadata.gz: 53b12fe41c4ed0d76359fccefd90562f3cf1d5ebd48fc895e8ace40afdb9ec2a
4
+ data.tar.gz: eea44ac9ec2f66e4fe0be017e5761d7759bffe844ccb8e2fe076ab6b682bdf65
5
5
  SHA512:
6
- metadata.gz: f28323d5e145c0171eb127c9078e7057dc2c76a075b394a89bac3a7a1a829fb82fa2b9deb44d1d921890d175b3eeb31a999910d3a9a42ca9ed41f4233d68ac85
7
- data.tar.gz: e573f692123e85db8ac9d5ccaa8b561375d05623d1d432982546af51e6f4513e5a0b9ef974a476dac5fbb2e26dc1c844c02f9f7590cab29998e7390b46db323e
6
+ metadata.gz: f89e80dc47bf46d2cca6f09d233de9753068bb11126a3ad0c6366e42655f6911b3b7d128496eda597662bd88cecc0cf60807b3790a3a58551ef72980de9c1e40
7
+ data.tar.gz: d07b9fb9ae212a018650b6d0e33964467fb7a8830c23bd4bbf6389ce5179d236ed7939b9893b7eb2fdc3e5de657bdd6a7535a82afb3e8fb3689d49ad6ee19af6
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 six strains, API, Worker, Console, Admin, Media, Doc, and 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!
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
26
  You can focus on your business logic.
27
27
 
28
28
  ![画像](https://storage.googleapis.com/souls-bucket/imgs/souls-structure.jpg)
29
29
 
30
- SOULs creates 6 types of framework.
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. Console Web Client - User Console and CMS (TypeScript)
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 Console Web
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
- STRAINS = %w[api worker console admin media doc].freeze
13
- app_name = ARGV[1]
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["Generated SOULs CRUD Files☻", :yellow]
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)
@@ -53,6 +53,8 @@ module Souls
53
53
  when "update"
54
54
  Souls::Generate.update_delete(class_name: class_name)
55
55
  Souls::Generate.migrate(class_name: class_name)
56
+ when "worker"
57
+ Souls::Init.download_worker
56
58
  else
57
59
  "SOULs!"
58
60
  end
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
- FileUtils.touch("./#{app_name}/#{service_name}/config/souls.rb")
14
- file_path = "./#{app_name}/#{service_name}/config/souls.rb"
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-api"
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,68 @@ module Souls
27
29
  puts(e)
28
30
  end
29
31
 
32
+ def self.download_github_actions
33
+ file_name = "github.tgz"
34
+ url = "https://storage.googleapis.com/souls-bucket/github_actions/github.tgz"
35
+ system("curl -OL #{url}")
36
+ FileUtils.mkdir("github")
37
+ system("tar -zxvf ./#{file_name} -C #{file_name}/")
38
+ FileUtils.rm(file_name)
39
+ end
40
+
41
+ def self.mother_config_init(app_name: "souls-app")
42
+ config_dir = "./#{app_name}/config"
43
+ FileUtils.mkdir_p(config_dir) unless Dir.exist?(config_dir)
44
+ FileUtils.touch("#{config_dir}/souls.rb")
45
+ file_path = "#{config_dir}/souls.rb"
46
+ File.open(file_path, "w") do |f|
47
+ f.write(<<~TEXT)
48
+ Souls.configure do |config|
49
+ config.app = "#{app_name}"
50
+ config.project_id = "souls-app"
51
+ config.strain = "mother"
52
+ config.api = true
53
+ config.worker = false
54
+ config.frontend = false
55
+ config.worker_endpoint = ""
56
+ config.fixed_gems = ["excluded_gem"]
57
+ end
58
+ TEXT
59
+ end
60
+ rescue StandardError => e
61
+ puts(e)
62
+ end
63
+
64
+ def self.return_method(args)
65
+ strains = %w[api worker console admin media doc].freeze
66
+ app_name = args[1]
67
+ if app_name.nil?
68
+ puts(Paint["you need to specify your app name", :red])
69
+ puts(Paint["`souls new souls-app`", :yellow])
70
+ exit
71
+ end
72
+
73
+ prompt = TTY::Prompt.new
74
+ choices = ["1. SOULs GraphQL API", "2. SOULs Pub/Sub Worker", "3. SOULs Frontend Web"]
75
+ choice_num = prompt.select(Paint["Select Strain: ", :cyan], choices)[0].to_i
76
+ case choice_num
77
+ when 1, 2
78
+ service_name = (strains[choice_num.to_i - 1]).to_s
79
+ Souls::Init.download_souls(app_name: app_name, service_name: service_name)
80
+ Souls::Init.mother_config_init(app_name: app_name)
81
+ Souls::Init.initial_config_init(app_name: app_name, service_name: service_name)
82
+ else
83
+ puts(Paint["Coming Soon...", :blue])
84
+ end
85
+ end
86
+
30
87
  def self.download_souls(app_name: "souls", service_name: "api")
31
88
  version = Souls.get_latest_version_txt(service_name: service_name).join(".")
32
89
  file_name = "#{service_name}-v#{version}.tgz"
33
90
  url = "https://storage.googleapis.com/souls-bucket/boilerplates/#{service_name.pluralize}/#{file_name}"
34
91
  system("curl -OL #{url}")
35
- system("mkdir -p #{app_name}/#{service_name}")
36
- system("tar -zxvf ./#{file_name} -C #{app_name}/")
92
+ system("mkdir -p #{app_name}/apps/#{service_name}")
93
+ system("tar -zxvf ./#{file_name} -C #{app_name}/apps/")
37
94
  FileUtils.rm(file_name)
38
95
  line = Paint["====================================", :yellow]
39
96
  puts("\n")
@@ -59,8 +116,54 @@ module Souls
59
116
  puts(line)
60
117
  endroll = <<~TEXT
61
118
  Easy to Run
62
- $ cd #{app_name}/#{service_name}
119
+ $ cd #{app_name}/apps/#{service_name}
120
+ $ bundle
121
+ $ souls s
122
+ Go To : http://localhost:4000
123
+
124
+ Doc: https://souls.elsoul.nl
125
+ TEXT
126
+ cd = Paint[endroll, :white]
127
+ puts(cd)
128
+ puts(line)
129
+ end
130
+
131
+ def self.download_worker
132
+ current_dir_name = FileUtils.pwd.to_s.match(%r{/([^/]+)/?$})[1]
133
+ version = Souls.get_latest_version_txt(service_name: "worker").join(".")
134
+ file_name = "worker-v#{version}.tgz"
135
+ url = "https://storage.googleapis.com/souls-bucket/boilerplates/workers/#{file_name}"
136
+ system("curl -OL #{url}")
137
+ system("mkdir -p ./apps/worker")
138
+ system("tar -zxvf ./#{file_name} -C ./apps/")
139
+ FileUtils.rm(file_name)
140
+ line = Paint["====================================", :yellow]
141
+ puts("\n")
142
+ puts(line)
143
+ txt2 = <<~TEXT
144
+ _____ ____ __ ____#{' '}
145
+ / ___// __ \\/ / / / / %{red1}
146
+ \\__ \\/ / / / / / / / %{red2}
147
+ ___/ / /_/ / /_/ / /___%{red3}#{' '}
148
+ /____/\\____/\\____/_____%{red4}#{' '}
149
+ TEXT
150
+ red1 = ["_____", :red]
151
+ red2 = ["/ ___/", :red]
152
+ red3 = ["(__ )", :red]
153
+ red4 = ["/____/", :red]
154
+ ms = Paint % [txt2, :cyan, { red1: red1, red2: red2, red3: red3, red4: red4 }]
155
+ puts(ms)
156
+ puts(line)
157
+ welcome = Paint["SOULs Worker Activated!", :white]
158
+ puts(welcome)
159
+ souls_ver = Paint["SOULs Version: #{Souls::VERSION}", :white]
160
+ puts(souls_ver)
161
+ puts(line)
162
+ endroll = <<~TEXT
163
+ Easy to Run
164
+ $ cd ./apps/worker
63
165
  $ bundle
166
+ $ souls model:update
64
167
  $ souls s
65
168
  Go To : http://localhost:3000
66
169
 
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.25.18".freeze
2
+ VERSION = "0.26.0".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.4.21
1
+ 0.5.0
@@ -1 +1 @@
1
- 0.4.21
1
+ 0.5.0
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.18
4
+ version: 0.26.0
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-07-28 00:00:00.000000000 Z
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
@@ -56,9 +84,9 @@ dependencies:
56
84
  version: 0.3.0
57
85
  description: |-
58
86
  SOULs is a Serverless Application Framework with Ruby GraphQL.
59
- SOULs has six strains, API, Worker, Frontend, and can be used in combination according to the purpose.
60
- SOULs Ruby GraphQL API / Worker and Easy to deploy to Google Cloud. No more routing for Backends!
61
- You can focus on your business logic.
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.
62
90
  email:
63
91
  - f.kawasaki@elsoul.nl
64
92
  - s.kishi@elsoul.nl
@@ -125,7 +153,7 @@ rubygems_version: 3.2.22
125
153
  signing_key:
126
154
  specification_version: 4
127
155
  summary: SOULs is a Serverless Application Framework with Ruby GraphQL. SOULs has
128
- six strains, API, Worker, Frontend, and can be used in combination according to
156
+ 3 strains, API, Worker, and Frontend. It can be used in combination according to
129
157
  the purpose. SOULs Ruby GraphQL API / Worker and Easy to deploy to Google Cloud.
130
158
  No more routing for Backends! You can focus on your business logic.
131
159
  test_files: []