souls 0.22.6 → 0.23.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: bd2faa6f8e7051a032899708b1dd4bb76d7b26d4356152524033c8d5c681d53c
4
- data.tar.gz: c348b3a03e2d0424194840c35b30406d5ce8915eb38fe0f98dab027a254d76fb
3
+ metadata.gz: '099412f555b33244d7d6aa52ba4f3bc56d80e3a141166306f0934dfea16c4663'
4
+ data.tar.gz: cd338c18fa055b6456144a02272ec716cacdb21cd2dd94ca11289a3964dcfe53
5
5
  SHA512:
6
- metadata.gz: 1540b390438a9f73da430fa2ffa7fa29bd134ab043e2aec9e5758f6b26ea381be1990050a6c8c77b2fe1293aadab086937c2b8dd0f93fda84eb72696ef9000a8
7
- data.tar.gz: c3de92ab1a4305b7e4ca21cb07f31c3ee3e849d18c8d702892394fb761d42bd7cc8f778b35c4f4766af4083e6a1d6e150d71f9d43c2d8cb1d5cf653f2f945d50
6
+ metadata.gz: de83001db9604bfaf3a8c1c7ed802e477bb1330bbc6991dae6e97966f3e52d672cd7c80b5e63551c789c033a62ba29dc203a084a75b8b7f21c0f7bd29feae250
7
+ data.tar.gz: 956c60cb281e4374ccd9d3d720adccf765404f9f617fe5c41324e6b4590a3133d6949af61bcc58a996e4a9793caf81cb2707c2dc819725b58f2a31b435f017d6
data/Gemfile.lock CHANGED
@@ -1,7 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- souls (0.22.5)
4
+ souls (0.22.9)
5
+ paint (= 2.2.1)
6
+ whirly (= 0.3.0)
5
7
 
6
8
  GEM
7
9
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -75,7 +75,7 @@ And Create Your APP
75
75
 
76
76
  ## SOULs Document
77
77
 
