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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 822cc3c17c118abe445b06166b676238c722060af7379ba7620ac7e38603810f
4
- data.tar.gz: 84923f26838b78d83c79c50d4703c6a19f6c49c1bc9048345332286813d2e178
3
+ metadata.gz: abe6a8a19db79936b013516a4d13714d8b5f40dbd1936b3348c84954b3464f46
4
+ data.tar.gz: 79b82ca41a79fdfcd56794b3bb329a905abfdac0fcecc5075973a53700b5a9c9
5
5
  SHA512:
6
- metadata.gz: 077a258b9306c9b53bf17ca7d2d969f18369c43ce39c01d29dc1db7befc3d5cbf9fa8d0a69946b9fe242cfe4bba6d1e3c5627329741ec91fe5408fe4191e4446
7
- data.tar.gz: c9265785646fe4bed96d999d21c75042be26e72f97cffaf2bade4427c084dd55e3453b2593dfcf2a0ce0c227b233b13f6937567729e03187216a3d1451ffae67
6
+ metadata.gz: 53e0e8479c8e0d935f55a5119ebc1af3f61b0ac40476dd36e291196c69bc025822eaa37213ef6ecdfcba182c163ecb3d1e2b76e1c6af497b3823c0f3e77b8115
7
+ data.tar.gz: b6216fca804c81d140712a9ee7c01c926d034a10c5d84d3990e83491bb0fbea2d8ab7896465b4267bfa4edf4f2330b109376d6a6125e6a749ef660c419ebb3a6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- souls (0.15.5)
4
+ souls (0.15.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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 for Microservices on Multi Cloud Platform such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud. Auto deploy with scalable condition. You can focus on business logic. No more infra problems.
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 4 types of framework.
29
+ SOULs creates 5 types of framework.
27
30
 
28
- 1. Service - gRPC Serverless Scalable Service (Ruby)
29
- 2. API - GraphQL to call gRPC (Ruby)
30
- 3. Media Web Client - Media web client with SSG (TypeScript)
31
- 4. Admin Web Client - Admin Console and CMS (TypeScript)
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. Service
70
- 2. API
71
- 3. Media Web
72
- 4. Admin Web
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
- Version Check
81
+ ```bash
82
+ # Version Check
83
+ $ souls -v
77
84
 
78
- $ souls -v
85
+ # Init SOULs App
86
+ $ souls new app_name
87
+ $ cd app_name
88
+ $ bundle
79
89
 
80
- Init Proto Files
90
+ # Run Dev & Test DB
91
+ $ souls i run_psql
81
92
 
82
- $ souls p `service_name`
93
+ # Create DB
94
+ $ souls db:create
83
95
 
84
- Run Server
96
+ # Migrate DB
97
+ $ souls db:migrate
85
98
 
86
- $ souls s
99
+ # Create Test DB
100
+ $ souls db:seed
87
101
 
88
- Run Console
102
+ # Development (localhost:3000/playground)
103
+ $ souls s
89
104
 
90
- $ souls c
105
+ # Development with Worker (localhost:3000/playground; localhost:3000/sidekiq)
106
+ $ foreman start -f Procfile.dev
91
107
 
92
- Run Infra Command
108
+ # Test
109
+ $ bundle exec rspec
93
110
 
94
- $ souls i `method_name`
111
+ # Deploy (Edit: ./cloudbuild.yml)
112
+ $ souls deploy
95
113
 
96
- Deploy
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
- $ souls i deploy
121
+ ```bash
122
+ # Create migration file
123
+ $ souls g migration user
99
124
 
100
- ※Only Initial
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. 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: "
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 Souls.. \n") : raise(StandardError, "Choose Number 1..5")
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
- `foreman start -f Procfile.dev`
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"
@@ -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 ["Aleady Exist!"] if File.exist? file_path
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 ["Aleady Exist!"] if File.exist? file_path
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 ["Aleady Exist!"] if File.exist? file_path
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
- return ["Aleady Exist!"] if File.exist? "./spec/factories/#{class_name.singularize}"
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
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.15.6"
2
+ VERSION = "0.15.7"
3
3
  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.15.6
4
+ version: 0.15.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI