souls 3.0.8 → 4.0.1
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/lib/souls/cli/create/index.rb +2 -32
- data/lib/souls/cli.rb +7 -4
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- data/lib/souls.rb +14 -0
- 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: 2f7e78a0d34d033b5195daf0a5ed7aecad41eadead327bbcfcbafbd1db678c44
|
|
4
|
+
data.tar.gz: 9400d82655bb2960b8ad6b3638a9bfcddc87cff88657bd0dbedb76df7e74f327
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 457b3830e6dff28fcaae7db2e7d7cfe45ab9baa5b540307197549902fc3c33045bf8de89fa576a30669aa45a89724a595496c883a8de4ba34ada6754e6cea569
|
|
7
|
+
data.tar.gz: b9fc560fd7c268925921c42a84ae344e1e5ecbd921ef42a4076fc22d1d41c2a406afbf288b41396429f281bea40f4ba53d824b36d8987e70084940c204f6272a
|
|
@@ -134,29 +134,6 @@ end
|
|
|
134
134
|
- name: Set up Cloud SDK
|
|
135
135
|
uses: google-github-actions/setup-gcloud@v0
|
|
136
136
|
|
|
137
|
-
- name: Build and test with Rake
|
|
138
|
-
env:
|
|
139
|
-
PGHOST: 127.0.0.1
|
|
140
|
-
PGUSER: postgres
|
|
141
|
-
RACK_ENV: test
|
|
142
|
-
RUBY_YJIT_ENABLE: 1
|
|
143
|
-
SOULS_GCP_PROJECT_ID: ${{ secrets.SOULS_GCP_PROJECT_ID }}
|
|
144
|
-
run: |
|
|
145
|
-
sudo apt-get -yqq install libpq-dev
|
|
146
|
-
cd apps/#{worker_name}
|
|
147
|
-
rm -f .env
|
|
148
|
-
gem install bundler
|
|
149
|
-
bundle install --jobs 4 --retry 3
|
|
150
|
-
bundle exec rake db:create RACK_ENV=test
|
|
151
|
-
bundle exec rake db:migrate RACK_ENV=test
|
|
152
|
-
bundle exec rspec
|
|
153
|
-
|
|
154
|
-
- name: Sync PubSub
|
|
155
|
-
run: cd apps/#{worker_name} && souls sync pubsub
|
|
156
|
-
|
|
157
|
-
- name: Sync Tasks
|
|
158
|
-
run: cd apps/#{worker_name} && souls gcloud scheduler sync_schedules --timezone=${{ secrets.TZ }}
|
|
159
|
-
|
|
160
137
|
- name: Configure Docker
|
|
161
138
|
run: gcloud auth configure-docker --quiet
|
|
162
139
|
|
|
@@ -178,12 +155,6 @@ end
|
|
|
178
155
|
--quiet \\
|
|
179
156
|
--concurrency=80 \\
|
|
180
157
|
--port=8080 \\
|
|
181
|
-
--set-cloudsql-instances=${{ secrets.SOULS_GCLOUDSQL_INSTANCE }} \\
|
|
182
|
-
--set-env-vars="SOULS_DB_USER=${{ secrets.SOULS_DB_USER }}" \\
|
|
183
|
-
--set-env-vars="SOULS_DB_PW=${{ secrets.SOULS_DB_PW }}" \\
|
|
184
|
-
--set-env-vars="SOULS_DB_HOST=${{ secrets.SOULS_DB_HOST }}" \\
|
|
185
|
-
--set-env-vars="TZ=${{ secrets.TZ }}" \\
|
|
186
|
-
--set-env-vars="SOULS_SECRET_KEY_BASE=${{ secrets.SOULS_SECRET_KEY_BASE }}" \\
|
|
187
158
|
--set-env-vars="SOULS_GCP_PROJECT_ID=${{ secrets.SOULS_GCP_PROJECT_ID }}" \\
|
|
188
159
|
--set-env-vars="RUBY_YJIT_ENABLE=1"
|
|
189
160
|
TEXT
|
|
@@ -252,11 +223,10 @@ end
|
|
|
252
223
|
endroll = <<~TEXT
|
|
253
224
|
Easy to Run
|
|
254
225
|
$ cd apps/#{worker_name}
|
|
255
|
-
$ souls sync model
|
|
256
226
|
$ souls s
|
|
257
|
-
Go To : http://localhost:3000
|
|
227
|
+
Go To : http://localhost:3000
|
|
258
228
|
|
|
259
|
-
Doc: https://souls.
|
|
229
|
+
Doc: https://souls.el-soul.com/
|
|
260
230
|
TEXT
|
|
261
231
|
cd = Paint[endroll, :white]
|
|
262
232
|
puts(cd)
|
data/lib/souls/cli.rb
CHANGED
|
@@ -55,6 +55,11 @@ module SOULs
|
|
|
55
55
|
system("bundle exec rspec")
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
desc "secret", "Generate Secure Random String"
|
|
59
|
+
def secret
|
|
60
|
+
puts(SecureRandom.alphanumeric(85))
|
|
61
|
+
end
|
|
62
|
+
|
|
58
63
|
desc "build", "Run Docker Build"
|
|
59
64
|
def build
|
|
60
65
|
app = SOULs.configuration.app
|
|
@@ -65,8 +70,7 @@ module SOULs
|
|
|
65
70
|
def tag
|
|
66
71
|
souls_config = SOULs.configuration
|
|
67
72
|
app = souls_config.app
|
|
68
|
-
|
|
69
|
-
gcr = region_to_container_url(region:)
|
|
73
|
+
gcr = souls_config.gcr_region
|
|
70
74
|
project_id = souls_config.project_id
|
|
71
75
|
system("docker tag #{app}:latest #{gcr}/#{project_id}/#{app}:latest")
|
|
72
76
|
end
|
|
@@ -75,8 +79,7 @@ module SOULs
|
|
|
75
79
|
def push
|
|
76
80
|
souls_config = SOULs.configuration
|
|
77
81
|
app = souls_config.app
|
|
78
|
-
|
|
79
|
-
gcr = region_to_container_url(region:)
|
|
82
|
+
gcr = souls_config.gcr_region
|
|
80
83
|
project_id = souls_config.project_id
|
|
81
84
|
system("docker push #{gcr}/#{project_id}/#{app}:latest")
|
|
82
85
|
end
|
data/lib/souls/version.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.1
|
data/lib/souls.rb
CHANGED
|
@@ -40,5 +40,19 @@ module SOULs
|
|
|
40
40
|
def instance_name
|
|
41
41
|
"souls-#{@app}-db"
|
|
42
42
|
end
|
|
43
|
+
|
|
44
|
+
def gcr_region
|
|
45
|
+
if @region.include?("asia")
|
|
46
|
+
"asia.gcr.io"
|
|
47
|
+
elsif @region.include?("eu")
|
|
48
|
+
"eu.gcr.io"
|
|
49
|
+
else
|
|
50
|
+
"gcr.io"
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def gcp_db_host
|
|
55
|
+
"/cloudsql/#{@project_id}:#{@region}:#{instance_name}"
|
|
56
|
+
end
|
|
43
57
|
end
|
|
44
58
|
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:
|
|
4
|
+
version: 4.0.1
|
|
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: 2022-09-
|
|
13
|
+
date: 2022-09-14 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activesupport
|