78
- - [SOULs Document](https://souls-doc.el-soul.com/)
78
+ - [SOULs Document](https://souls.elsoul.nl/)
79
79
 
80
80
 
81
81
 
data/exe/souls CHANGED
@@ -8,20 +8,37 @@ end
8
8
  begin
9
9
  case ARGV[0]
10
10
  when "new"
11
- STRAINS = ["api", "worker", "media", "admin"]
11
+ STRAINS = ["api", "worker", "console", "admin", "media"]
12
12
  if ARGV[1].nil?
13
- puts "you need to specify your app name \n `souls new app_name`"
13
+ puts Paint["you need to specify your app name", :red]
14
+ puts Paint["`souls new app_name`", :yellow]
14
15
  exit
15
16
  end
16
- puts "Which framework: \n 1. SOULs GraphQL API \n 2. SOULs Worker \n 3. SOULs Media Web \n 4. SOULs Admin Web \n Enter Number: "
17
+ first_message = Paint % [
18
+ "Select Strain: %{red_text} %{yellow_text} %{green_text} %{blue_text} %{cyan_text}",
19
+ :white,
20
+ {
21
+ red_text: ["\n1. SOULs GraphQL API", :red],
22
+ yellow_text: ["\n2. SOULs Worker", :yellow],
23
+ green_text: ["\n3. SOULs Console Web", :green],
24
+ blue_text: ["\n4. SOULs Admin Web", :blue],
25
+ cyan_text: ["\n5. SOULs Media Web", :cyan]
26
+ }
27
+ ]
28
+ puts first_message
17
29
  strain = STDIN.gets.chomp.to_i
18
- (1..4).include?(strain) ? puts("Generating SOULs.. \n") : raise(StandardError, "Choose Number 1..4")
19
- Souls::Init.download_souls app_name: ARGV[1], repository_name: "souls_#{STRAINS[strain.to_i - 1]}"
20
- Souls::Init.initial_config_init app_name: ARGV[1], strain: STRAINS[strain.to_i - 1]
30
+ case strain
31
+ when 1, 2
32
+ Souls::Init.download_souls app_name: ARGV[1], repository_name: "souls_#{STRAINS[strain.to_i - 1]}"
33
+ Souls::Init.initial_config_init app_name: ARGV[1], strain: STRAINS[strain.to_i - 1]
34
+ else
35
+ puts Paint["Coming Soon...", :blue]
36
+ end
37
+
21
38
  when "s", "server"
22
39
  strain = Souls.configuration.strain
23
40
  case strain
24
- when "media", "admin"
41
+ when "media", "admin", "console"
25
42
  system "yarn dev"
26
43
  when "worker"
27
44
  system "bundle exec puma -p 3000 -e development"
@@ -49,7 +66,7 @@ begin
49
66
  puts Souls::VERSION
50
67
  when "gem:update", "gemfile:update"
51
68
  status = Paint["Checking for updates...", :yellow]
52
- Whirly.start spinner: "clock", color: :false, interval: 1000, stop: "🎉" do
69
+ Whirly.start spinner: "clock", interval: 1000, stop: "🎉" do
53
70
  Whirly.status = status
54
71
  Souls.update_gemfile
55
72
  Whirly.status = "Done!"
@@ -169,10 +186,8 @@ begin
169
186
  when "deploy"
170
187
  system "gcloud builds submit --config=cloudbuild.yml --project #{ARGV[1]}"
171
188
  else
172
- puts "Welcome to SOULs!"
189
+ puts Paint["Welcome to SOULs!", :green]
173
190
  end
174
191
  rescue StandardError => error
175
- puts error.backtrace
176
- puts "Thank you!!"
177
- puts "SOULs"
192
+ puts Paint["Something Wrong...", :red]
178
193
  end
data/lib/souls.rb CHANGED
@@ -96,7 +96,11 @@ module Souls
96
96
  updated_gems << (gem[0]).to_s
97
97
  updated_gem_versions << data["version"]
98
98
  system "gem update #{gem[0]}"
99
- console_log << "#{gem[0]} v#{gem[1]} → v#{data["version"]}"
99
+ console_log << if gem[0] == "souls"
100
+ "#{gem[0]} v#{gem[1]} → v#{data["version"]}\n\nSOULs Doc: https://souls.elsoul.nl"
101
+ else
102
+ "#{gem[0]} v#{gem[1]} → v#{data["version"]}"
103
+ end
100
104
  end
101
105
  end
102
106
  {
@@ -11,7 +11,7 @@ module Souls
11
11
  end
12
12
  EOS
13
13
  end
14
- puts "Created file! : #{file_path}"
14
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
15
15
  file_path
16
16
  rescue StandardError => e
17
17
  raise StandardError, e
@@ -11,7 +11,7 @@ module Souls
11
11
  end
12
12
  EOS
13
13
  end
14
- puts "Created file! : #{file_path}"
14
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
15
15
  file_path
16
16
  rescue StandardError => e
17
17
  raise StandardError, e
@@ -13,7 +13,7 @@ module Souls
13
13
  end
14
14
  EOS
15
15
  end
16
- puts "Created file! : #{file_path}"
16
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
17
17
  file_path
18
18
  rescue StandardError => e
19
19
  raise StandardError, e
@@ -270,7 +270,7 @@ module Souls
270
270
  update_mutation(class_name: singularized_class_name)
271
271
  delete_mutation(class_name: singularized_class_name)
272
272
  destroy_delete_mutation(class_name: singularized_class_name)
273
- puts "Created file! : #{file_path}"
273
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
274
274
  file_path
275
275
  rescue StandardError => e
276
276
  raise StandardError, e
@@ -42,7 +42,7 @@ module Souls
42
42
  end
43
43
  EOS
44
44
  end
45
- puts "Created file! : #{file_path}"
45
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
46
46
  file_path
47
47
  rescue StandardError => e
48
48
  raise StandardError, e
@@ -20,7 +20,7 @@ module Souls
20
20
  end
21
21
  EOS
22
22
  end
23
- puts "Created file! : #{file_path}"
23
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
24
24
  file_path
25
25
  rescue StandardError => e
26
26
  raise StandardError, e
@@ -45,7 +45,7 @@ module Souls
45
45
  end
46
46
  end
47
47
  EOS
48
- puts "Created file! : #{file_path}"
48
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
49
49
  file_path
50
50
  rescue StandardError => e
51
51
  raise StandardError, e
@@ -145,7 +145,7 @@ module Souls
145
145
  resolver_after_params class_name: singularized_class_name
146
146
  resolver_before_end class_name: singularized_class_name
147
147
  resolver_end class_name: singularized_class_name
148
- puts "Created file! : #{file_path}"
148
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
149
149
  file_path
150
150
  rescue StandardError => e
151
151
  raise StandardError, e
@@ -58,7 +58,7 @@ module Souls
58
58
  rspec_factory_head class_name: singularized_class_name
59
59
  rspec_factory_params class_name: singularized_class_name
60
60
  rspec_factory_end class_name: singularized_class_name
61
- puts "Created file! : #{file_path}"
61
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
62
62
  file_path
63
63
  rescue StandardError => e
64
64
  raise StandardError, e
@@ -16,7 +16,7 @@ module Souls
16
16
  end
17
17
  EOS
18
18
  end
19
- puts "Created file! : #{file_path}"
19
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
20
20
  file_path
21
21
  rescue StandardError => e
22
22
  raise StandardError, e
@@ -243,7 +243,7 @@ module Souls
243
243
  rspec_mutation_params class_name: singularized_class_name
244
244
  rspec_mutation_params_response class_name: singularized_class_name
245
245
  rspec_mutation_end class_name: singularized_class_name
246
- puts "Created file! : #{file_path}"
246
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
247
247
  file_path
248
248
  rescue StandardError => e
249
249
  raise StandardError, e
@@ -36,7 +36,7 @@ module Souls
36
36
  end
37
37
  EOS
38
38
  end
39
- puts "Created file! : #{file_path}"
39
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
40
40
  file_path
41
41
  rescue StandardError => e
42
42
  raise StandardError, e
@@ -164,7 +164,7 @@ break
164
164
  rspec_query_after_head class_name: singularized_class_name
165
165
  rspec_query_params class_name: singularized_class_name
166
166
  rspec_query_end class_name: singularized_class_name
167
- puts "Created file! : #{file_path}"
167
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
168
168
  file_path
169
169
  rescue StandardError => e
170
170
  raise StandardError, e
@@ -183,7 +183,7 @@ module Souls
183
183
  rspec_resolver_after_head class_name: singularized_class_name
184
184
  rspec_resolver_params class_name: singularized_class_name
185
185
  rspec_resolver_end class_name: singularized_class_name
186
- puts "Created file! : #{file_path}"
186
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
187
187
  file_path
188
188
  rescue StandardError => e
189
189
  raise StandardError, e
@@ -60,7 +60,7 @@ module Souls
60
60
  create_type_head class_name: singularized_class_name
61
61
  create_type_params class_name: singularized_class_name
62
62
  create_type_end class_name: singularized_class_name
63
- puts "Created file! : #{file_path}"
63
+ puts Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }]
64
64
  file_path
65
65
  rescue StandardError => e
66
66
  raise StandardError, e
data/lib/souls/init.rb CHANGED
@@ -29,8 +29,11 @@ module Souls
29
29
  system "tar -zxvf ./#{version}.tar.gz"
30
30
  system "mkdir #{app_name}"
31
31
  folder = version.delete "v"
32
- system "cp -r #{repository_name}-#{folder}/. #{app_name}/"
33
- system "rm -rf #{version}.tar.gz && rm -rf #{repository_name}-#{folder}"
32
+ `cp -r #{repository_name}-#{folder}/. #{app_name}/`
33
+ `rm -rf #{version}.tar.gz && rm -rf #{repository_name}-#{folder}`
34
+ line = Paint["====================================", :yellow]
35
+ puts "\n"
36
+ puts line
34
37
  txt = <<~TEXT
35
38
  _____ ____ __ ____#{' '}
36
39
  / ___// __ \\/ / / / / _____
@@ -38,13 +41,17 @@ module Souls
38
41
  ___/ / /_/ / /_/ / /___(__ )#{' '}
39
42
  /____/\\____/\\____/_____/____/#{' '}
40
43
  TEXT
41
- puts txt
42
- puts "=============================="
43
- puts "Welcome to SOULs!"
44
- puts "SOULs Version: #{Souls::VERSION}"
45
- puts "=============================="
46
- puts "$ cd #{app_name}"
47
- puts "------------------------------"
44
+ message = Paint[txt, :blue]
45
+ puts message
46
+ puts line
47
+ welcome = Paint["Welcome to SOULs!", :white]
48
+ puts welcome
49
+ souls_ver = Paint["SOULs Version: #{Souls::VERSION}", :white]
50
+ puts souls_ver
51
+ puts line
52
+ cd = Paint["Easy to Run\n$ cd #{app_name}\n$ bundle\n$ souls s\nGo To : http://localhost:3000\n\nDoc: https://souls.elsoul.nl", :white]
53
+ puts cd
54
+ puts line
48
55
  end
49
56
  end
50
57
  end
data/lib/souls/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.22.6"
2
+ VERSION = "0.23.0"
3
3
  end
data/souls.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
 
9
9
  spec.summary = "SOULs is a Serverless Application Framework. SOULs has four strains, API, Worker, Console, Media, and can be used in combination according to the purpose. SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google Cloud and Amazon Web Services"
10
10
  spec.description = "SOULs is a Serverless Application Framework. SOULs has four strains, API, Worker, Console, Media, and can be used in combination according to the purpose. SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google Cloud and Amazon Web Services"
11
- spec.homepage = "https://github.com/elsoul/souls"
11
+ spec.homepage = "https://souls.elsoul.nl"
12
12
  spec.license = "Apache-2.0"
13
13
  spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
14
14
 
@@ -24,4 +24,6 @@ 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_runtime_dependency "paint", "2.2.1"
28
+ spec.add_runtime_dependency "whirly", "0.3.0"
27
29
  end
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.22.6
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -11,7 +11,35 @@ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
13
  date: 2021-07-14 00:00:00.000000000 Z
14
- dependencies: []
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: paint
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - '='
20
+ - !ruby/object:Gem::Version
21
+ version: 2.2.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - '='
27
+ - !ruby/object:Gem::Version
28
+ version: 2.2.1
29
+ - !ruby/object:Gem::Dependency
30
+ name: whirly
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - '='
34
+ - !ruby/object:Gem::Version
35
+ version: 0.3.0
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - '='
41
+ - !ruby/object:Gem::Version
42
+ version: 0.3.0
15
43
  description: SOULs is a Serverless Application Framework. SOULs has four strains,
16
44
  API, Worker, Console, Media, and can be used in combination according to the purpose.
17
45
  SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google
@@ -67,11 +95,11 @@ files:
67
95
  - lib/souls/version.rb
68
96
  - rbs/init.rbs
69
97
  - souls.gemspec
70
- homepage: https://github.com/elsoul/souls
98
+ homepage: https://souls.elsoul.nl
71
99
  licenses:
72
100
  - Apache-2.0
73
101
  metadata:
74
- homepage_uri: https://github.com/elsoul/souls
102
+ homepage_uri: https://souls.elsoul.nl
75
103
  source_code_uri: https://github.com/elsoul/souls
76
104
  changelog_uri: https://github.com/elsoul/souls
77
105
  post_install_message: