souls 0.26.3 → 0.26.7

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: de4eff0876018a8bd7068f3b5f3e8241813a15abb9e6cb1af26a40d8c4d559d9
4
- data.tar.gz: a0116cd30e3d448d26aeb37e39330efb93b8fcbce48a52dc4c18e4e45e70e947
3
+ metadata.gz: 07a268eb135f4ca4ea45eb8249231c9fc816695012de869aeb4b1df50fa2b25f
4
+ data.tar.gz: 994e784b8ecf513a97df0c2227a96b26c115d1dacc85c989d002e9f714deb204
5
5
  SHA512:
6
- metadata.gz: cf81a79b321003740af706da0e81818ca92f5663b154c83045cd9fb52768df0eecea14dc85d8d3851064a489bd0181ebd0177f7212bc3ce69fb41ec2ec47d6e5
7
- data.tar.gz: 922a6620c36b865eb47c2625425818669144f04b7472177adf99084795d036075ccce430c49cda6818a7805826310df803af010969e420830f512626144a5b93
6
+ metadata.gz: 27f41b2976489276d4597fce40e333f2bb314c34a6aa89178d4a74bc3ea9a45d74d635583a82c62ab8e6b2e11a836172d71afbb7edbb3cf01ba48d50d47d05b6
7
+ data.tar.gz: 2a2c09c4df16367eebd6144f2955d12782d3d6add3f7d37ebfa404ef02bd7e449775c54cc2698466ab7b1b9ff3559d9a2f8d84f08f7e7f27c4d6502f46e7ce57
data/exe/souls CHANGED
@@ -54,37 +54,7 @@ begin
54
54
  Whirly.status = "Done!"
55
55
  end
56
56
  when "release"
57
- system("gem install souls")
58
- sleep(3)
59
- current_souls_ver = Souls::VERSION.strip.split(".").map(&:to_i)
60
- prompt = TTY::Prompt.new
61
- choices = [
62
- "1. Patch(#{Souls.version_detector(current_ver: current_souls_ver, update_kind: 'patch')})",
63
- "2. Minor(#{Souls.version_detector(current_ver: current_souls_ver, update_kind: 'minor')})",
64
- "3. Major(#{Souls.version_detector(current_ver: current_souls_ver, update_kind: 'major')})"
65
- ]
66
- choice_num = prompt.select("Select Version: ", choices)[0].to_i
67
- update_kinds = %w[patch minor major]
68
- update_kind = update_kinds[choice_num - 1]
69
- souls_new_ver = Souls.version_detector(current_ver: current_souls_ver, update_kind: update_kind)
70
-
71
- status = Paint["Saving Repo...", :yellow]
72
- Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
73
- Whirly.status = status
74
- %w[api worker].each do |s_name|
75
- result = Paint[Souls.update_repo(service_name: s_name, update_kind: update_kind), :green]
76
- Whirly.status = result
77
- end
78
- Souls.overwrite_version(new_version: souls_new_ver)
79
- puts("before add")
80
- system("git add .")
81
- puts("before commit")
82
- system("git commit -m 'souls update v#{souls_new_ver}'")
83
- puts("before build")
84
- system("rake build")
85
- system("rake release")
86
- Whirly.status = Paint["soul-v#{souls_new_ver} successfully updated!"]
87
- end
57
+ Souls::Release.return_method
88
58
  when "update"
89
59
  puts(Paint["Coming soon..", :cyan])
90
60
  when "add"
data/lib/souls.rb CHANGED
@@ -3,6 +3,7 @@ require "active_support/core_ext/string/inflections"
3
3
  require_relative "souls/init"
4
4
  require_relative "souls/generate"
5
5
  require_relative "souls/gcloud"
6
+ require_relative "souls/release"
6
7
  require "dotenv/load"
7
8
  require "json"
8
9
  require "fileutils"
@@ -174,7 +175,6 @@ module Souls
174
175
  bucket_url = "gs://souls-bucket/boilerplates"
175
176
  file_name = "#{service_name}-v#{new_ver}.tgz"
176
177
  release_name = "#{service_name}-latest.tgz"
177
- update_service_gemfile(service_name: service_name)
178
178
 
179
179
  case current_dir_name
180
180
  when "souls"
@@ -257,7 +257,7 @@ module Souls
257
257
  end
258
258
  end
259
259
 
260
- def update_service_gemfile(service_name: "api")
260
+ def update_service_gemfile(service_name: "api", version: "0.0.1")
261
261
  file_dir = "./apps/#{service_name}"
262
262
  file_path = "#{file_dir}/Gemfile"
263
263
  gemfile_lock = "#{file_dir}/Gemfile.lock"
@@ -269,7 +269,7 @@ module Souls
269
269
  if gem[0] == "souls"
270
270
  old_ver = gem[1].split(".")
271
271
  old_ver[2] = (old_ver[2].to_i + 1).to_s
272
- new_line.write(" gem \"souls\", \"#{old_ver.join('.')}\"\n")
272
+ new_line.write(" gem \"souls\", \"#{version}\"\n")
273
273
  else
