souls 0.29.0 → 0.29.1

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: 4e1fa29d198c491633c970c526a3910ba8ea5ad1207b2686d492cc8724edee11
4
- data.tar.gz: ebb96d69742107f4de37b7a90dd06c7ee77f36e745b436858c5e828e7be3b175
3
+ metadata.gz: 839fce6c4905d3dc922902ad84093c842c952b0ae11e6d179ff9dba0df2d7a54
4
+ data.tar.gz: 6647e81c9e7e11b4aed1c97a134393a0c7cca081bb2d122a54a06fb50d60f978
5
5
  SHA512:
6
- metadata.gz: 8de749abf646d70b05b1c2274788ee301e972a0c3d1596f683202bb7ec88bb5419f189e31bcf36831c50f7eba174a605a7f102a9ca56d1a5737551c431a5066c
7
- data.tar.gz: 8fbb1c4d72a55157098c49c3be430e525d68a68818d95bb82959ce821e04bd8d0e4e05549b539aceeafddf6fcdb92d13aef01ac904186714e56cb8de46717dca
6
+ metadata.gz: 42c45890bf4e6af520643e2ca8e53b090c2e1ce8ee3a5ad38849af44c08f8e5897b31926a328f77eb6c1cba5ffae6e16ae548cd7e5ec3c94fae24f9d300d0726
7
+ data.tar.gz: 8b0fa856d5e3e8e9ec4f3a6b284fb089aa0cc2edc8bbef8a66e2899038dac6e12e5dd126dd7d968a47547041e344e5e404957d4949a4efc7a05e3efaa10ffaa6
data/exe/souls CHANGED
@@ -21,10 +21,10 @@ begin
21
21
  Whirly.status = "Done!"
22
22
  end
23
23
  else
24
- Paint["Comannd doesn't exist.Check you command again!...", :red]
24
+ puts(Paint["Comannd doesn't exist.Check you command again!...", :red])
25
25
  end
26
26
  when "worker"
27
- Paint["Coming Soon...", :green]
27
+ puts(Paint["Coming Soon...", :green])
28
28
  when "new"
29
29
  args = ARGV
30
30
  Souls::Init.return_method(args)
@@ -44,9 +44,9 @@ begin
44
44
  system("bundle exec irb")
45
45
  end
46
46
  end
47
- when "i", "infra"
47
+ when "i", "infra", "docker"
48
48
  send_method = ARGV[1]
49
- Souls.public_send(send_method)
49
+ Souls::Docker.public_send(send_method)
50
50
  when "gcloud"
51
51
  args = ARGV
52
52
  status = Paint["Running Gcloud Commands...", :yellow]
@@ -90,13 +90,12 @@ begin
90
90
  puts(Paint["Wrong Argument!", :red])
91
91
  end
92
92
  when "g", "generate"
93
- args = ARGV
94
- status = Paint["Generating Files...", :yellow]
95
- done = Paint["You're All Set ☻", :yellow]
96
- Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
97
- Whirly.status = status
98
- Souls::Api::Generate.return_method(args)
99
- Whirly.status = done
93
+ g_command = ARGV[1]
94
+ case g_command
95
+ when "worker"
96
+ Souls::Init.download_worker
97
+ else
98
+ puts(Paint["Coming Soon...", :green])
100
99
  end
101
100
  when "d", "delete"
102
101
  class_name = ARGV[1]
data/lib/souls.rb CHANGED
@@ -4,6 +4,7 @@ require_relative "souls/init"
4
4
  require_relative "souls/api"
5
5
  require_relative "souls/gcloud"
6
6
  require_relative "souls/release"
7
+ require_relative "souls/docker"
7
8
  require "date"
8
9
  require "dotenv/load"
9
10
  require "json"
@@ -33,32 +34,6 @@ module Souls
33
34
  class << self
34
35
  attr_accessor :configuration
35
36
 
36
- def psql
37
- system(
38
- "docker run --rm -d \
39
- -p 5433:5432 \
40
- -v postgres-tmp:/var/lib/postgresql/data \
41
- -e POSTGRES_USER=postgres \
42
- -e POSTGRES_PASSWORD=postgres \
43
- -e POSTGRES_DB=souls_test \
44
- postgres:13-alpine"
45
- )
46
- system("docker ps")
47
- end
48
-
49
- def mysql
50
- system(
51
- "docker run --rm -d \
52
- -p 3306:3306 \
53
- -v mysql-tmp:/var/lib/mysql \
54
- -e MYSQL_USER=mysql \
55
- -e MYSQL_ROOT_PASSWORD=mysql \
56
- -e MYSQL_DB=souls_test \
57
- mysql:latest"
58
- )
59
- system("docker ps")
60
- end
61
-
62
37
  def gemfile_latest_version
63
38
  file_path = "./Gemfile"
64
39
  updated_gems = []
@@ -0,0 +1,5 @@
1
+ require_relative "./docker/docker"
2
+ module Souls
3
+ module Docker
4
+ end
5
+ end
@@ -0,0 +1,31 @@
1
+ module Souls
2
+ module Docker
3
+ class << self
4
+ def psql
5
+ system(
6
+ "docker run --rm -d \
7
+ -p 5433:5432 \
8
+ -v postgres-tmp:/var/lib/postgresql/data \
9
+ -e POSTGRES_USER=postgres \
10
+ -e POSTGRES_PASSWORD=postgres \
11
+ -e POSTGRES_DB=souls_test \
12
+ postgres:13-alpine"
13
+ )
14
+ system("docker ps")
15
+ end
16
+
17
+ def mysql
18
+ system(
19
+ "docker run --rm -d \
20
+ -p 3306:3306 \
21
+ -v mysql-tmp:/var/lib/mysql \
22
+ -e MYSQL_USER=mysql \
23
+ -e MYSQL_ROOT_PASSWORD=mysql \
24
+ -e MYSQL_DB=souls_test \
25
+ mysql:latest"
26
+ )
27
+ system("docker ps")
28
+ end
29
+ end
30
+ end
31
+ end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.29.0".freeze
2
+ VERSION = "0.29.1".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
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.29.0
4
+ version: 0.29.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -106,7 +106,6 @@ files:
106
106
  - lib/souls/api/generate/application.rb
107
107
  - lib/souls/api/generate/connection.rb
108
108
  - lib/souls/api/generate/edge.rb
109
- - lib/souls/api/generate/methods.rb
110
109
  - lib/souls/api/generate/migration.rb
111
110
  - lib/souls/api/generate/model.rb
112
111
  - lib/souls/api/generate/mutation.rb
@@ -120,6 +119,8 @@ files:
120
119
  - lib/souls/api/generate/rspec_query.rb
121
120
  - lib/souls/api/generate/rspec_resolver.rb
122
121
  - lib/souls/api/generate/type.rb
122
+ - lib/souls/docker.rb
123
+ - lib/souls/docker/docker.rb
123
124
  - lib/souls/gcloud.rb
124
125
  - lib/souls/gcloud/compute.rb
125
126
  - lib/souls/gcloud/iam.rb
@@ -1,64 +0,0 @@
1
- module Souls
2
- module Api::Generate
3
- class << self
4
- def return_method(args)
5
- graphql_class = args[1]
6
- class_name = args[2]
7
- case graphql_class
8
- when "test_dir"
9
- Souls::Api::Generate.test_dir
10
- when "model"
11
- Souls::Api::Generate.model(class_name: class_name)
12
- when "mutation"
13
- Souls::Api::Generate.mutation(class_name: class_name)
14
- when "query"
15
- Souls::Api::Generate.query(class_name: class_name)
16
- when "type"
17
- Souls::Api::Generate.type(class_name: class_name)
18
- when "edge"
19
- Souls::Api::Generate.edge(class_name: class_name)
20
- when "connection"
21
- Souls::Api::Generate.connection(class_name: class_name)
22
- when "resolver"
23
- Souls::Api::Generate.resolver(class_name: class_name)
24
- when "policy"
25
- Souls::Api::Generate.policy(class_name: class_name)
26
- when "rspec_factory"
27
- Souls::Api::Generate.rspec_factory(class_name: class_name)
28
- when "rspec_model"
29
- Souls::Api::Generate.rspec_model(class_name: class_name)
30
- when "rspec_mutation"
31
- Souls::Api::Generate.rspec_mutation(class_name: class_name)
32
- when "rspec_query"
33
- Souls::Api::Generate.rspec_query(class_name: class_name)
34
- when "rspec_resolver"
35
- Souls::Api::Generate.rspec_resolver(class_name: class_name)
36
- when "rspec_policy"
37
- Souls::Api::Generate.rspec_policy(class_name: class_name)
38
- when "node_type"
39
- Souls::Api::Generate.node_type(class_name: class_name)
40
- when "job"
41
- Souls::Api::Generate.job(class_name: class_name)
42
- when "migrate"
43
- Souls::Api::Generate.migrate(class_name: class_name)
44
- when "migrate_all"
45
- puts(Paint["Let's Go SOULs AUTO CRUD Assist!\n", :cyan])
46
- Souls::Api::Generate.get_tables.each do |table|
47
- Souls::Api::Generate.migrate(class_name: table.singularize)
48
- puts(Paint["Generated #{table.camelize} CRUD Files\n", :yellow])
49
- end
50
- when "migration"
51
- pluralized_class_name = class_name.underscore.pluralize
52
- system("rake db:create_migration NAME=create_#{pluralized_class_name}")
53
- when "update"
54
- Souls::Api::Generate.update_delete(class_name: class_name)
55
- Souls::Api::Generate.migrate(class_name: class_name)
56
- when "worker"
57
- Souls::Init.download_worker
58
- else
59
- "SOULs!"
60
- end
61
- end
62
- end
63
- end
64
- end