souls 0.23.9 → 0.24.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/README.md +34 -5
- data/exe/souls +0 -2
- data/lib/souls.rb +126 -138
- data/lib/souls/gcloud/iam.rb +30 -16
- data/lib/souls/init.rb +1 -16
- data/lib/souls/version.rb +1 -1
- metadata +2 -18
- data/.gitignore +0 -15
- data/.irbrc +0 -2
- data/.rspec +0 -3
- data/.rubocop.yml +0 -152
- data/.ruby-version +0 -1
- data/.travis.yml +0 -6
- data/Gemfile +0 -13
- data/Gemfile.lock +0 -98
- data/Rakefile +0 -23
- data/Steepfile +0 -8
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/config/souls.rb +0 -5
- data/db/schema.rb +0 -67
- data/rbs/init.rbs +0 -2
- data/souls.gemspec +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba7f71524ac605ce72fcb622c1c00d0ff27efaf802ffe77fb1f480fa1473b324
|
4
|
+
data.tar.gz: 9b9e076744f383c65617cd3b70298257d3ed2e3193dd90747c488e9248c695f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59a4c236a08e4cb86522396ee2c39a4db6084975013350925baee58ae24f4cbf0d4487c828684ba69f163c9cec9452bf2c12da928cc7fc2ccc493332020e08e0
|
7
|
+
data.tar.gz: 9ddf0ba770f7a8c18d6a677a2039cbd9306179b8876f33b54fbe3d496c5366abfa93374d314b34c37aec53712d7e78133dd9a36317097071b8a85a2aa6aa06ed
|
data/README.md
CHANGED
@@ -19,10 +19,10 @@
|
|
19
19
|
|
20
20
|
## What's SOULs?
|
21
21
|
|
22
|
-
Welcome to SOULs Framework!
|
22
|
+
Welcome to SOULs Serverless Application Framework!
|
23
23
|
|
24
|
-
SOULs is a Serverless Application Framework.
|
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.
|
24
|
+
SOULs is a Serverless Application Framework with 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!
|
26
26
|
You can focus on your business logic. No more infra problems.
|
27
27
|
|
28
28
|
SOULs creates 6 types of framework.
|
@@ -74,7 +74,7 @@ And Create Your APP
|
|
74
74
|
|
75
75
|
$ souls new app_name
|
76
76
|
|
77
|
-
|
77
|
+
## Choose SOULs Type:
|
78
78
|
|
79
79
|
Select Strain:
|
80
80
|
1. SOULs GraphQL API
|
@@ -85,8 +85,37 @@ Select Strain:
|
|
85
85
|
6. SOULs Doc Web
|
86
86
|
|
87
87
|
|
88
|
-
##
|
88
|
+
## Gemfile 自動更新アップデート
|
89
89
|
|
90
|
+
`Gemfile`, `Gemfile.lock` を最新のバージョンに自動更新します。
|
91
|
+
|
92
|
+
```
|
93
|
+
souls gem:update
|
94
|
+
```
|
95
|
+
|
96
|
+
|
97
|
+
除外したい `gem` は `config/souls.rb` 内の
|
98
|
+
`config.fixed_gems` の配列に追加します。
|
99
|
+
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
Souls.configure do |config|
|
103
|
+
config.app = "souls-api"
|
104
|
+
config.project_id = "souls-api"
|
105
|
+
config.strain = "worker"
|
106
|
+
config.api_repo = "elsoul/souls_api"
|
107
|
+
config.worker_repo = "elsoul/souls_worker"
|
108
|
+
config.worker_endpoint = "https://worker.com"
|
109
|
+
config.fixed_gems = ["selenium-webdriver", "pg"]
|
110
|
+
end
|
111
|
+
```
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
## SOULs Serverless Application Framework Document
|
116
|
+
|
117
|
+
SOULs サーバーレスアプリケーションフレームワーク
|
118
|
+
ドキュメントはこちらから
|
90
119
|
- [SOULs Document](https://souls.elsoul.nl/)
|
91
120
|
|
92
121
|
|
data/exe/souls
CHANGED
data/lib/souls.rb
CHANGED
@@ -28,164 +28,151 @@ module Souls
|
|
28
28
|
class Error < StandardError; end
|
29
29
|
class << self
|
30
30
|
attr_accessor :configuration
|
31
|
-
end
|
32
|
-
|
33
|
-
def self.run_psql
|
34
|
-
system(
|
35
|
-
"docker run --rm -d \
|
36
|
-
-p 5433:5432 \
|
37
|
-
-v postgres-tmp:/var/lib/postgresql/data \
|
38
|
-
-e POSTGRES_USER=postgres \
|
39
|
-
-e POSTGRES_PASSWORD=postgres \
|
40
|
-
-e POSTGRES_DB=souls_test \
|
41
|
-
postgres:13-alpine"
|
42
|
-
)
|
43
|
-
system("docker ps")
|
44
|
-
end
|
45
31
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
32
|
+
def run_psql
|
33
|
+
system(
|
34
|
+
"docker run --rm -d \
|
35
|
+
-p 5433:5432 \
|
36
|
+
-v postgres-tmp:/var/lib/postgresql/data \
|
37
|
+
-e POSTGRES_USER=postgres \
|
38
|
+
-e POSTGRES_PASSWORD=postgres \
|
39
|
+
-e POSTGRES_DB=souls_test \
|
40
|
+
postgres:13-alpine"
|
41
|
+
)
|
42
|
+
system("docker ps")
|
43
|
+
end
|
58
44
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
45
|
+
def run_mysql
|
46
|
+
system(
|
47
|
+
"docker run --rm -d \
|
48
|
+
-p 3306:3306 \
|
49
|
+
-v mysql-tmp:/var/lib/mysql \
|
50
|
+
-e MYSQL_USER=mysql \
|
51
|
+
-e MYSQL_ROOT_PASSWORD=mysql \
|
52
|
+
-e MYSQL_DB=souls_test \
|
53
|
+
mysql:latest"
|
54
|
+
)
|
55
|
+
system("docker ps")
|
56
|
+
end
|
66
57
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
while iter
|
74
|
-
print(chars[(iter += 1) % chars.length])
|
75
|
-
sleep(delay)
|
76
|
-
print("\b")
|
77
|
-
end
|
78
|
-
end
|
79
|
-
yield.tap do
|
80
|
-
iter = false
|
81
|
-
spinner.join
|
58
|
+
def run_awake(url)
|
59
|
+
app = Souls.configuration.app
|
60
|
+
system(
|
61
|
+
"gcloud scheduler jobs create http #{app}-awake
|
62
|
+
--schedule '0,10,20,30,40,50 * * * *' --uri #{url} --http-method GET"
|
63
|
+
)
|
82
64
|
end
|
83
|
-
end
|
84
65
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
66
|
+
def gemfile_latest_version
|
67
|
+
file_path = "./Gemfile"
|
68
|
+
updated_gems = []
|
69
|
+
updated_gem_versions = []
|
70
|
+
updated_lines = []
|
71
|
+
from_dev = false
|
72
|
+
File.open(file_path, "r") do |f|
|
73
|
+
f.each_line do |line|
|
74
|
+
from_dev = true if line.include?("group")
|
75
|
+
next unless line.include?("gem ")
|
95
76
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
77
|
+
gem = line.gsub("gem ", "").gsub("\"", "").gsub("\n", "").gsub(" ", "").split(",")
|
78
|
+
url = URI("https://rubygems.org/api/v1/versions/#{gem[0]}/latest.json")
|
79
|
+
res = Net::HTTP.get_response(url)
|
80
|
+
data = JSON.parse(res.body)
|
81
|
+
next if Souls.configuration.fixed_gems.include?(gem[0].to_s)
|
82
|
+
next if data["version"].to_s == gem[1].to_s
|
101
83
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
84
|
+
updated_lines << if from_dev
|
85
|
+
" gem \"#{gem[0]}\", \"#{data['version']}\""
|
86
|
+
else
|
87
|
+
"gem \"#{gem[0]}\", \"#{data['version']}\""
|
88
|
+
end
|
89
|
+
updated_gems << (gem[0]).to_s
|
90
|
+
updated_gem_versions << data["version"]
|
91
|
+
system("gem update #{gem[0]}")
|
92
|
+
end
|
110
93
|
end
|
94
|
+
{
|
95
|
+
gems: updated_gems,
|
96
|
+
lines: updated_lines,
|
97
|
+
updated_gem_versions: updated_gem_versions
|
98
|
+
}
|
111
99
|
end
|
112
|
-
{
|
113
|
-
gems: updated_gems,
|
114
|
-
lines: updated_lines,
|
115
|
-
updated_gem_versions: updated_gem_versions
|
116
|
-
}
|
117
|
-
end
|
118
100
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
101
|
+
def update_gemfile
|
102
|
+
file_path = "./Gemfile"
|
103
|
+
tmp_file = "./tmp/Gemfile"
|
104
|
+
new_gems = gemfile_latest_version
|
105
|
+
logs = []
|
106
|
+
message = Paint["\nAlready Up to date!", :green]
|
107
|
+
return "Already Up to date!" && puts(message) if new_gems[:gems].blank?
|
126
108
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
109
|
+
@i = 0
|
110
|
+
File.open(file_path, "r") do |f|
|
111
|
+
File.open(tmp_file, "w") do |new_line|
|
112
|
+
f.each_line do |line|
|
113
|
+
gem = line.gsub("gem ", "").gsub("\"", "").gsub("\n", "").gsub(" ", "").split(",")
|
114
|
+
if new_gems[:gems].include?(gem[0])
|
115
|
+
old_ver = gem[1].split(".")
|
116
|
+
new_ver = new_gems[:updated_gem_versions][@i].split(".")
|
117
|
+
if old_ver[0] < new_ver[0]
|
118
|
+
logs << Paint % [
|
119
|
+
"#{gem[0]} v#{gem[1]} → %{red_text}",
|
120
|
+
:white,
|
121
|
+
{
|
122
|
+
red_text: ["v#{new_gems[:updated_gem_versions][@i]}", :red]
|
123
|
+
}
|
124
|
+
]
|
125
|
+
elsif old_ver[1] < new_ver[1]
|
126
|
+
logs << Paint % [
|
127
|
+
"#{gem[0]} v#{gem[1]} → v#{new_ver[0]}.%{yellow_text}",
|
128
|
+
:white,
|
129
|
+
{
|
130
|
+
yellow_text: ["#{new_ver[1]}.#{new_ver[2]}", :yellow]
|
131
|
+
}
|
132
|
+
]
|
133
|
+
elsif old_ver[2] < new_ver[2]
|
134
|
+
logs << Paint % [
|
135
|
+
"#{gem[0]} v#{gem[1]} → v#{new_ver[0]}.#{new_ver[1]}.%{green_text}",
|
136
|
+
:white,
|
137
|
+
{
|
138
|
+
green_text: [(new_ver[2]).to_s, :green]
|
139
|
+
}
|
140
|
+
]
|
141
|
+
end
|
142
|
+
if gem[0] == "souls"
|
143
|
+
logs << Paint % [
|
144
|
+
"\nSOULs Doc: %{cyan_text}",
|
145
|
+
:white,
|
146
|
+
{ cyan_text: ["https://souls.elsoul.nl\n", :cyan] }
|
147
|
+
]
|
148
|
+
end
|
149
|
+
new_line.write("#{new_gems[:lines][@i]}\n")
|
150
|
+
@i += 1
|
151
|
+
else
|
152
|
+
new_line.write(line)
|
159
153
|
end
|
160
|
-
if gem[0] == "souls"
|
161
|
-
logs << Paint % ["\nSOULs Doc: %{cyan_text}", :white, { cyan_text: ["https://souls.elsoul.nl\n", :cyan] }]
|
162
|
-
end
|
163
|
-
new_line.write("#{new_gems[:lines][@i]}\n")
|
164
|
-
@i += 1
|
165
|
-
else
|
166
|
-
new_line.write(line)
|
167
154
|
end
|
168
155
|
end
|
169
156
|
end
|
157
|
+
FileUtils.rm("./Gemfile")
|
158
|
+
FileUtils.rm("./Gemfile.lock")
|
159
|
+
FileUtils.mv("./tmp/Gemfile", "./Gemfile")
|
160
|
+
system("bundle update")
|
161
|
+
success = Paint["\n\nSuccessfully Updated These Gems!\n", :green]
|
162
|
+
puts(success)
|
163
|
+
logs.each do |line|
|
164
|
+
puts(line)
|
165
|
+
end
|
170
166
|
end
|
171
|
-
FileUtils.rm("./Gemfile")
|
172
|
-
FileUtils.rm("./Gemfile.lock")
|
173
|
-
FileUtils.mv("./tmp/Gemfile", "./Gemfile")
|
174
|
-
system("bundle update")
|
175
|
-
success = Paint["\n\nSuccessfully Updated These Gems!\n", :green]
|
176
|
-
puts(success)
|
177
|
-
logs.each do |line|
|
178
|
-
puts(line)
|
179
|
-
end
|
180
|
-
end
|
181
167
|
|
182
|
-
|
183
|
-
|
184
|
-
|
168
|
+
def configure
|
169
|
+
self.configuration ||= Configuration.new
|
170
|
+
yield(configuration)
|
171
|
+
end
|
185
172
|
end
|
186
173
|
|
187
174
|
class Configuration
|
188
|
-
attr_accessor :app, :strain, :project_id, :worker_repo, :api_repo, :worker_endpoint
|
175
|
+
attr_accessor :app, :strain, :project_id, :worker_repo, :api_repo, :worker_endpoint, :fixed_gems
|
189
176
|
|
190
177
|
def initialize
|
191
178
|
@app = nil
|
@@ -194,6 +181,7 @@ module Souls
|
|
194
181
|
@worker_repo = nil
|
195
182
|
@api_repo = nil
|
196
183
|
@worker_endpoint = nil
|
184
|
+
@fixed_gems = nil
|
197
185
|
end
|
198
186
|
end
|
199
187
|
end
|
data/lib/souls/gcloud/iam.rb
CHANGED
@@ -1,31 +1,45 @@
|
|
1
1
|
module Souls
|
2
2
|
module Gcloud
|
3
3
|
class << self
|
4
|
-
def create_service_account(
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
def create_service_account(args)
|
5
|
+
service_account = args[:service_account] || "souls-app"
|
6
|
+
system(
|
7
|
+
"gcloud iam service-accounts create #{service_account} \
|
8
|
+
--description='Souls Service Account' \
|
9
|
+
--display-name=#{service_account}"
|
10
|
+
)
|
8
11
|
end
|
9
12
|
|
10
|
-
def create_service_account_key(
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
def create_service_account_key(args)
|
14
|
+
service_account = args[:service_account] || "souls-app"
|
15
|
+
project_id = args[:project_id] || "souls-app"
|
16
|
+
system(
|
17
|
+
"gcloud iam service-accounts keys create ./config/keyfile.json \
|
18
|
+
--iam-account #{service_account}@#{project_id}.iam.gserviceaccount.com"
|
19
|
+
)
|
14
20
|
end
|
15
21
|
|
16
|
-
def add_service_account_role(
|
17
|
-
|
22
|
+
def add_service_account_role(args)
|
23
|
+
service_account = args[:service_account] || "souls-app"
|
24
|
+
project_id = args[:project_id] || "souls-app"
|
25
|
+
role = args[:role] || "roles/firebase.admin"
|
18
26
|
`gcloud projects add-iam-policy-binding #{project_id} \
|
19
27
|
--member="serviceAccount:#{service_account}@#{project_id}.iam.gserviceaccount.com" \
|
20
28
|
--role="#{role}"`
|
21
29
|
end
|
22
30
|
|
23
|
-
def add_permissions(
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
31
|
+
def add_permissions(args)
|
32
|
+
service_account = args[:service_account] || "souls-app"
|
33
|
+
roles = [
|
34
|
+
"roles/cloudsql.serviceAgent",
|
35
|
+
"roles/containerregistry.ServiceAgent",
|
36
|
+
"roles/pubsub.serviceAgent",
|
37
|
+
"roles/firestore.serviceAgent",
|
38
|
+
"roles/iam.serviceAccountUser"
|
39
|
+
]
|
40
|
+
roles.each do |role|
|
41
|
+
add_service_account_role(service_account: service_account, role: role)
|
42
|
+
end
|
29
43
|
end
|
30
44
|
end
|
31
45
|
end
|
data/lib/souls/init.rb
CHANGED
@@ -9,21 +9,6 @@ module Souls
|
|
9
9
|
data[0]["tag_name"]
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.initial_config_init(app_name: "souls", strain: "api")
|
13
|
-
FileUtils.touch("./#{app_name}/config/souls.rb")
|
14
|
-
file_path = "./#{app_name}/config/souls.rb"
|
15
|
-
File.open(file_path, "w") do |f|
|
16
|
-
f.write(<<~TEXT)
|
17
|
-
Souls.configure do |config|
|
18
|
-
config.app = "#{app_name}"
|
19
|
-
config.strain = "#{strain}"
|
20
|
-
end
|
21
|
-
TEXT
|
22
|
-
end
|
23
|
-
rescue StandardError => e
|
24
|
-
puts(e)
|
25
|
-
end
|
26
|
-
|
27
12
|
def self.download_souls(app_name: "souls", repository_name: "souls_api ")
|
28
13
|
version = get_version(repository_name: repository_name)
|
29
14
|
system("curl -OL https://github.com/elsoul/#{repository_name}/archive/#{version}.tar.gz")
|
@@ -42,7 +27,7 @@ module Souls
|
|
42
27
|
___/ / /_/ / /_/ / /___(__ )#{' '}
|
43
28
|
/____/\\____/\\____/_____/____/#{' '}
|
44
29
|
TEXT
|
45
|
-
message = Paint[txt, :
|
30
|
+
message = Paint[txt, :cyan]
|
46
31
|
puts(message)
|
47
32
|
puts(line)
|
48
33
|
welcome = Paint["Welcome to SOULs!", :white]
|
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.
|
4
|
+
version: 0.24.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-07-
|
13
|
+
date: 2021-07-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: paint
|
@@ -53,23 +53,9 @@ executables:
|
|
53
53
|
extensions: []
|
54
54
|
extra_rdoc_files: []
|
55
55
|
files:
|
56
|
-
- ".gitignore"
|
57
|
-
- ".irbrc"
|
58
|
-
- ".rspec"
|
59
|
-
- ".rubocop.yml"
|
60
|
-
- ".ruby-version"
|
61
|
-
- ".travis.yml"
|
62
56
|
- CODE_OF_CONDUCT.md
|
63
|
-
- Gemfile
|
64
|
-
- Gemfile.lock
|
65
57
|
- LICENSE.txt
|
66
58
|
- README.md
|
67
|
-
- Rakefile
|
68
|
-
- Steepfile
|
69
|
-
- bin/console
|
70
|
-
- bin/setup
|
71
|
-
- config/souls.rb
|
72
|
-
- db/schema.rb
|
73
59
|
- exe/souls
|
74
60
|
- lib/souls.rb
|
75
61
|
- lib/souls/gcloud.rb
|
@@ -94,8 +80,6 @@ files:
|
|
94
80
|
- lib/souls/generate/type.rb
|
95
81
|
- lib/souls/init.rb
|
96
82
|
- lib/souls/version.rb
|
97
|
-
- rbs/init.rbs
|
98
|
-
- souls.gemspec
|
99
83
|
homepage: https://souls.elsoul.nl
|
100
84
|
licenses:
|
101
85
|
- Apache-2.0
|
data/.gitignore
DELETED
data/.irbrc
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,152 +0,0 @@
|
|
1
|
-
require: rubocop-graphql
|
2
|
-
AllCops:
|
3
|
-
SuggestExtensions: false
|
4
|
-
EnabledByDefault: true
|
5
|
-
Exclude:
|
6
|
-
- "app/**/*.rb"
|
7
|
-
- "db/migrate/*.rb"
|
8
|
-
- "db/schema.rb"
|
9
|
-
- "spec/spec_helper.rb"
|
10
|
-
- "spec/**/*.rb"
|
11
|
-
- "lib/souls/generate/type.rb"
|
12
|
-
|
13
|
-
Style/Copyright:
|
14
|
-
Description: "Include a copyright notice in each file before any code."
|
15
|
-
Enabled: false
|
16
|
-
VersionAdded: "0.30"
|
17
|
-
Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
|
18
|
-
AutocorrectNotice: "Copyright 2021 by ELSOUL LABO B.V."
|
19
|
-
|
20
|
-
Style/TopLevelMethodDefinition:
|
21
|
-
Exclude:
|
22
|
-
- "db/seeds.rb"
|
23
|
-
- "spec/spec_helper.rb"
|
24
|
-
|
25
|
-
Style/IpAddresses:
|
26
|
-
Exclude:
|
27
|
-
- "config.ru"
|
28
|
-
- "Gemfile"
|
29
|
-
|
30
|
-
Style/HashSyntax:
|
31
|
-
EnforcedStyle: ruby19
|
32
|
-
Exclude:
|
33
|
-
- "**/*.rake"
|
34
|
-
- "Rakefile"
|
35
|
-
|
36
|
-
Style/Semicolon:
|
37
|
-
Exclude:
|
38
|
-
- "spec/**/*"
|
39
|
-
|
40
|
-
Style/StringLiterals:
|
41
|
-
EnforcedStyle: double_quotes
|
42
|
-
|
43
|
-
Style/ClassVars:
|
44
|
-
Exclude:
|
45
|
-
- "spec/spec_helper.rb"
|
46
|
-
Style/StringConcatenation:
|
47
|
-
Enabled: false
|
48
|
-
|
49
|
-
Style/Documentation:
|
50
|
-
Enabled: false
|
51
|
-
|
52
|
-
Style/DocumentationMethod:
|
53
|
-
Enabled: false
|
54
|
-
|
55
|
-
Style/FrozenStringLiteralComment:
|
56
|
-
Enabled: false
|
57
|
-
Style/Lambda:
|
58
|
-
EnforcedStyle: literal
|
59
|
-
|
60
|
-
Style/AsciiComments:
|
61
|
-
Enabled: false
|
62
|
-
|
63
|
-
Style/MissingElse:
|
64
|
-
Enabled: false
|
65
|
-
|
66
|
-
Style/StringHashKeys:
|
67
|
-
Exclude:
|
68
|
-
- "spec/**/*.rb"
|
69
|
-
|
70
|
-
Style/CollectionMethods:
|
71
|
-
Enabled: false
|
72
|
-
|
73
|
-
Style/FormatString:
|
74
|
-
Enabled: false
|
75
|
-
|
76
|
-
Style/ClassAndModuleChildren:
|
77
|
-
Enabled: false
|
78
|
-
|
79
|
-
Style/FormatStringToken:
|
80
|
-
Enabled: false
|
81
|
-
|
82
|
-
Style/ClassMethodsDefinitions:
|
83
|
-
Enabled: false
|
84
|
-
|
85
|
-
Layout/ExtraSpacing:
|
86
|
-
Exclude:
|
87
|
-
- "db/migrate/*.rb"
|
88
|
-
|
89
|
-
Layout/LineLength:
|
90
|
-
Exclude:
|
91
|
-
- "lib/souls/generate/rspec_mutation.rb"
|
92
|
-
- "lib/souls/generate/resolver.rb"
|
93
|
-
|
94
|
-
Layout/LineEndStringConcatenationIndentation:
|
95
|
-
Enabled: false
|
96
|
-
|
97
|
-
GraphQL/ObjectDescription:
|
98
|
-
Enabled: false
|
99
|
-
|
100
|
-
GraphQL/FieldDescription:
|
101
|
-
Enabled: false
|
102
|
-
|
103
|
-
GraphQL/ArgumentDescription:
|
104
|
-
Enabled: false
|
105
|
-
|
106
|
-
GraphQL/ExtractInputType:
|
107
|
-
Enabled: false
|
108
|
-
|
109
|
-
GraphQL/ExtractType:
|
110
|
-
Enabled: false
|
111
|
-
|
112
|
-
GraphQL/ArgumentName:
|
113
|
-
Enabled: false
|
114
|
-
|
115
|
-
Lint/ConstantResolution:
|
116
|
-
Enabled: false
|
117
|
-
|
118
|
-
Lint/NumberConversion:
|
119
|
-
Enabled: false
|
120
|
-
|
121
|
-
Lint/MissingSuper:
|
122
|
-
Enabled: false
|
123
|
-
|
124
|
-
Metrics/AbcSize:
|
125
|
-
Enabled: false
|
126
|
-
|
127
|
-
Metrics/MethodLength:
|
128
|
-
Enabled: false
|
129
|
-
|
130
|
-
Metrics/BlockLength:
|
131
|
-
Enabled: false
|
132
|
-
|
133
|
-
Metrics/CyclomaticComplexity:
|
134
|
-
Enabled: false
|
135
|
-
|
136
|
-
Metrics/PerceivedComplexity:
|
137
|
-
Enabled: false
|
138
|
-
|
139
|
-
Metrics/ModuleLength:
|
140
|
-
Enabled: false
|
141
|
-
|
142
|
-
Metrics/BlockNesting:
|
143
|
-
Enabled: false
|
144
|
-
|
145
|
-
Naming/AccessorMethodName:
|
146
|
-
Enabled: false
|
147
|
-
|
148
|
-
Naming/PredicateName:
|
149
|
-
Enabled: false
|
150
|
-
|
151
|
-
Bundler/GemComment:
|
152
|
-
Enabled: false
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
3.0.1
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in souls.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
gem "activesupport", "6.1.4"
|
7
|
-
gem "paint", "2.2.1"
|
8
|
-
gem "parser", "3.0.2.0"
|
9
|
-
gem "rake", "13.0.6"
|
10
|
-
gem "rspec", "3.10.0"
|
11
|
-
gem "rubocop", "1.18.3"
|
12
|
-
gem "steep", "0.44.1"
|
13
|
-
gem "whirly", "0.3.0"
|
data/Gemfile.lock
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
souls (0.23.8)
|
5
|
-
paint (= 2.2.1)
|
6
|
-
whirly (= 0.3.0)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
activesupport (6.1.4)
|
12
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
-
i18n (>= 1.6, < 2)
|
14
|
-
minitest (>= 5.1)
|
15
|
-
tzinfo (~> 2.0)
|
16
|
-
zeitwerk (~> 2.3)
|
17
|
-
ast (2.4.2)
|
18
|
-
concurrent-ruby (1.1.9)
|
19
|
-
diff-lcs (1.4.4)
|
20
|
-
ffi (1.15.3)
|
21
|
-
i18n (1.8.10)
|
22
|
-
concurrent-ruby (~> 1.0)
|
23
|
-
language_server-protocol (3.16.0.1)
|
24
|
-
listen (3.5.1)
|
25
|
-
rb-fsevent (~> 0.10, >= 0.10.3)
|
26
|
-
rb-inotify (~> 0.9, >= 0.9.10)
|
27
|
-
minitest (5.14.4)
|
28
|
-
paint (2.2.1)
|
29
|
-
parallel (1.20.1)
|
30
|
-
parser (3.0.2.0)
|
31
|
-
ast (~> 2.4.1)
|
32
|
-
rainbow (3.0.0)
|
33
|
-
rake (13.0.6)
|
34
|
-
rb-fsevent (0.11.0)
|
35
|
-
rb-inotify (0.10.1)
|
36
|
-
ffi (~> 1.0)
|
37
|
-
rbs (1.2.1)
|
38
|
-
regexp_parser (2.1.1)
|
39
|
-
rexml (3.2.5)
|
40
|
-
rspec (3.10.0)
|
41
|
-
rspec-core (~> 3.10.0)
|
42
|
-
rspec-expectations (~> 3.10.0)
|
43
|
-
rspec-mocks (~> 3.10.0)
|
44
|
-
rspec-core (3.10.1)
|
45
|
-
rspec-support (~> 3.10.0)
|
46
|
-
rspec-expectations (3.10.1)
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
-
rspec-support (~> 3.10.0)
|
49
|
-
rspec-mocks (3.10.2)
|
50
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
-
rspec-support (~> 3.10.0)
|
52
|
-
rspec-support (3.10.2)
|
53
|
-
rubocop (1.18.3)
|
54
|
-
parallel (~> 1.10)
|
55
|
-
parser (>= 3.0.0.0)
|
56
|
-
rainbow (>= 2.2.2, < 4.0)
|
57
|
-
regexp_parser (>= 1.8, < 3.0)
|
58
|
-
rexml
|
59
|
-
rubocop-ast (>= 1.7.0, < 2.0)
|
60
|
-
ruby-progressbar (~> 1.7)
|
61
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
62
|
-
rubocop-ast (1.8.0)
|
63
|
-
parser (>= 3.0.1.1)
|
64
|
-
ruby-progressbar (1.11.0)
|
65
|
-
steep (0.44.1)
|
66
|
-
activesupport (>= 5.1)
|
67
|
-
language_server-protocol (>= 3.15, < 4.0)
|
68
|
-
listen (~> 3.0)
|
69
|
-
parallel (>= 1.0.0)
|
70
|
-
parser (>= 2.7)
|
71
|
-
rainbow (>= 2.2.2, < 4.0)
|
72
|
-
rbs (>= 1.2.0)
|
73
|
-
terminal-table (>= 2, < 4)
|
74
|
-
terminal-table (3.0.1)
|
75
|
-
unicode-display_width (>= 1.1.1, < 3)
|
76
|
-
tzinfo (2.0.4)
|
77
|
-
concurrent-ruby (~> 1.0)
|
78
|
-
unicode-display_width (2.0.0)
|
79
|
-
whirly (0.3.0)
|
80
|
-
unicode-display_width (>= 1.1)
|
81
|
-
zeitwerk (2.4.2)
|
82
|
-
|
83
|
-
PLATFORMS
|
84
|
-
x86_64-linux
|
85
|
-
|
86
|
-
DEPENDENCIES
|
87
|
-
activesupport (= 6.1.4)
|
88
|
-
paint (= 2.2.1)
|
89
|
-
parser (= 3.0.2.0)
|
90
|
-
rake (= 13.0.6)
|
91
|
-
rspec (= 3.10.0)
|
92
|
-
rubocop (= 1.18.3)
|
93
|
-
souls!
|
94
|
-
steep (= 0.44.1)
|
95
|
-
whirly (= 0.3.0)
|
96
|
-
|
97
|
-
BUNDLED WITH
|
98
|
-
2.2.23
|
data/Rakefile
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
2
|
-
require "rspec/core/rake_task"
|
3
|
-
require "./lib/souls"
|
4
|
-
|
5
|
-
RSpec::Core::RakeTask.new(:spec)
|
6
|
-
|
7
|
-
task :default => :spec
|
8
|
-
|
9
|
-
namespace :task do
|
10
|
-
task :g do
|
11
|
-
file_path = "./lib/souls/generate/"
|
12
|
-
Souls::SOULS_METHODS.each do |f|
|
13
|
-
FileUtils.touch("#{file_path}#{f}.rb")
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
task :a do
|
18
|
-
file_path = "./spec/generate/"
|
19
|
-
Souls::SOULS_METHODS.each do |f|
|
20
|
-
FileUtils.touch("#{file_path}#{f}_spec.rb")
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
data/Steepfile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "souls"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/config/souls.rb
DELETED
data/db/schema.rb
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
# This is Test Schema
|
2
|
-
# All the files created by this schema.rb
|
3
|
-
|
4
|
-
ActiveRecord::Schema.define(version: 20_210_308_070_947) do
|
5
|
-
enable_extension "plpgsql"
|
6
|
-
|
7
|
-
create_table "article_categories", force: :cascade do |t|
|
8
|
-
t.string "name", null: false
|
9
|
-
t.text "tags", default: [], array: true
|
10
|
-
t.boolean "is_deleted", default: false, null: false
|
11
|
-
t.datetime "created_at", precision: 6, null: false
|
12
|
-
t.datetime "updated_at", precision: 6, null: false
|
13
|
-
t.index ["is_deleted"], name: "index_article_categories_on_is_deleted"
|
14
|
-
t.index ["name"], name: "index_article_categories_on_name"
|
15
|
-
end
|
16
|
-
|
17
|
-
create_table "articles", force: :cascade do |t|
|
18
|
-
t.bigint "user_id"
|
19
|
-
t.string "title", null: false
|
20
|
-
t.text "body", default: "", null: false
|
21
|
-
t.string "thumnail_url", default: "", null: false
|
22
|
-
t.datetime "public_date", default: "2021-05-07 11:45:23", null: false
|
23
|
-
t.bigint "article_category_id", null: false
|
24
|
-
t.boolean "is_public", default: false, null: false
|
25
|
-
t.boolean "just_created", default: true, null: false
|
26
|
-
t.string "slag", null: false
|
27
|
-
t.text "tags", default: [], array: true
|
28
|
-
t.boolean "is_deleted", default: false, null: false
|
29
|
-
t.datetime "created_at", precision: 6, null: false
|
30
|
-
t.datetime "updated_at", precision: 6, null: false
|
31
|
-
t.index ["article_category_id"], name: "index_articles_on_article_category_id"
|
32
|
-
t.index ["is_deleted"], name: "index_articles_on_is_deleted"
|
33
|
-
t.index ["is_public"], name: "index_articles_on_is_public"
|
34
|
-
t.index ["slag"], name: "index_articles_on_slag", unique: true
|
35
|
-
t.index ["title"], name: "index_articles_on_title", unique: true
|
36
|
-
t.index ["user_id"], name: "index_articles_on_user_id"
|
37
|
-
end
|
38
|
-
|
39
|
-
create_table "users", force: :cascade do |t|
|
40
|
-
t.integer "retailer_uid"
|
41
|
-
t.string "uid", null: false
|
42
|
-
t.string "username", default: "", null: false
|
43
|
-
t.string "screen_name", default: "", null: false
|
44
|
-
t.string "last_name", default: "", null: false
|
45
|
-
t.string "first_name", default: "", null: false
|
46
|
-
t.string "last_name_kanji", default: "", null: false
|
47
|
-
t.string "first_name_kanji", default: "", null: false
|
48
|
-
t.string "last_name_kana", default: "", null: false
|
49
|
-
t.string "first_name_kana", default: "", null: false
|
50
|
-
t.string "email", null: false
|
51
|
-
t.string "tel", default: "", null: false
|
52
|
-
t.string "icon_url", default: "", null: false
|
53
|
-
t.string "birthday", default: "", null: false
|
54
|
-
t.string "gender", default: "", null: false
|
55
|
-
t.string "lang", default: "ja", null: false
|
56
|
-
t.string "category", default: "user", null: false
|
57
|
-
t.integer "user_role", default: 0, null: false
|
58
|
-
t.boolean "is_deleted", default: false, null: false
|
59
|
-
t.datetime "created_at", precision: 6, null: false
|
60
|
-
t.datetime "updated_at", precision: 6, null: false
|
61
|
-
t.index ["email"], name: "index_users_on_email", unique: true
|
62
|
-
t.index ["is_deleted"], name: "index_users_on_is_deleted"
|
63
|
-
t.index ["screen_name"], name: "index_users_on_screen_name"
|
64
|
-
t.index ["uid"], name: "index_users_on_uid"
|
65
|
-
t.index ["username"], name: "index_users_on_username"
|
66
|
-
end
|
67
|
-
end
|
data/rbs/init.rbs
DELETED
data/souls.gemspec
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
require_relative "lib/souls/version"
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = "souls"
|
5
|
-
spec.version = Souls::VERSION
|
6
|
-
spec.authors = ["POPPIN-FUMI", "KishiTheMechanic", "James Neve"]
|
7
|
-
spec.email = ["f.kawasaki@elsoul.nl", "s.kishi@elsoul.nl", "jamesoneve@gmail.com"]
|
8
|
-
|
9
|
-
spec.summary = "SOULs is a Serverless Application Framework.
|
10
|
-
SOULs has four strains, API, Worker, Console, Media, and can be used in combination according to the purpose.
|
11
|
-
SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google Cloud and Amazon Web Services"
|
12
|
-
spec.description = "SOULs is a Serverless Application Framework.
|
13
|
-
SOULs has four strains, API, Worker, Console, Media, and can be used in combination according to the purpose.
|
14
|
-
SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google Cloud and Amazon Web Services"
|
15
|
-
spec.homepage = "https://souls.elsoul.nl"
|
16
|
-
spec.license = "Apache-2.0"
|
17
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
18
|
-
|
19
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
-
spec.metadata["source_code_uri"] = "https://github.com/elsoul/souls"
|
21
|
-
spec.metadata["changelog_uri"] = "https://github.com/elsoul/souls"
|
22
|
-
|
23
|
-
# Specify which files should be added to the gem when it is released.
|
24
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
-
spec.files =
|
26
|
-
Dir.chdir(File.expand_path(__dir__)) do
|
27
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
28
|
-
end
|
29
|
-
spec.bindir = "exe"
|
30
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
-
spec.require_paths = ["lib"]
|
32
|
-
spec.add_runtime_dependency("paint", "2.2.1")
|
33
|
-
spec.add_runtime_dependency("whirly", "0.3.0")
|
34
|
-
end
|