274
274
  new_line.write(line)
275
275
  end
data/lib/souls/init.rb CHANGED
@@ -33,8 +33,8 @@ module Souls
33
33
  file_name = "github.tgz"
34
34
  url = "https://storage.googleapis.com/souls-bucket/github_actions/github.tgz"
35
35
  system("curl -OL #{url}")
36
- FileUtils.mkdir("github")
37
- system("tar -zxvf ./#{file_name} -C #{app_name}/github/")
36
+ FileUtils.mkdir_p("#{app_name}/github")
37
+ system("tar -zxvf ./#{file_name} -C #{app_name}/")
38
38
  FileUtils.rm(file_name)
39
39
  end
40
40
 
@@ -74,12 +74,13 @@ module Souls
74
74
  choices = ["1. SOULs GraphQL API", "2. SOULs Pub/Sub Worker", "3. SOULs Frontend Web"]
75
75
  choice_num = prompt.select(Paint["Select Strain: ", :cyan], choices)[0].to_i
76
76
  case choice_num
77
- when 1, 2
77
+ when 1
78
78
  service_name = (strains[choice_num.to_i - 1]).to_s
79
79
  Souls::Init.download_souls(app_name: app_name, service_name: service_name)
80
80
  Souls::Init.mother_config_init(app_name: app_name)
81
81
  Souls::Init.download_github_actions(app_name: app_name)
82
82
  Souls::Init.initial_config_init(app_name: app_name, service_name: service_name)
83
+ Souls::Init.souls_api_credit(app_name: app_name, service_name: service_name)
83
84
  else
84
85
  puts(Paint["Coming Soon...", :blue])
85
86
  end
@@ -93,6 +94,9 @@ module Souls
93
94
  system("mkdir -p #{app_name}/apps/#{service_name}")
94
95
  system("tar -zxvf ./#{file_name} -C #{app_name}/apps/")
95
96
  FileUtils.rm(file_name)
97
+ end
98
+
99
+ def self.souls_api_credit(app_name: "souls", service_name: "api")
96
100
  line = Paint["====================================", :yellow]
97
101
  puts("\n")
98
102
  puts(line)
@@ -0,0 +1,6 @@
1
+ require_relative "./release/methods"
2
+
3
+ module Souls
4
+ module Release
5
+ end
6
+ end
@@ -0,0 +1,39 @@
1
+ module Souls
2
+ module Release
3
+ class << self
4
+ def return_method
5
+ system("gem install souls")
6
+ sleep(3)
7
+ current_souls_ver = Souls::VERSION.strip.split(".").map(&:to_i)
8
+ prompt = TTY::Prompt.new
9
+ choices = [
10
+ "1. Patch(#{Souls.version_detector(current_ver: current_souls_ver, update_kind: 'patch')})",
11
+ "2. Minor(#{Souls.version_detector(current_ver: current_souls_ver, update_kind: 'minor')})",
12
+ "3. Major(#{Souls.version_detector(current_ver: current_souls_ver, update_kind: 'major')})"
13
+ ]
14
+ choice_num = prompt.select("Select Version: ", choices)[0].to_i
15
+ update_kinds = %w[patch minor major]
16
+ update_kind = update_kinds[choice_num - 1]
17
+ souls_new_ver = Souls.version_detector(current_ver: current_souls_ver, update_kind: update_kind)
18
+ status = Paint["Saving Repo...", :yellow]
19
+ Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
20
+ Whirly.status = status
21
+ %w[api worker].each do |s_name|
22
+ Souls.update_service_gemfile(service_name: s_name, version: souls_new_ver)
23
+ result = Paint[Souls.update_repo(service_name: s_name, update_kind: update_kind), :green]
24
+ Whirly.status = result
25
+ end
26
+ Souls.overwrite_version(new_version: souls_new_ver)
27
+ puts("before add")
28
+ system("git add .")
29
+ puts("before commit")
30
+ system("git commit -m 'souls update v#{souls_new_ver}'")
31
+ puts("before build")
32
+ system("rake build")
33
+ system("rake release")
34
+ Whirly.status = Paint["soul-v#{souls_new_ver} successfully updated!"]
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.26.3".freeze
2
+ VERSION = "0.26.7".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.5.3
1
+ 0.5.7
@@ -1 +1 @@
1
- 0.5.3
1
+ 0.5.7
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.26.3
4
+ version: 0.26.7
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-08-03 00:00:00.000000000 Z
13
+ date: 2021-08-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -124,6 +124,8 @@ files:
124
124
  - lib/souls/generate/rspec_resolver.rb
125
125
  - lib/souls/generate/type.rb
126
126
  - lib/souls/init.rb
127
+ - lib/souls/release.rb
128
+ - lib/souls/release/methods.rb
127
129
  - lib/souls/version.rb
128
130
  - lib/souls/versions/.souls_api_version
129
131
  - lib/souls/versions/.souls_worker_version