souls 0.27.8 → 0.28.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af97bcebd4feabe61b2f9f32d8c67d33f2d3e0bb0cf452cda426adc4e3ef0b28
4
- data.tar.gz: 4482a622136b54b2a4bb687e64e111394cff422a8488e0136f59b67b9f942f43
3
+ metadata.gz: 49c908dc83bdf0b58ef0dd1eb2a3dc4d46675402ecbbf4ee9cb6cc9b63769f59
4
+ data.tar.gz: fcce58ce89c03139074abae185cfc4ae9980de88c1d07e9643bbd2fcb5221baf
5
5
  SHA512:
6
- metadata.gz: 3c8d198143dc0220551d1a240b9053ca9eb41e6038e3c123ff073c03681b6413ec669d9e8c94204f00624223c7e885a1d2da5f35a50adf47d43a9717af7ae8c4
7
- data.tar.gz: 8fc506abe042515b6d539e81698e094102524b90075d47ac18d89f95e27f31f2a7997900ba4e9800e47dd794d3110bf0602e0e4bb1375a11486f98b43948fb21
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.8".freeze
2
+ VERSION = "0.28.0".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.6.8
1
+ 0.7.0
@@ -1 +1 @@
1
- 0.6.8
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.8
4
+ version: 0.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI