souls 0.54.5 → 0.55.2

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: 67f7095a375672b1a1c6afa3f952f08884b88aad0c121963fd70708052ef2332
4
- data.tar.gz: 3827ecad5d12367fa018bf7bc5d073e6172d69bfaa0063dea0e22a43db2e9ee5
3
+ metadata.gz: cadd8e85a9df7d2bbc5b4a276d163e2fde33ce2549f12505f624c3f16d297585
4
+ data.tar.gz: 0c7f9f8e2139a2fc37271fcce9e60ac65e5b437c6b425be7cd30bdee269f95c5
5
5
  SHA512:
6
- metadata.gz: 77b152892d353af386cd550ef0c872362b8dc9e71590c63f84ad5e992f821cdebd70d6c1a988f67b0ddd34d787e0c6b1a221383f1ac42523ef04385c63095a4f
7
- data.tar.gz: 624356116448f8a84790fec1eaedc237ba61bda08a0e9d0f18d4fddf6d44b2ba2c1e15fbdb23c2bfb30db568a10b61b5669fa25a3fed6b5d635842eedc892375
6
+ metadata.gz: c1cff34a13bab301ea31b905e3a75f05b401c60a1a2d94800e3d2ff49a47f21a2ade571df14b0ac916c3b50c3e1fa8336703232c7606b1dd64c5233f9fb8d2e0
7
+ data.tar.gz: bcef4c3899794142b56a89ae306490be66661d60ebd841e815a24415c6200330211ff5824a1eb1ab600dd3eccbec3561078f3f20649e4cb30151a35811f53d95
data/exe/souls CHANGED
@@ -11,7 +11,6 @@ begin
11
11
  "help",
12
12
  "api",
13
13
  "create",
14
- "gcloud",
15
14
  "worker",
16
15
  "",
17
16
  nil
@@ -0,0 +1,22 @@
1
+ module Souls
2
+ class Generate < Thor
3
+ desc "connection [CLASS_NAME]", "Generate GraphQL Connection from schema.rb"
4
+ def connection(class_name)
5
+ file_dir = "./app/graphql/types/connections/"
6
+ FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
7
+ singularized_class_name = class_name.underscore.singularize
8
+ file_path = "./app/graphql/types/connections/#{singularized_class_name}_connection.rb"
9
+ File.open(file_path, "w") do |f|
10
+ f.write(<<~TEXT)
11
+ class Types::#{singularized_class_name.camelize}Connection < Types::BaseConnection
12
+ edge_type(Types::#{singularized_class_name.camelize}Edge)
13
+ end
14
+ TEXT
15
+ end
16
+ puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
17
+ file_path
18
+ rescue Thor::Error => e
19
+ raise(Thor::Error, e)
20
+ end
21
+ end
22
+ end
@@ -9,10 +9,12 @@ module Souls
9
9
  raise(StandardError, "Same Worker Already Exist!") if Dir.exist?(file_dir)
10
10
 
11
11
  workers = Souls.configuration.workers
12
+ app = Souls.configuration.app
12
13
  port = 3000 + workers.size
14
+ souls_worker_name = "souls-#{app}-#{options[:name]}"
13
15
  download_worker(worker_name: options[:name])
14
- souls_conf_update(worker_name: options[:name])
15
- souls_conf_update(worker_name: options[:name], strain: "api")
16
+ souls_conf_update(worker_name: souls_worker_name)
17
+ souls_conf_update(worker_name: souls_worker_name, strain: "api")
16
18
  workflow(worker_name: options[:name])
17
19
  procfile(worker_name: options[:name], port: port)
18
20
  mother_procfile(worker_name: options[:name])
@@ -220,5 +222,43 @@ end
220
222
  system("cp ./apps/api/config/database.yml ./apps/#{worker_name}/config/")
221
223
  FileUtils.rm(file_name)
222
224
  end
225
+
226
+ def souls_worker_credit(worker_name: "mailer")
227
+ line = Paint["====================================", :yellow]
228
+ puts("\n")
229
+ puts(line)
230
+ txt2 = <<~TEXT
231
+ _____ ____ __ ____#{' '}
232
+ / ___// __ \\/ / / / / %{red1}
233
+ \\__ \\/ / / / / / / / %{red2}
234
+ ___/ / /_/ / /_/ / /___%{red3}#{' '}
235
+ /____/\\____/\\____/_____%{red4}#{' '}
236
+ TEXT
237
+ red1 = ["_____", :red]
238
+ red2 = ["/ ___/", :red]
239
+ red3 = ["(__ )", :red]
240
+ red4 = ["/____/", :red]
241
+ ms = Paint % [txt2, :cyan, { red1: red1, red2: red2, red3: red3, red4: red4 }]
242
+ puts(ms)
243
+ puts(line)
244
+ welcome = Paint["SOULs Worker is Ready!", :white]
245
+ puts(welcome)
246
+ souls_ver = Paint["SOULs Version: #{Souls::VERSION}", :white]
247
+ puts(souls_ver)
248
+ puts(line)
249
+ endroll = <<~TEXT
250
+ Easy to Run
251
+ $ cd apps/#{worker_name}
252
+ $ bundle
253
+ $ souls sync model
254
+ $ souls s
255
+ Go To : http://localhost:3000
256
+
257
+ Doc: https://souls.elsoul.nl
258
+ TEXT
259
+ cd = Paint[endroll, :white]
260
+ puts(cd)
261
+ puts(line)
262
+ end
223
263
  end
224
264
  end
@@ -34,6 +34,7 @@ module Souls
34
34
 
35
35
  desc "config_set", "gcloud config set"
36
36
  def config_set
37
+ require("#{Souls.get_api_path}/config/souls")
37
38
  project_id = Souls.configuration.project_id
38
39
  system("gcloud config set project #{project_id}")
39
40
  end
@@ -16,6 +16,16 @@ module Souls
16
16
  souls_api_credit(app_name: app_name, service_name: service_name)
17
17
  end
18
18
 
19
+ desc "init", "Run git submodule add RBS collection"
20
+ def add_submodule
21
+ system("git submodule add https://github.com/ruby/gem_rbs_collection.git vendor/rbs/gem_rbs_collection")
22
+ end
23
+
24
+ desc "update_submodule", "Run git submodule update --init RBS collection"
25
+ def update_submodule
26
+ system("git submodule update --init https://github.com/ruby/gem_rbs_collection.git vendor/rbs/gem_rbs_collection")
27
+ end
28
+
19
29
  private
20
30
 
21
31
  def get_version(repository_name: "souls_api")
@@ -74,7 +84,7 @@ module Souls
74
84
 
75
85
  def download_github_actions(app_name: "souls-app")
76
86
  file_name = "github.tgz"
77
- url = "https://storage.googleapis.com/souls-bucket/github_actions/github.tgz"
87
+ url = "https://storage.googleapis.com/souls-bucket/boilerplates/github_actions/github.tgz"
78
88
  system("curl -OL #{url}")
79
89
  FileUtils.mkdir_p("#{app_name}/github")
80
90
  system("tar -zxvf ./#{file_name} -C #{app_name}/")
@@ -110,11 +120,19 @@ module Souls
110
120
  system("curl -OL #{url}")
111
121
  system("mkdir -p #{app_name}/apps/#{service_name}")
112
122
  system("tar -zxvf ./#{file_name} -C #{app_name}/apps/")
123
+ FileUtils.rm(file_name)
124
+
125
+ sig_name = "sig.tgz"
126
+ url = "https://storage.googleapis.com/souls-bucket/boilerplates/sig/#{sig_name}"
127
+ system("curl -OL #{url}")
128
+ system("tar -zxvf ./#{sig_name} -C #{app_name}")
129
+
113
130
  system("cd #{app_name} && curl -OL https://storage.googleapis.com/souls-bucket/boilerplates/.rubocop.yml")
114
131
  system("cd #{app_name} && curl -OL https://storage.googleapis.com/souls-bucket/boilerplates/Gemfile")
115
132
  system("cd #{app_name} && curl -OL https://storage.googleapis.com/souls-bucket/boilerplates/Procfile.dev")
116
133
  system("cd #{app_name} && curl -OL https://storage.googleapis.com/souls-bucket/boilerplates/Procfile")
117
- FileUtils.rm(file_name)
134
+ system("cd #{app_name} && curl -OL https://storage.googleapis.com/souls-bucket/boilerplates/Steepfile")
135
+ FileUtils.rm(sig_name)
118
136
  end
119
137
 
120
138
  def souls_api_credit(app_name: "souls", service_name: "api")
data/lib/souls/cli.rb CHANGED
@@ -44,12 +44,24 @@ module Souls
44
44
  puts(Souls::VERSION)
45
45
  end
46
46
 
47
- desc "test", "Run Rspec & Rubocop"
47
+ desc "test", "Run (Rspec & steep check & Rubocop)"
48
48
  def test
49
49
  system("rubocop -A")
50
+ system("steep check")
50
51
  system("bundle exec rspec")
51
52
  end
52
53
 
54
+ desc "test_all", "Run Rspec & Rubocop"
55
+ def test_all
56
+ system("rubocop -A")
57
+ system("bundle exec rspec")
58
+ end
59
+
60
+ desc "check", "Run steep check"
61
+ def check
62
+ system("steep check")
63
+ end
64
+
53
65
  def self.exit_on_failure?
54
66
  false
55
67
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.54.5".freeze
2
+ VERSION = "0.55.2".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.33.5
1
+ 0.34.2
@@ -1 +1 @@
1
- 0.33.5
1
+ 0.34.2
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.54.5
4
+ version: 0.55.2
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-09-23 00:00:00.000000000 Z
13
+ date: 2021-09-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -129,6 +129,7 @@ files:
129
129
  - lib/souls.rb
130
130
  - lib/souls/api/generate/application.rb
131
131
  - lib/souls/api/generate/connection.rb
132
+ - lib/souls/api/generate/connection_rbs.rb
132
133
  - lib/souls/api/generate/edge.rb
133
134
  - lib/souls/api/generate/index.rb
134
135
  - lib/souls/api/generate/manager.rb