souls 0.27.5 → 0.28.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: 21ebd7d8bb91fde713732f439fd25f57520c32a64143c217f8cdcaccdb112187
4
- data.tar.gz: c1316da014433a38503991657621c6e7b48920cd0462f8e8f182d27480f219ac
3
+ metadata.gz: 49c908dc83bdf0b58ef0dd1eb2a3dc4d46675402ecbbf4ee9cb6cc9b63769f59
4
+ data.tar.gz: fcce58ce89c03139074abae185cfc4ae9980de88c1d07e9643bbd2fcb5221baf
5
5
  SHA512:
6
- metadata.gz: 7cce79359a8c2ec8b9388d98b340cce2e9b9363b0ee19b15a71d90fe93ada037c452a2fa331fa0405817e39f5568e87d87c04037b19db68f954e31a795c3d00d
7
- data.tar.gz: 5a3b8eb674b32bc0a776ebd98ff90a30b915e7e0c9dc0cb57d7147921603588fb9d86b8b64f9e4f633511806ae5be856e35b944c2961f767192b2d71f61c4217
6
+ metadata.gz: 10f2d4f3c77f04bcbe9a2fe5f5468b850bbd7bd0d37a72ac2fcdd391a36aab39fdcf9da1d9e324b56adf5909db377f022b9e48e4b9cafd9ebb5c58e432e43048
7
+ data.tar.gz: 6de905afcf73eb15809ed9bb065f8b6ff2b5bfecb29f33985b5a1c2d9d70bc194b96ab40864a249312182c13794240568bc7d6c98cb9d36d8e6feaa44f2c038e
data/exe/souls CHANGED
@@ -12,13 +12,7 @@ begin
12
12
  args = ARGV
13
13
  Souls::Init.return_method(args)
14
14
  when "s", "server"
15
- strain = Souls.configuration.strain
16
- case strain
17
- when "media", "admin", "console", "doc"
18
- system("yarn dev")
19
- else
20
- system("foreman start -f Procfile.dev")
21
- end
15
+ system("foreman start -f Procfile.dev")
22
16
  when "c", "console"
23
17
  strain = Souls.configuration.strain
24
18
  case strain
@@ -44,7 +38,7 @@ begin
44
38
  Souls::Gcloud.return_method(args)
45
39
  Whirly.status = "Done!"
46
40
  end
47
- when "-v", "--version"
41
+ when "-v", "--version", "v", "version", "-version", "--v"
48
42
  puts(Paint[Souls::VERSION, :white])
49
43
  when "gem:update", "gemfile:update"
50
44
  status = Paint["Checking for updates...", :yellow]
@@ -56,11 +50,11 @@ begin
56
50
  when "release"
57
51
  Souls::Release.return_method
58
52
  when "model:update"
59
- status = Paint["Updating Models...", :yellow]
53
+ status = Paint["Syncing Models...", :yellow]
60
54
  Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
61
55
  Whirly.status = status
62
56
  Souls.update_models
63
- Whirly.status = "Done!"
57
+ Whirly.status = "API and Worker Both Models Synced!"
64
58
  end
65
59
  when "add"
66
60
  graphql_class = ARGV[1]
@@ -122,18 +116,6 @@ begin
122
116
  else
123
117
  system("rake db:migrate:reset && rake db:migrate:reset RACK_ENV=test")
124
118
  end
125
- when "db:update"
126
- strain = Souls.configuration.strain
127
- case strain
128
- when "api"
129
- other_app = Souls.configuration.worker_name
130
- when "worker"
131
- other_app = Souls.configuration.api_name
132
- else
133
- raise(StandardError, "Unknown app name!")
134
- end
135
- system("rm -rf ../#{other_app}/db/*")
136
- system("cp -r ./db/* ../#{other_app}/db/*")
137
119
  when "t", "test"
138
120
  system("rubocop -A")
139
121
  system("bundle exec rspec")
data/lib/souls/init.rb CHANGED
@@ -19,7 +19,7 @@ module Souls
19
19
  Souls.configure do |config|
20
20
  config.app = "#{app_name}"
21
21
  config.project_id = "souls-app"
22
- config.strain = "#{service_name}"
22
+ config.strain = "#{app_name}"
23
23
  config.github_repo = "elsoul/souls"
24
24
  config.worker_endpoint = "https://worker.test.com"
25
25
  config.fixed_gems = ["excluded_gem"]
@@ -48,7 +48,7 @@ module Souls
48
48
  f.write(<<~TEXT)
49
49
  Souls.configure do |config|
50
50
  config.app = "#{app_name}"
51
- config.project_id = "souls-app"
51
+ config.project_id = "#{app_name}"
52
52
  config.strain = "mother"
53
53
  config.github_repo = "elsoul/souls"
54
54
  config.worker_endpoint = "https://worker.test.com"
@@ -61,7 +61,6 @@ module Souls
61
61
  end
62
62
 
63
63
  def self.return_method(args)
64
- strains = %w[api worker console admin media doc].freeze
65
64
  app_name = args[1]
66
65
  if app_name.nil?
67
66
  puts(Paint["you need to specify your app name", :red])
@@ -69,20 +68,12 @@ module Souls
69
68
  exit
70
69
  end
71
70
 
72
- prompt = TTY::Prompt.new
73
- choices = ["1. SOULs GraphQL API", "2. SOULs Pub/Sub Worker", "3. SOULs Frontend Web"]
74
- choice_num = prompt.select(Paint["Select Strain: ", :cyan], choices)[0].to_i
75
- case choice_num
76
- when 1
77
- service_name = (strains[choice_num.to_i - 1]).to_s
78
- Souls::Init.download_souls(app_name: app_name, service_name: service_name)
79
- Souls::Init.mother_config_init(app_name: app_name)
80
- Souls::Init.download_github_actions(app_name: app_name)
81
- Souls::Init.initial_config_init(app_name: app_name, service_name: service_name)
82
- Souls::Init.souls_api_credit(app_name: app_name, service_name: service_name)
83
- else
84
- puts(Paint["Coming Soon...", :blue])
85
- end
71
+ service_name = "api"
72
+ Souls::Init.download_souls(app_name: app_name, service_name: service_name)
73
+ Souls::Init.mother_config_init(app_name: app_name)
74
+ Souls::Init.download_github_actions(app_name: app_name)
75
+ Souls::Init.initial_config_init(app_name: app_name, service_name: service_name)
76
+ Souls::Init.souls_api_credit(app_name: app_name, service_name: service_name)
86
77
  end
87
78
 
88
79
  def self.download_souls(app_name: "souls", service_name: "api")
@@ -93,6 +84,9 @@ module Souls
93
84
  system("mkdir -p #{app_name}/apps/#{service_name}")
94
85
  system("tar -zxvf ./#{file_name} -C #{app_name}/apps/")
95
86
  system("curl -OL https://storage.googleapis.com/souls-bucket/boilerplates/.rubocop.yml #{app_name}")
87
+ system("curl -OL https://storage.googleapis.com/souls-bucket/boilerplates/Gemfile #{app_name}")
88
+ system("curl -OL https://storage.googleapis.com/souls-bucket/boilerplates/Procfile.dev #{app_name}")
89
+ system("curl -OL https://storage.googleapis.com/souls-bucket/boilerplates/Procfile #{app_name}")
96
90
  FileUtils.rm(file_name)
97
91
  end
98
92
 
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.27.5".freeze
2
+ VERSION = "0.28.0".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.6.5
1
+ 0.7.0
@@ -1 +1 @@
1
- 0.6.5
1
+ 0.7.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: 0.27.5
4
+ version: 0.28.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-08-04 00:00:00.000000000 Z
13
+ date: 2021-08-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport