souls 0.53.0 → 0.53.4

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: 18fee033db0ba1d965c475ccfcc7b214a638ca5a1717bfe2a4c4ff84941794e0
4
- data.tar.gz: cd106d0797aa4c5ee1b077629ba0d36e3c78acc653fdfb20f478e5d413d77fda
3
+ metadata.gz: 564e0bedd2c3f6d26daad5f9bc4307051b042ce2867e16fe0667372e70b3b432
4
+ data.tar.gz: 5a4fef479822068f0e49405c7b5b974adfe9c68845681454e6ec0a2d1aa35904
5
5
  SHA512:
6
- metadata.gz: c73f2318078f8c543fef42718868603ff4503fcbfa64c3b277ea1242d07b4038e348acd7e69949d6c74b7d8a7b70571494f3260d10b59c66e97d7c419604f710
7
- data.tar.gz: 642d8cdca074b5234b7179b815f17912347bb17d211d827a5c7198b8e8f8f0bcdb915b6cb37ce2a41ef2b54f408805ba0b8178f376cc296fa3ff204b1a5e9e14
6
+ metadata.gz: 467f58902722373ee1ee48af87a1b59383d4f71117c64a9242118b487aca907384fc5d8c9c5128f358852c6d29090de7274eb8719e7780e0e5d150e91d976920
7
+ data.tar.gz: 23b9061872e797e8e6803848e21dc30a29919519f4b929776aee8d87ae95e7b41cde8aa5a0fade7f8723a571cbb7d09ea934f172ced208f830c3d3af943f9a65
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![SOULs](https://storage.googleapis.com/souls/souls-ogp-vertical.jpg)](https://rubygems.org/gems/souls)
1
+ [![SOULs](https://souls.elsoul.nl/ogp.jpg)](https://souls.elsoul.nl)
2
2
 
3
3
  <p align="center">
4
4
  <a aria-label="Ruby logo" href="https://el-soul.com">
@@ -27,7 +27,7 @@ SOULs はサーバーレスフルスタックフレームワークです。柔
27
27
  SOULs バックエンドには `API` と `Worker` の 2 つのタイプがあります。
28
28
  `API` は主にデータをフロントエンドへ提供します。`Worker` は主に `タスク` の処理を行います
29
29
 
30
- ![画像](https://storage.googleapis.com/souls-bucket/imgs/souls-structure.jpg)
30
+ ![画像](https://souls.elsoul.nl/imgs/docs/SOULs.jpg)
31
31
 
32
32
  現在のバージョンでは SOULs `API` と `Worker` を Github Actions を使って Google Cloud Run へそれぞれデプロイします。
33
33
 
@@ -86,8 +86,6 @@ Check your GraphQL PlayGround
86
86
 
87
87
  (localhost:4000/playground)[localhost:4000/playground]
88
88
 
89
-
90
-
91
89
  ## Gemfile 自動更新アップデート
92
90
 
93
91
  `Gemfile`, `Gemfile.lock` を最新のバージョンに自動更新します。
@@ -96,11 +94,9 @@ Check your GraphQL PlayGround
96
94
  souls upgrade gemfile
97
95
  ```
98
96
 
99
-
100
97
  除外したい `gem` は `config/souls.rb` 内の
101
98
  `config.fixed_gems` の配列に追加します。
102
99
 
103
-
104
100
  ```ruby
105
101
  Souls.configure do |config|
106
102
  config.app = "souls-api"
@@ -113,15 +109,12 @@ Souls.configure do |config|
113
109
  end
114
110
  ```
115
111
 
116
-
117
-
118
112
  ## SOULs Serverless Application Framework Document
119
113
 
120
114
  SOULs サーバーレスアプリケーションフレームワーク
121
115
  ドキュメントはこちらから
122
- - [SOULs Document](https://souls.elsoul.nl/)
123
-
124
116
 
117
+ - [SOULs Document](https://souls.elsoul.nl/)
125
118
 
126
119
  ## Development
127
120
 
data/exe/souls CHANGED
@@ -3,7 +3,19 @@ require "souls"
3
3
  require "thor"
4
4
  begin
5
5
  souls_command = ARGV[0]
6
- require("./config/souls") unless ["new", "docker", "-v", "deploy"].include?(souls_command)
6
+ require("./config/souls") unless [
7
+ "new",
8
+ "docker",
9
+ "-v",
10
+ "deploy",
11
+ "help",
12
+ "api",
13
+ "create",
14
+ "gcloud",
15
+ "worker",
16
+ "",
17
+ nil
18
+ ].include?(souls_command)
7
19
  rescue StandardError
8
20
  raise(StandardError, "No confif! Please make `./config/souls.rb` File!")
9
21
  end
@@ -32,6 +32,12 @@ module Souls
32
32
  raise(Thor::Error, e)
33
33
  end
34
34
 
35
+ desc "config_set", "gcloud config set"
36
+ def config_set
37
+ project_id = Souls.configuration.project_id
38
+ system("gcloud config set project #{project_id}")
39
+ end
40
+
35
41
  desc "enable_permissions", "Enable Google Cloud APIs for SOULs Framework"
36
42
  def enable_permissions
37
43
  system("gcloud services enable compute.googleapis.com")
@@ -13,8 +13,8 @@ module Souls
13
13
  end
14
14
 
15
15
  desc "list", "Show Google Cloud Run List"
16
- def list(project_id: "")
17
- project_id = Souls.configuration.project_id if project_id.blank?
16
+ def list
17
+ project_id = Souls.configuration.project_id
18
18
  system("gcloud run services list --project #{project_id} --platform managed")
19
19
  rescue Thor::Error => e
20
20
  raise(Thor::Error, e)
@@ -22,7 +22,9 @@ module Souls
22
22
 
23
23
  desc "get_endpoint", "Show Worker's Endpoint"
24
24
  def get_endpoint(worker_name: "")
25
- `gcloud run services list | grep #{worker_name} | awk '{print $4}'`
25
+ app_name = Souls.configuration.app
26
+ project_id = Souls.configuration.project_id
27
+ `gcloud run services list --project #{project_id} --platform managed | grep #{app_name}-souls-#{worker_name} | awk '{print $4}'`
26
28
  rescue Thor::Error => e
27
29
  raise(Thor::Error, e)
28
30
  end
@@ -2,6 +2,7 @@ module Souls
2
2
  class Sync < Thor
3
3
  desc "conf", "Sync config/souls.rb Endpoint with Google Cloud Run"
4
4
  def conf
5
+ Souls::Gcloud.new.config_set
5
6
  update_conf
6
7
  update_conf(strain: "api")
7
8
  puts(
@@ -36,7 +37,7 @@ module Souls
36
37
 
37
38
  new_line.write(" config.workers = [\n")
38
39
  workers.each_with_index do |worker, i|
39
- base_url = Souls::Gcloud::Run.new.get_endpoint(worker_name: worker[:name])
40
+ base_url = Souls::CloudRun.new.get_endpoint(worker_name: worker[:name])
40
41
  endpoint = Souls.configuration.endpoint
41
42
  if (i + 1) == workers.size
42
43
  new_line.write(<<-TEXT)
@@ -2,6 +2,7 @@ module Souls
2
2
  class Sync < Thor
3
3
  desc "pubsub", "Sync Worker Jobs & Google Cloud Pubsub Subscriptions"
4
4
  def pubsub
5
+ Souls::Gcloud.new.config_set
5
6
  get_topics(workers: get_workers)
6
7
  puts(Paint["All Jobs Synced with PubSub Subscription!", :green])
7
8
  rescue Thor::Error => e
data/lib/souls/cli.rb CHANGED
@@ -1,25 +1,25 @@
1
1
  require "souls"
2
2
  module Souls
3
3
  class CLI < Thor
4
- desc "api [COMMAND]", "souls api Commands"
4
+ desc "api [COMMAND]", "SOULs API Commands"
5
5
  subcommand "api", API
6
6
 
7
- desc "gcloud [COMMAND]", "souls gcloud Commands"
7
+ desc "gcloud [COMMAND]", "SOULs Gcloud Commands"
8
8
  subcommand "gcloud", Gcloud
9
9
 
10
- desc "docker [COMMAND]", "souls docker Commands"
10
+ desc "docker [COMMAND]", "SOULs Docker Commands"
11
11
  subcommand "docker", Docker
12
12
 
13
- desc "create [COMMAND]", "souls create worker $worker_name"
13
+ desc "create [COMMAND]", "SOULs Create Worker"
14
14
  subcommand "create", Create
15
15
 
16
- desc "sync", "souls sync Commands"
16
+ desc "sync", " SOULs Sync Commands"
17
17
  subcommand "sync", Sync
18
18
 
19
- desc "upgrade", "souls upgrade Commands"
19
+ desc "upgrade", "SOULs Upgrade Commands"
20
20
  subcommand "upgrade", Upgrade
21
21
 
22
- desc "worker [COMMAND]", "souls worker Commands"
22
+ desc "worker [COMMAND]", "SOULs Worker Commands"
23
23
  subcommand "worker", Worker
24
24
 
25
25
  # rubocop:disable Style/StringHashKeys
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.53.0".freeze
2
+ VERSION = "0.53.4".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.32.0
1
+ 0.32.4
@@ -1 +1 @@
1
- 0.32.0
1
+ 0.32.4
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.53.0
4
+ version: 0.53.4
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-09-16 00:00:00.000000000 Z
13
+ date: 2021-09-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport