souls 0.15.6 → 0.15.7
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/Gemfile.lock +1 -1
- data/README.md +55 -26
- data/exe/souls +5 -3
- data/lib/souls/generate.rb +3 -3
- data/lib/souls/init.rb +2 -1
- data/lib/souls/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abe6a8a19db79936b013516a4d13714d8b5f40dbd1936b3348c84954b3464f46
|
4
|
+
data.tar.gz: 79b82ca41a79fdfcd56794b3bb329a905abfdac0fcecc5075973a53700b5a9c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53e0e8479c8e0d935f55a5119ebc1af3f61b0ac40476dd36e291196c69bc025822eaa37213ef6ecdfcba182c163ecb3d1e2b76e1c6af497b3823c0f3e77b8115
|
7
|
+
data.tar.gz: b6216fca804c81d140712a9ee7c01c926d034a10c5d84d3990e83491bb0fbea2d8ab7896465b4267bfa4edf4f2330b109376d6a6125e6a749ef660c419ebb3a6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -21,14 +21,18 @@
|
|
21
21
|
|
22
22
|
Welcome to SOULs Framework!
|
23
23
|
|
24
|
-
SOULS is a Web Application Framework
|
24
|
+
SOULS is a Web Application Framework based on GraphQL Relay ( Ruby )
|
25
|
+
This is Cloud Based APP Framework. Easy Deployment.
|
26
|
+
Microservices on Multi Cloud Platform such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud. Auto deploy with scalable condition.
|
27
|
+
You can focus on business logic. No more infra problems.
|
25
28
|
|
26
|
-
SOULs creates
|
29
|
+
SOULs creates 5 types of framework.
|
27
30
|
|
28
|
-
1.
|
29
|
-
2. API - GraphQL to call gRPC (Ruby)
|
30
|
-
3.
|
31
|
-
4.
|
31
|
+
1. API - GraphQL (Ruby) - Simple API
|
32
|
+
2. API - GraphQL to call gRPC (Ruby) - for heavy task processes
|
33
|
+
3. Service - gRPC Serverless Scalable Service (Ruby)
|
34
|
+
4. Media Web Client - Media web client with SSG (TypeScript)
|
35
|
+
5. Admin Web Client - Admin Console and CMS (TypeScript)
|
32
36
|
|
33
37
|
## Dependency
|
34
38
|
|
@@ -66,42 +70,67 @@ And Create Your APP
|
|
66
70
|
|
67
71
|
### Choose SOULs Type:
|
68
72
|
|
69
|
-
1.
|
70
|
-
2. API
|
71
|
-
3.
|
72
|
-
4.
|
73
|
+
1. API
|
74
|
+
2. API - gRPC
|
75
|
+
3. Service
|
76
|
+
4. Media Web
|
77
|
+
5. Admin Web
|
73
78
|
|
74
|
-
## Usage
|
79
|
+
## Usage - 1. GraphQL API
|
75
80
|
|
76
|
-
|
81
|
+
```bash
|
82
|
+
# Version Check
|
83
|
+
$ souls -v
|
77
84
|
|
78
|
-
|
85
|
+
# Init SOULs App
|
86
|
+
$ souls new app_name
|
87
|
+
$ cd app_name
|
88
|
+
$ bundle
|
79
89
|
|
80
|
-
|
90
|
+
# Run Dev & Test DB
|
91
|
+
$ souls i run_psql
|
81
92
|
|
82
|
-
|
93
|
+
# Create DB
|
94
|
+
$ souls db:create
|
83
95
|
|
84
|
-
|
96
|
+
# Migrate DB
|
97
|
+
$ souls db:migrate
|
85
98
|
|
86
|
-
|
99
|
+
# Create Test DB
|
100
|
+
$ souls db:seed
|
87
101
|
|
88
|
-
|
102
|
+
# Development (localhost:3000/playground)
|
103
|
+
$ souls s
|
89
104
|
|
90
|
-
|
105
|
+
# Development with Worker (localhost:3000/playground; localhost:3000/sidekiq)
|
106
|
+
$ foreman start -f Procfile.dev
|
91
107
|
|
92
|
-
|
108
|
+
# Test
|
109
|
+
$ bundle exec rspec
|
93
110
|
|
94
|
-
|
111
|
+
# Deploy (Edit: ./cloudbuild.yml)
|
112
|
+
$ souls deploy
|
95
113
|
|
96
|
-
|
114
|
+
# Run Infra Command
|
115
|
+
$ souls i `method_name`
|
116
|
+
```
|
117
|
+
|
118
|
+
## SOULs Scaffold
|
119
|
+
SOULs Scaffold creates CRUD API from `./db/schema.rb`
|
97
120
|
|
98
|
-
|
121
|
+
```bash
|
122
|
+
# Create migration file
|
123
|
+
$ souls g migration user
|
99
124
|
|
100
|
-
|
125
|
+
# Edit migration file
|
126
|
+
# Migrate DB
|
127
|
+
$ souls db:migrate
|
128
|
+
|
129
|
+
# SOULs Scaffold
|
130
|
+
$ souls g migrate user
|
131
|
+
```
|
101
132
|
|
102
|
-
Update
|
103
133
|
|
104
|
-
$ souls i update
|
105
134
|
|
106
135
|
## Development
|
107
136
|
|
data/exe/souls
CHANGED
@@ -13,9 +13,9 @@ begin
|
|
13
13
|
puts "you need to specify your app name \n `souls new app_name`"
|
14
14
|
exit
|
15
15
|
end
|
16
|
-
puts "Which framework: \n 1.
|
16
|
+
puts "Which framework: \n 1. SOULs GraphQL API \n 2. SOULs GraphQL API gRPC compatible \n 3. SOULs gRPC Service \n 4. SOULs Media Web \n 5. SOULs Admin Web \n Enter Number: "
|
17
17
|
strain = STDIN.gets.chomp.to_i
|
18
|
-
(1..5).include?(strain) ? puts("Generating
|
18
|
+
(1..5).include?(strain) ? puts("Generating SOULs.. \n") : raise(StandardError, "Choose Number 1..5")
|
19
19
|
Souls::Init.create_souls strain: strain, app_name: ARGV[1]
|
20
20
|
when "s", "server"
|
21
21
|
strain = Souls.configuration.strain
|
@@ -25,7 +25,7 @@ begin
|
|
25
25
|
when "service"
|
26
26
|
system "bundle exec rake run_server"
|
27
27
|
else
|
28
|
-
`
|
28
|
+
`bundle exec puma -p 3000 -e development`
|
29
29
|
end
|
30
30
|
when "c", "console"
|
31
31
|
strain = Souls.configuration.strain
|
@@ -86,6 +86,8 @@ begin
|
|
86
86
|
STDOUT.write `rake db:create && rake db:create RACK_ENV=test`
|
87
87
|
when "db:migrate"
|
88
88
|
STDOUT.write `rake db:migrate && rake db:migrate RACK_ENV=test`
|
89
|
+
when "db:seed"
|
90
|
+
STDOUT.write `rake db:seed`
|
89
91
|
when "db:migrate:reset"
|
90
92
|
STDOUT.write `rake db:migrate:reset && rake db:migrate:reset RACK_ENV=test`
|
91
93
|
when "t", "test"
|
data/lib/souls/generate.rb
CHANGED
@@ -18,7 +18,7 @@ module Souls
|
|
18
18
|
def resolver class_name: "souls"
|
19
19
|
FileUtils.mkdir_p "./app/graphql/resolvers" unless Dir.exist? "./app/graphql/resolvers"
|
20
20
|
file_path = "./app/graphql/resolvers/#{class_name.singularize}_search.rb"
|
21
|
-
return ["
|
21
|
+
return ["Resolver already exist! #{file_path}"] if File.exist? file_path
|
22
22
|
File.open(file_path, "w") do |f|
|
23
23
|
f.write <<~EOS
|
24
24
|
module Resolvers
|
@@ -80,7 +80,7 @@ module Souls
|
|
80
80
|
|
81
81
|
def job class_name: "send_mail"
|
82
82
|
file_path = "./app/jobs/#{class_name.singularize}_job.rb"
|
83
|
-
return ["
|
83
|
+
return ["Job already exist! #{file_path}"] if File.exist? file_path
|
84
84
|
File.open(file_path, "w") do |f|
|
85
85
|
f.write <<~EOS
|
86
86
|
class #{class_name.camelize}
|
@@ -273,7 +273,7 @@ end
|
|
273
273
|
def rspec_resolver class_name: "souls"
|
274
274
|
singularized_class_name = class_name.singularize
|
275
275
|
file_path = "#{Dir.pwd}/spec/resolvers/#{singularized_class_name}_search_spec.rb"
|
276
|
-
return ["
|
276
|
+
return ["Resolver already exist! #{file_path}"] if File.exist? file_path
|
277
277
|
rspec_resolver_head class_name: singularized_class_name
|
278
278
|
rspec_resolver_after_head class_name: singularized_class_name
|
279
279
|
rspec_resolver_params class_name: singularized_class_name
|
data/lib/souls/init.rb
CHANGED
@@ -724,7 +724,8 @@ module Souls
|
|
724
724
|
end
|
725
725
|
|
726
726
|
def rspec_factory class_name: "souls"
|
727
|
-
|
727
|
+
file_path = "./spec/factories/#{class_name.pluralize}.rb"
|
728
|
+
return ["Factory aleady exist! #{file_path}"] if File.exist? file_path
|
728
729
|
singularized_class_name = class_name.singularize
|
729
730
|
rspec_factory_head class_name: singularized_class_name
|
730
731
|
rspec_factory_params class_name: singularized_class_name
|
data/lib/souls/version.rb
CHANGED