souls 0.16.2 → 0.16.3
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/.irbrc +1 -0
- data/Gemfile.lock +7 -7
- data/README.md +2 -64
- data/exe/souls +3 -1
- data/lib/souls.rb +1 -1
- data/lib/souls/generate.rb +20 -0
- data/lib/souls/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95c7d5667fa4486a23b0feb0cd5f394baaf90940b9926afde3ac6f28aecff6d9
|
4
|
+
data.tar.gz: cc1486ff2c54dc5050e1f190fa0dd7ddac28db4f3c1e849013aee46d6a8ee686
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cb1991fa03238cc123023aed9e147b97f978138cb1f3bd0560fa652dabe4af39379e22f38fea51d5de17817eadb5e050309fec5c4d5acbd14801a828ed981bc
|
7
|
+
data.tar.gz: 70284bcb318f210b8b1010d03c70c65e13b966dd25b0801e531a68e4f18674b37eb41bb9ff9f9e2e83f09be76f72fb578c41da790d0c3ee9284225571c53e16b
|
data/.irbrc
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
require "./lib/souls"
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
souls (0.16.
|
4
|
+
souls (0.16.3)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -19,13 +19,13 @@ GEM
|
|
19
19
|
concurrent-ruby (1.1.8)
|
20
20
|
diff-lcs (1.4.4)
|
21
21
|
ffi (1.14.2)
|
22
|
-
i18n (1.8.
|
22
|
+
i18n (1.8.9)
|
23
23
|
concurrent-ruby (~> 1.0)
|
24
24
|
language_server-protocol (3.15.0.1)
|
25
25
|
listen (3.4.1)
|
26
26
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
27
27
|
rb-inotify (~> 0.9, >= 0.9.10)
|
28
|
-
minitest (5.14.
|
28
|
+
minitest (5.14.4)
|
29
29
|
parallel (1.20.1)
|
30
30
|
parser (2.7.2.0)
|
31
31
|
ast (~> 2.4.1)
|
@@ -34,8 +34,8 @@ GEM
|
|
34
34
|
rb-fsevent (0.10.4)
|
35
35
|
rb-inotify (0.10.1)
|
36
36
|
ffi (~> 1.0)
|
37
|
-
rbs (1.0.
|
38
|
-
regexp_parser (2.
|
37
|
+
rbs (1.0.6)
|
38
|
+
regexp_parser (2.1.1)
|
39
39
|
rexml (3.2.4)
|
40
40
|
rspec (3.1.0)
|
41
41
|
rspec-core (~> 3.1.0)
|
@@ -76,7 +76,7 @@ GEM
|
|
76
76
|
zeitwerk (2.4.2)
|
77
77
|
|
78
78
|
PLATFORMS
|
79
|
-
|
79
|
+
x86_64-darwin-20
|
80
80
|
|
81
81
|
DEPENDENCIES
|
82
82
|
activesupport (= 6.1.0)
|
@@ -87,4 +87,4 @@ DEPENDENCIES
|
|
87
87
|
steep (= 0.39.0)
|
88
88
|
|
89
89
|
BUNDLED WITH
|
90
|
-
2.2.
|
90
|
+
2.2.11
|
data/README.md
CHANGED
@@ -76,72 +76,10 @@ And Create Your APP
|
|
76
76
|
4. Media Web
|
77
77
|
5. Admin Web
|
78
78
|
|
79
|
-
## Usage - 1. GraphQL API
|
80
79
|
|
81
|
-
|
82
|
-
# Ruby version (using rbenv)
|
83
|
-
$ ruby -v
|
84
|
-
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]
|
80
|
+
## SOULs Document
|
85
81
|
|
86
|
-
|
87
|
-
$ xcode-select --install
|
88
|
-
|
89
|
-
# Install PostgreSQL (Mac env)
|
90
|
-
$ brew install postgresql
|
91
|
-
|
92
|
-
# Install redis
|
93
|
-
$ brew install redis
|
94
|
-
|
95
|
-
# Version Check
|
96
|
-
$ souls -v
|
97
|
-
|
98
|
-
# Init SOULs App
|
99
|
-
$ souls new app_name
|
100
|
-
$ cd app_name
|
101
|
-
$ bundle
|
102
|
-
|
103
|
-
# Run Dev & Test DB
|
104
|
-
$ souls i run_psql
|
105
|
-
|
106
|
-
# Create DB
|
107
|
-
$ souls db:create
|
108
|
-
|
109
|
-
# Migrate DB
|
110
|
-
$ souls db:migrate
|
111
|
-
|
112
|
-
# Create Test DB
|
113
|
-
$ souls db:seed
|
114
|
-
|
115
|
-
# Development (localhost:3000/playground)
|
116
|
-
$ souls s
|
117
|
-
|
118
|
-
# Development with Worker (localhost:3000/playground; localhost:3000/sidekiq)
|
119
|
-
$ foreman start -f Procfile.dev
|
120
|
-
|
121
|
-
# Test
|
122
|
-
$ bundle exec rspec
|
123
|
-
|
124
|
-
# Deploy (Edit: ./cloudbuild.yml)
|
125
|
-
$ souls deploy
|
126
|
-
|
127
|
-
# Run Infra Command
|
128
|
-
$ souls i `method_name`
|
129
|
-
```
|
130
|
-
|
131
|
-
## SOULs Scaffold
|
132
|
-
SOULs Scaffold creates CRUD API from `./db/schema.rb`
|
133
|
-
|
134
|
-
```bash
|
135
|
-
# Create migration file
|
136
|
-
$ souls g migration user
|
137
|
-
|
138
|
-
# Edit migration file
|
139
|
-
# Migrate DB
|
140
|
-
$ souls db:migrate
|
141
|
-
|
142
|
-
# SOULs Scaffold
|
143
|
-
$ souls g migrate user
|
144
|
-
```
|
82
|
+
- [SOULs Document](https://elsoul.github.io/souls_doc/)
|
145
83
|
|
146
84
|
|
147
85
|
|
data/exe/souls
CHANGED
@@ -82,6 +82,8 @@ begin
|
|
82
82
|
else
|
83
83
|
"SOULs!"
|
84
84
|
end
|
85
|
+
when "d"
|
86
|
+
Souls::Init.delete_all class_name: ARGV[1]
|
85
87
|
when "db:create"
|
86
88
|
system "rake db:create && rake db:create RACK_ENV=test"
|
87
89
|
when "db:migrate"
|
@@ -91,7 +93,7 @@ begin
|
|
91
93
|
when "db:migrate:reset"
|
92
94
|
system "rake db:migrate:reset && rake db:migrate:reset RACK_ENV=test"
|
93
95
|
when "t", "test"
|
94
|
-
system "rubocop"
|
96
|
+
system "rubocop -a"
|
95
97
|
system "bundle exec rspec"
|
96
98
|
when "run"
|
97
99
|
system "docker build . -t souls:latest"
|
data/lib/souls.rb
CHANGED
data/lib/souls/generate.rb
CHANGED
@@ -280,6 +280,26 @@ end
|
|
280
280
|
rspec_resolver_params class_name: singularized_class_name
|
281
281
|
rspec_resolver_end class_name: singularized_class_name
|
282
282
|
end
|
283
|
+
|
284
|
+
def delete_all class_name: "souls"
|
285
|
+
singularized_class_name = class_name.singularize.underscore
|
286
|
+
pluralized_class_name = class_name.pluralize.underscore
|
287
|
+
FileUtils.rm "./app/models/#{singularized_class_name}.rb"
|
288
|
+
FileUtils.rm_rf "./app/graphql/mutations/#{singularized_class_name}"
|
289
|
+
FileUtils.rm "./app/graphql/queries/#{singularized_class_name}.rb"
|
290
|
+
FileUtils.rm "./app/graphql/queries/#{pluralized_class_name}.rb"
|
291
|
+
FileUtils.rm "./app/graphql/resolvers/#{singularized_class_name}_search.rb"
|
292
|
+
FileUtils.rm "./app/graphql/types/#{singularized_class_name}_type.rb"
|
293
|
+
FileUtils.rm "./app/graphql/types/#{singularized_class_name}_node_type.rb"
|
294
|
+
FileUtils.rm "./spec/factories/#{pluralized_class_name}.rb"
|
295
|
+
FileUtils.rm "./spec/mutations/#{singularized_class_name}_spec.rb"
|
296
|
+
FileUtils.rm "./spec/models/#{singularized_class_name}_spec.rb"
|
297
|
+
FileUtils.rm "./spec/queries/#{singularized_class_name}_spec.rb"
|
298
|
+
FileUtils.rm "./spec/resolvers/#{singularized_class_name}_search_spec.rb"
|
299
|
+
puts "deleted #{class_name.camelize} CRUD!"
|
300
|
+
rescue StandardError => error
|
301
|
+
puts error
|
302
|
+
end
|
283
303
|
end
|
284
304
|
end
|
285
305
|
end
|
data/lib/souls/version.rb
CHANGED
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.16.
|
4
|
+
version: 0.16.3
|
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-
|
13
|
+
date: 2021-03-01 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: SOULS is a Web Application Framework for Microservices on Multi Cloud
|
16
16
|
Platform such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud.
|