souls 0.7.2 → 0.7.8

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: 7edac3edfc81e8b26dcb983906fe05a793a7fcc54b948acc7ac563ee9de28656
4
- data.tar.gz: 06cc251724f61df779e368b3603c31b2c4a1ca17db9dcfa97719748624d1c2c3
3
+ metadata.gz: ef85bbedb445f7c3c65f6fdbc785de07dbcfa965440592ad3b338a1e65aa64b3
4
+ data.tar.gz: 395b1df6bff72559f72da482c4f6631ed12cd87b9d29dbfbfb8da4a5c475fb0c
5
5
  SHA512:
6
- metadata.gz: 8fbd9e534dd1974480c67f15e88477e646f5436b1a859af2b7f268295fc237c7870166508352086789f57cbdc7dc37c2a2d2deb1faecd3bbca91d7e1f798c9ce
7
- data.tar.gz: 1a52eb714f8360e1acf44ad228e9f33aeb875023fb3845ab912ca746bca9243680e1252578cd2aa5f616fb3e75f80223964b41b496dab3ab99ce7a197748a88c
6
+ metadata.gz: 3cffd9771dcdbaa5a522fbf168dafb604872761dac670d7dd4870e523c797d35c9a90410036ff72f215290432cb709a107e32590782caf51b341e5e1c3ee81e1
7
+ data.tar.gz: 3d5061da46408d32043d8c4df5f9092a05c46fd6ab28cd7be01815c40151711d62bdf4360ef5e2468491deeb8e061f92c02bca645778cd2d549cda8f6da94216
data/.irbrc CHANGED
@@ -1,3 +0,0 @@
1
- require "souls"
2
- require "./config/initialize/souls"
3
- require "google/cloud/firestore"
@@ -1 +1 @@
1
- 2.7.2
1
+ 3.0.0
data/Gemfile CHANGED
@@ -3,6 +3,6 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in souls.gemspec
4
4
  gemspec
5
5
 
6
- gem "mechanize", "2.7.6"
7
- gem "rake", "~> 12.0"
8
- gem "rspec", "~> 3.0"
6
+ gem "rake", "13.0.3"
7
+ gem "rspec", "3.1.0"
8
+ gem "steep", "0.39.0"
@@ -1,122 +1,72 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- SOULs (0.6.5)
5
- google-cloud-firestore (= 2.4.0)
6
- mechanize (= 2.7.6)
4
+ souls (0.7.5)
7
5
 
8
6
  GEM
9
7
  remote: https://rubygems.org/
10
8
  specs:
11
- addressable (2.7.0)
12
- public_suffix (>= 2.0.2, < 5.0)
9
+ activesupport (6.1.0)
10
+ concurrent-ruby (~> 1.0, >= 1.0.2)
11
+ i18n (>= 1.6, < 2)
12
+ minitest (>= 5.1)
13
+ tzinfo (~> 2.0)
14
+ zeitwerk (~> 2.3)
15
+ ast (2.4.1)
16
+ ast_utils (0.3.0)
17
+ parser (~> 2.4)
18
+ thor (>= 0.19)
13
19
  concurrent-ruby (1.1.7)
14
- connection_pool (2.2.3)
15
20
  diff-lcs (1.4.4)
16
- domain_name (0.5.20190701)
17
- unf (>= 0.0.5, < 1.0.0)
18
- faraday (1.1.0)
19
- multipart-post (>= 1.2, < 3)
20
- ruby2_keywords
21
- gapic-common (0.3.4)
22
- google-protobuf (~> 3.12, >= 3.12.2)
23
- googleapis-common-protos (>= 1.3.9, < 2.0)
24
- googleapis-common-protos-types (>= 1.0.4, < 2.0)
25
- googleauth (~> 0.9)
26
- grpc (~> 1.25)
27
- google-cloud-core (1.5.0)
28
- google-cloud-env (~> 1.0)
29
- google-cloud-errors (~> 1.0)
30
- google-cloud-env (1.4.0)
31
- faraday (>= 0.17.3, < 2.0)
32
- google-cloud-errors (1.0.1)
33
- google-cloud-firestore (2.4.0)
21
+ ffi (1.14.2)
22
+ i18n (1.8.7)
34
23
  concurrent-ruby (~> 1.0)
