souls 1.0.9 → 1.2.0

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: f2e4e81d37978401e1b2d6059fb3a0cf574d43b8e59a8953c51801dc7e5da7ce
4
- data.tar.gz: 8dbe42fc0414c628f07ac5cb31d7971bf0ca3c8b983d5046ffccd8719cb5bf87
3
+ metadata.gz: 88330b37a9727d21e018e0415ee1c9fb13954d78397dd099d7c7273e99831369
4
+ data.tar.gz: edb15c60919ef2a5ba510652e546fb7438cdd5dc32760f10cdd8e729d4aa3f92
5
5
  SHA512:
6
- metadata.gz: 3409a01fba431f0a2c81344176fa7b074b758e639bf0536fd27eebb5883d792226e32de25aa07782de68518c493e589a8347a24d44455824dbc23d0be733ba7e
7
- data.tar.gz: acd633a4aaad9c88731a30bad58bcc058914e5c3e795c5e48f257b80736a86bc39097dd52b2dcd6fce3fd44076b345e89e8488dd97ce09bbba08b67fd1f20abe
6
+ metadata.gz: 4252ee302de5e2cbd99cbb67f33d868ecb38929d0dd4af71e58c7d20aae2b44f26b8071af3f4ae1ead6bac67aaa2f8d47ebb1ead5b8c3b6ad9cddbe87f87cece
7
+ data.tar.gz: 42a8d5649089e2212cbe79c9e4e3a8496acbb32374707defc1f67f7f2eb53ff2e8abb9bc20219cb73df5289f78e9adb2d1f1d9da4945dae1c7e88429272e82c6
data/README.md CHANGED
@@ -21,6 +21,11 @@
21
21
 
22
22
  - [Go to SOULs Document](https://souls.elsoul.nl/)
23
23
 
24
+ <p>
25
+ <a aria-label="SOULs Document" href="https://souls.elsoul.nl/">
26
+ <img src="https://souls.elsoul.nl/imgs/gifs/souls-new-video.gif">
27
+ </a>
28
+ </p>
24
29
 
25
30
  ## What's SOULs?
26
31
 
@@ -33,14 +38,30 @@ Powered by Ruby GraphQL, RBS/Steep, Active Record, RSpec, RuboCop, and Google Cl
33
38
  - Maximize development efficiency with CI / CD standard schema-driven Scaffold
34
39
  - Achieve global scale with lower management costs
35
40
 
36
- ![画像](https://souls.elsoul.nl/imgs/docs/SOULs-architecture.jpg)
37
-
41
+ ![SOULs Architecture](https://souls.elsoul.nl/imgs/docs/SOULs-architecture.jpg)
38
42
 
39
43
  SOULs creates 2 types of APP.
40
44
 
41
45
  1. API - GraphQL (Ruby) - Simple API - Cloud Run
42
46
  2. Worker - Google Pub/Sub Messaging Worker API (Ruby) - Cloud Run
43
47
 
48
+ ## Ruby type checking
49
+ The SOULs framework uses RBS / Steep, which appeared in Ruby 3.0.
50
+
51
+ - [RBS](https://github.com/ruby/rbs/)
52
+ - [Steep](https://github.com/soutaro/steep/)
53
+
54
+ As a result, typos, column types, etc.
55
+
56
+ It is a development environment where you can immediately notice the mistakes that occur frequently.
57
+
58
+ <p>
59
+ <a aria-label="RBS Demo" href="https://souls.elsoul.nl/ja/docs/guides/basic/type-check/">
60
+ <img src="https://souls.elsoul.nl/imgs/gifs/rbs-video.gif">
61
+ </a>
62
+ </p>
63
+
64
+
44
65
  ## Dependency
45
66
 
46
67
  - [Google SDK](https://cloud.google.com/sdk/docs)
@@ -94,6 +115,12 @@ Check your GraphQL PlayGround
94
115
 
95
116
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `souls t` to run the tests. You can also run `souls c` for an interactive prompt that will allow you to experiment.
96
117
 
118
+ You need to add submodule
119
+
120
+ ```bash
121
+ git submodule add -f https://github.com/ruby/gem_rbs_collection.git vendor/rbs/gem_rbs_collection
122
+ ```
123
+
97
124
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org/gems/souls).
98
125
 
99
126
  ## Contributing
@@ -7,7 +7,11 @@ module Souls
7
7
  create_service_account_key
8
8
  Souls::Gcloud.new.enable_permissions
9
9
  add_permissions
10
- export_key_to_console
10
+ begin
11
+ set_gh_secret_json
12
+ rescue StandardError
13
+ export_key_to_console
14
+ end
11
15
  rescue Thor::Error => e
12
16
  raise(Thor::Error, e)
13
17
  end
@@ -95,5 +99,11 @@ module Souls
95
99
  add_service_account_role(role: role)
96
100
  end
97
101
  end
102
+
103
+ def set_gh_secret_json
104
+ file_path = "config/keyfile.json"
105
+ system("gh secret set GCP_SA_KEY < #{file_path}")
106
+ FileUtils.rm(file_path)
107
+ end
98
108
  end
99
109
  end
@@ -0,0 +1,22 @@
1
+ module Souls
2
+ class Github < Thor
3
+ desc "auth_login", "gcloud config set and gcloud auth login"
4
+ def auth_login
5
+ system("gh auth login")
6
+ rescue Thor::Error => e
7
+ raise(Thor::Error, e)
8
+ end
9
+
10
+ desc "secret_set", "Github Secret Set by Github CLI"
11
+ def secret_set
12
+ require("#{Souls.get_api_path}/config/souls")
13
+ file_path = ".env.production"
14
+ File.open(file_path, "r") do |file|
15
+ file.each_line do |line|
16
+ key_and_value = line.split("=")
17
+ system("gh secret set #{key_and_value[0]} -b \"#{key_and_value[1]}\"")
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -1,5 +1,6 @@
1
1
  require_relative "./console/index"
2
2
  require_relative "./generate/index"
3
+ require_relative "./github/index"
3
4
  require_relative "./update/index"
4
5
  require_relative "./create/index"
5
6
  require_relative "./db/index"
data/lib/souls/cli.rb CHANGED
@@ -4,6 +4,9 @@ module Souls
4
4
  desc "generate [COMMAND]", "SOULs Generate Commands"
5
5
  subcommand "generate", Generate
6
6
 
7
+ desc "github [COMMAND]", "SOULs Github Commands"
8
+ subcommand "github", Github
9
+
7
10
  desc "update [COMMAND]", "SOULs Update Commands"
8
11
  subcommand "update", Update
9
12
 
@@ -32,6 +35,7 @@ module Souls
32
35
  map "c" => :console
33
36
  map "s" => :server
34
37
  map "g" => :generate
38
+ map "gh" => :github
35
39
  map "t" => :test
36
40
  map "d" => :delete
37
41
  map ["-v", "--v", "--version", "-version"] => :version
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.0.9".freeze
2
+ VERSION = "1.2.0".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.0.9
1
+ 1.2.0
@@ -1 +1 @@
1
- 1.0.9
1
+ 1.2.0
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: 1.0.9
4
+ version: 1.2.0
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-10-13 00:00:00.000000000 Z
13
+ date: 2021-10-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -197,6 +197,7 @@ files:
197
197
  - lib/souls/cli/generate/rspec_resolver.rb
198
198
  - lib/souls/cli/generate/type.rb
199
199
  - lib/souls/cli/generate/type_rbs.rb
200
+ - lib/souls/cli/github/index.rb
200
201
  - lib/souls/cli/index.rb
201
202
  - lib/souls/cli/init/index.rb
202
203
  - lib/souls/cli/release/index.rb