35
- google-cloud-core (~> 1.5)
36
- google-cloud-firestore-v1 (~> 0.0)
37
- rbtree (~> 0.4.2)
38
- google-cloud-firestore-v1 (0.2.2)
39
- gapic-common (~> 0.3)
40
- google-cloud-errors (~> 1.0)
41
- google-protobuf (3.14.0)
42
- googleapis-common-protos (1.3.10)
43
- google-protobuf (~> 3.11)
44
- googleapis-common-protos-types (>= 1.0.5, < 2.0)
45
- grpc (~> 1.27)
46
- googleapis-common-protos-types (1.0.5)
47
- google-protobuf (~> 3.11)
48
- googleauth (0.14.0)
49
- faraday (>= 0.17.3, < 2.0)
50
- jwt (>= 1.4, < 3.0)
51
- memoist (~> 0.16)
52
- multi_json (~> 1.11)
53
- os (>= 0.9, < 2.0)
54
- signet (~> 0.14)
55
- grpc (1.32.0)
56
- google-protobuf (~> 3.13)
57
- googleapis-common-protos-types (~> 1.0)
58
- http-cookie (1.0.3)
59
- domain_name (~> 0.5)
60
- jwt (2.2.2)
61
- mechanize (2.7.6)
62
- domain_name (~> 0.5, >= 0.5.1)
63
- http-cookie (~> 1.0)
64
- mime-types (>= 1.17.2)
65
- net-http-digest_auth (~> 1.1, >= 1.1.1)
66
- net-http-persistent (>= 2.5.2)
67
- nokogiri (~> 1.6)
68
- ntlm-http (~> 0.1, >= 0.1.1)
69
- webrobots (>= 0.0.9, < 0.2)
70
- memoist (0.16.2)
71
- mime-types (3.3.1)
72
- mime-types-data (~> 3.2015)
73
- mime-types-data (3.2020.1104)
74
- mini_portile2 (2.4.0)
75
- multi_json (1.15.0)
76
- multipart-post (2.1.1)
77
- net-http-digest_auth (1.4.1)
78
- net-http-persistent (4.0.0)
79
- connection_pool (~> 2.2)
80
- nokogiri (1.10.10)
81
- mini_portile2 (~> 2.4.0)
82
- ntlm-http (0.1.1)
83
- os (1.1.1)
84
- public_suffix (4.0.6)
85
- rake (12.3.3)
86
- rbtree (0.4.2)
87
- rspec (3.9.0)
88
- rspec-core (~> 3.9.0)
89
- rspec-expectations (~> 3.9.0)
90
- rspec-mocks (~> 3.9.0)
91
- rspec-core (3.9.3)
92
- rspec-support (~> 3.9.3)
93
- rspec-expectations (3.9.2)
24
+ language_server-protocol (3.15.0.1)
25
+ listen (3.4.0)
26
+ rb-fsevent (~> 0.10, >= 0.10.3)
27
+ rb-inotify (~> 0.9, >= 0.9.10)
28
+ minitest (5.14.2)
29
+ parser (2.7.2.0)
30
+ ast (~> 2.4.1)
31
+ rainbow (3.0.0)
32
+ rake (13.0.3)
33
+ rb-fsevent (0.10.4)
34
+ rb-inotify (0.10.1)
35
+ ffi (~> 1.0)
36
+ rbs (1.0.0)
37
+ rspec (3.1.0)
38
+ rspec-core (~> 3.1.0)
39
+ rspec-expectations (~> 3.1.0)
40
+ rspec-mocks (~> 3.1.0)
41
+ rspec-core (3.1.7)
42
+ rspec-support (~> 3.1.0)
43
+ rspec-expectations (3.1.2)
94
44
  diff-lcs (>= 1.2.0, < 2.0)
95
- rspec-support (~> 3.9.0)
96
- rspec-mocks (3.9.1)
97
- diff-lcs (>= 1.2.0, < 2.0)
98
- rspec-support (~> 3.9.0)
99
- rspec-support (3.9.3)
100
- ruby2_keywords (0.0.2)
101
- signet (0.14.0)
102
- addressable (~> 2.3)
103
- faraday (>= 0.17.3, < 2.0)
104
- jwt (>= 1.5, < 3.0)
105
- multi_json (~> 1.10)
106
- unf (0.1.4)
107
- unf_ext
108
- unf_ext (0.0.7.7)
109
- webrobots (0.1.2)
45
+ rspec-support (~> 3.1.0)
46
+ rspec-mocks (3.1.3)
47
+ rspec-support (~> 3.1.0)
48
+ rspec-support (3.1.2)
49
+ steep (0.39.0)
50
+ activesupport (>= 5.1)
51
+ ast_utils (~> 0.3.0)
52
+ language_server-protocol (~> 3.15.0.1)
53
+ listen (~> 3.0)
54
+ parser (~> 2.7.0)
55
+ rainbow (>= 2.2.2, < 4.0)
56
+ rbs (~> 1.0.0)
57
+ thor (1.0.1)
58
+ tzinfo (2.0.4)
59
+ concurrent-ruby (~> 1.0)
60
+ zeitwerk (2.4.2)
110
61
 
111
62
  PLATFORMS
112
63
  ruby
113
64
 
114
65
  DEPENDENCIES
115
- SOULs!
116
- google-cloud-firestore (= 2.4.0)
117
- mechanize (= 2.7.6)
118
- rake (~> 12.0)
119
- rspec (~> 3.0)
66
+ rake (= 13.0.3)
67
+ rspec (= 3.1.0)
68
+ souls!
69
+ steep (= 0.39.0)
120
70
 
121
71
  BUNDLED WITH
122
- 2.1.4
72
+ 2.2.4
@@ -0,0 +1,9 @@
1
+ # Steepfile
2
+
3
+ target :app do
4
+ signature "lib/souls/"
5
+
6
+ # check 'app'
7
+ check "rbs"
8
+
9
+ end
data/exe/souls CHANGED
@@ -41,8 +41,23 @@ begin
41
41
  Souls::Init.config
42
42
  when "-v", "--version"
43
43
  puts Souls::VERSION
44
- when "test"
45
- system "ruby greeter_client.rb 'SOULS TEST RUN!'"
44
+ when "g", "generate"
45
+ `touch .rubocop.yml`
46
+ `touch .env`
47
+ `touch .gitignore`
48
+ `touch .irbrc`
49
+ when "t", "test"
50
+ case ARGV[1]
51
+ when "-r"
52
+ `bundle exec rspec`
53
+ when "-s"
54
+ `bundle exec steep check`
55
+ else
56
+ `bundle exec steep check`
57
+ `bundle exec rspec`
58
+ end
59
+ when "deploy"
60
+ `gcloud builds submit --config=cloudbuild.yml --project $PROJECT_ID`
46
61
  else
47
62
  puts "Welcome to Souls!Yeah!"
48
63
  end
@@ -1,6 +1,6 @@
1
1
  require "souls/version"
2
2
  require "souls/init"
3
- require "google/cloud/firestore"
3
+ require "json"
4
4
 
5
5
  module Souls
6
6
  class Error < StandardError; end
@@ -193,8 +193,8 @@ module Souls
193
193
  end
194
194
 
195
195
  def create_namespace
196
- app = Souls.configuration.app
197
- system("kubectl create namespace #{app}")
196
+ namespace = Souls.configuration.namespace
197
+ system("kubectl create namespace #{namespace}")
198
198
  end
199
199
 
200
200
  def create_ip
@@ -246,13 +246,13 @@ module Souls
246
246
  app = Souls.configuration.app
247
247
  namespace = Souls.configuration.namespace
248
248
  domain = Souls.configuration.domain
249
- `echo "#{domain}. 300 IN A $(kubectl get ingress --namespace #{namespace} | grep #{app} | awk '{print $3}')" >> ./infra/config/dns_conf`
249
+ `echo "#{domain}. 300 IN A $(kubectl get ingress --namespace #{namespace} | grep #{app} | awk '{print $3}')" >> ./infra/dns_conf`
250
250
  "created dns file!"
251
251
  end
252
252
 
253
253
  def set_dns
254
254
  project_id = Souls.configuration.project_id
255
- `gcloud dns record-sets import -z=#{project_id} --zone-file-format ./infra/config/dns_conf`
255
+ `gcloud dns record-sets import -z=#{project_id} --zone-file-format ./infra/dns_conf`
256
256
  end
257
257
 
258
258
  def update_container zone: :asia
@@ -1,5 +1,3 @@
1
- require "mechanize"
2
-
3
1
  module Souls
4
2
  STRAINS = ["service", "api", "graph", "media", "admin"]
5
3
  module Init
@@ -73,9 +71,10 @@ module Souls
73
71
  end
74
72
 
75
73
  def get_version repository_name: "souls_service"
76
- agent = Mechanize.new
77
- page = agent.get("https://github.com/elsoul/#{repository_name}/releases")
78
- page.search("span.css-truncate-target")[0].to_s.scan(/^*+>(.+)</)[0][0].to_s
74
+ data = JSON.parse `curl \
75
+ -H "Accept: application/vnd.github.v3+json" \
76
+ -s https://api.github.com/repos/elsoul/#{repository_name}/releases`
77
+ data[0]["tag_name"]
79
78
  end
80
79
 
81
80
  def download_souls app_name: "souls", repository_name: "souls_service"
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.8"
3
3
  end
@@ -0,0 +1,2 @@
1
+ module Souls
2
+ end
@@ -24,5 +24,4 @@ Gem::Specification.new do |spec|
24
24
  spec.bindir = "exe"
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
27
- spec.add_dependency("mechanize", "2.7.6")
28
27
  end
Binary file
metadata CHANGED
@@ -1,30 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
8
8
  - KishiTheMechanic
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-01-02 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: mechanize
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '='
19
- - !ruby/object:Gem::Version
20
- version: 2.7.6
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - '='
26
- - !ruby/object:Gem::Version
27
- version: 2.7.6
12
+ date: 2021-01-05 00:00:00.000000000 Z
13
+ dependencies: []
28
14
  description: SOULS is a Web Application Framework for Microservices on Multi Cloud
29
15
  Platform such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud.
30
16
  Auto deploy with scalable condition. You can focus on business logic. No more infra
@@ -49,6 +35,7 @@ files:
49
35
  - LICENSE.txt
50
36
  - README.md
51
37
  - Rakefile
38
+ - Steepfile
52
39
  - bin/console
53
40
  - bin/setup
54
41
  - config/initializers/souls.rb
@@ -56,7 +43,9 @@ files:
56
43
  - lib/souls.rb
57
44
  - lib/souls/init.rb
58
45
  - lib/souls/version.rb
46
+ - rbs/init.rbs
59
47
  - souls.gemspec
48
+ - v0.0.8.tar.gz
60
49
  homepage: https://github.com/elsoul/souls
61
50
  licenses:
62
51
  - Apache-2.0
@@ -64,7 +53,7 @@ metadata:
64
53
  homepage_uri: https://github.com/elsoul/souls
65
54
  source_code_uri: https://github.com/elsoul/souls
66
55
  changelog_uri: https://github.com/elsoul/souls
67
- post_install_message:
56
+ post_install_message:
68
57
  rdoc_options: []
69
58
  require_paths:
70
59
  - lib
@@ -79,8 +68,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
68
  - !ruby/object:Gem::Version
80
69
  version: '0'
81
70
  requirements: []
82
- rubygems_version: 3.1.4
83
- signing_key:
71
+ rubygems_version: 3.2.3
72
+ signing_key:
84
73
  specification_version: 4
85
74
  summary: SOULS is a Web Application Framework for Microservices on Multi Cloud Platform
86
75
  such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud. Auto deploy