souls 0.23.0 → 0.23.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 +4 -4
- data/Gemfile.lock +1 -1
- data/exe/souls +54 -41
- data/lib/souls/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7ede2f9f0e65eff670fa361f97f071801652603cebb06feba2647596a9b8c59
|
4
|
+
data.tar.gz: 04dbe65c847e1c2012e95eb2b2052205a24c815e75c7dee911bfa5141d22eb47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7e15233b1799f795a1dbda4ac192665acb20453ac5a9a00eb3a1cbb76bb41bc071e5ff0b87415e069c5e4941713ea30a3fd3dad9bb74ec65694b1465c78efdf
|
7
|
+
data.tar.gz: 76bb5d7d973f9a2235cabe5e16bc27ba65bdc4b972129e3f3c295cd97c4e5deb18db44b80dfba45e09cf275feeec91c3a800857ca632e44d342e3db7875637f4
|
data/Gemfile.lock
CHANGED
data/exe/souls
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require "souls"
|
3
3
|
begin
|
4
|
-
require "./config/souls" unless ARGV[0] == "new" || ARGV[0] == "i" || ARGV[0] == "-v"
|
4
|
+
require "./config/souls" unless ARGV[0] == "new" || ARGV[0] == "i" || ARGV[0] == "-v" || ARGV[0] == "deploy"
|
5
5
|
rescue
|
6
6
|
puts "Make sure you are at SOULs APP directory!"
|
7
7
|
end
|
8
8
|
begin
|
9
|
-
|
9
|
+
souls_command = ARGV[0]
|
10
|
+
case souls_command
|
10
11
|
when "new"
|
11
12
|
STRAINS = ["api", "worker", "console", "admin", "media"]
|
12
|
-
|
13
|
+
app_name = ARGV[1]
|
14
|
+
if app_name.nil?
|
13
15
|
puts Paint["you need to specify your app name", :red]
|
14
16
|
puts Paint["`souls new app_name`", :yellow]
|
15
17
|
exit
|
@@ -29,12 +31,11 @@ begin
|
|
29
31
|
strain = STDIN.gets.chomp.to_i
|
30
32
|
case strain
|
31
33
|
when 1, 2
|
32
|
-
Souls::Init.download_souls app_name:
|
33
|
-
Souls::Init.initial_config_init app_name:
|
34
|
+
Souls::Init.download_souls app_name: app_name, repository_name: "souls_#{STRAINS[strain.to_i - 1]}"
|
35
|
+
Souls::Init.initial_config_init app_name: app_name, strain: STRAINS[strain.to_i - 1]
|
34
36
|
else
|
35
37
|
puts Paint["Coming Soon...", :blue]
|
36
38
|
end
|
37
|
-
|
38
39
|
when "s", "server"
|
39
40
|
strain = Souls.configuration.strain
|
40
41
|
case strain
|
@@ -51,7 +52,8 @@ begin
|
|
51
52
|
when "media", "admin"
|
52
53
|
system "yarn dev"
|
53
54
|
else
|
54
|
-
|
55
|
+
rack_env = ARGV[1]
|
56
|
+
case rack_env
|
55
57
|
when "RACK_ENV=production"
|
56
58
|
system "RACK_ENV=production bundle exec irb"
|
57
59
|
else
|
@@ -59,11 +61,13 @@ begin
|
|
59
61
|
end
|
60
62
|
end
|
61
63
|
when "i", "infra"
|
62
|
-
|
64
|
+
send_method = ARGV[1]
|
65
|
+
Souls.send send_method
|
63
66
|
when "gcloud"
|
64
|
-
|
67
|
+
send_method = ARGV[1]
|
68
|
+
Souls::Gcloud.send send_method
|
65
69
|
when "-v", "--version"
|
66
|
-
puts Souls::VERSION
|
70
|
+
puts Paint[Souls::VERSION, :white]
|
67
71
|
when "gem:update", "gemfile:update"
|
68
72
|
status = Paint["Checking for updates...", :yellow]
|
69
73
|
Whirly.start spinner: "clock", interval: 1000, stop: "🎉" do
|
@@ -72,7 +76,8 @@ begin
|
|
72
76
|
Whirly.status = "Done!"
|
73
77
|
end
|
74
78
|
when "add"
|
75
|
-
|
79
|
+
graphql_class = ARGV[1]
|
80
|
+
case graphql_class
|
76
81
|
when "mutation"
|
77
82
|
Souls::Init.add_mutation class_name: "user", file_name: "hoi"
|
78
83
|
when "type"
|
@@ -84,82 +89,89 @@ begin
|
|
84
89
|
when "rspec_mutation"
|
85
90
|
Souls::Init.add_rspec_mutation class_name: "user", file_name: "hoi"
|
86
91
|
else
|
87
|
-
puts "
|
92
|
+
puts Paint["Wrong Argument!", :red]
|
88
93
|
end
|
89
94
|
when "g", "generate"
|
90
|
-
|
95
|
+
graphql_class = ARGV[1]
|
96
|
+
class_name = ARGV[2]
|
97
|
+
case graphql_class
|
91
98
|
when "test_dir"
|
92
99
|
Souls::Generate.test_dir
|
93
100
|
when "model"
|
94
|
-
Souls::Generate.model class_name:
|
101
|
+
Souls::Generate.model class_name: class_name
|
95
102
|
when "mutation"
|
96
|
-
Souls::Generate.mutation class_name:
|
103
|
+
Souls::Generate.mutation class_name: class_name
|
97
104
|
when "query"
|
98
|
-
Souls::Generate.query class_name:
|
105
|
+
Souls::Generate.query class_name: class_name
|
99
106
|
when "type"
|
100
|
-
Souls::Generate.type class_name:
|
107
|
+
Souls::Generate.type class_name: class_name
|
101
108
|
when "edge"
|
102
|
-
Souls::Generate.edge class_name:
|
109
|
+
Souls::Generate.edge class_name: class_name
|
103
110
|
when "connection"
|
104
|
-
Souls::Generate.connection class_name:
|
111
|
+
Souls::Generate.connection class_name: class_name
|
105
112
|
when "resolver"
|
106
|
-
Souls::Generate.resolver class_name:
|
113
|
+
Souls::Generate.resolver class_name: class_name
|
107
114
|
when "policy"
|
108
|
-
Souls::Generate.policy class_name:
|
115
|
+
Souls::Generate.policy class_name: class_name
|
109
116
|
when "rspec_factory"
|
110
|
-
Souls::Generate.rspec_factory class_name:
|
117
|
+
Souls::Generate.rspec_factory class_name: class_name
|
111
118
|
when "rspec_model"
|
112
|
-
Souls::Generate.rspec_model class_name:
|
119
|
+
Souls::Generate.rspec_model class_name: class_name
|
113
120
|
when "rspec_mutation"
|
114
|
-
Souls::Generate.rspec_mutation class_name:
|
121
|
+
Souls::Generate.rspec_mutation class_name: class_name
|
115
122
|
when "rspec_query"
|
116
|
-
Souls::Generate.rspec_query class_name:
|
123
|
+
Souls::Generate.rspec_query class_name: class_name
|
117
124
|
when "rspec_resolver"
|
118
|
-
Souls::Generate.rspec_resolver class_name:
|
125
|
+
Souls::Generate.rspec_resolver class_name: class_name
|
119
126
|
when "rspec_policy"
|
120
|
-
Souls::Generate.rspec_policy class_name:
|
127
|
+
Souls::Generate.rspec_policy class_name: class_name
|
121
128
|
when "node_type"
|
122
|
-
Souls::Generate.node_type class_name:
|
129
|
+
Souls::Generate.node_type class_name: class_name
|
123
130
|
when "job"
|
124
|
-
Souls::Generate.job class_name:
|
131
|
+
Souls::Generate.job class_name: class_name
|
125
132
|
when "migrate"
|
126
|
-
Souls::Generate.single_migrate class_name:
|
133
|
+
Souls::Generate.single_migrate class_name: class_name
|
127
134
|
when "migrate_all"
|
128
135
|
Souls::Generate.migrate_all
|
129
136
|
when "migration"
|
130
|
-
|
131
|
-
system "rake db:create_migration NAME=create_#{
|
137
|
+
pluralized_class_name = class_name.underscore.pluralize
|
138
|
+
system "rake db:create_migration NAME=create_#{pluralized_class_name}"
|
132
139
|
when "update"
|
133
|
-
Souls::Generate.update_delete class_name:
|
134
|
-
Souls::Generate.single_migrate class_name:
|
140
|
+
Souls::Generate.update_delete class_name: class_name
|
141
|
+
Souls::Generate.single_migrate class_name: class_name
|
135
142
|
else
|
136
143
|
"SOULs!"
|
137
144
|
end
|
138
145
|
when "d"
|
139
|
-
|
146
|
+
class_name = ARGV[1]
|
147
|
+
Souls::Generate.delete_all class_name: class_name
|
140
148
|
when "db:create"
|
141
|
-
|
149
|
+
rack_env = ARGV[1]
|
150
|
+
case rack_env
|
142
151
|
when "RACK_ENV=production"
|
143
152
|
system "rake db:create RACK_ENV=production"
|
144
153
|
else
|
145
154
|
system "rake db:create && rake db:create RACK_ENV=test"
|
146
155
|
end
|
147
156
|
when "db:migrate"
|
148
|
-
|
157
|
+
rack_env = ARGV[1]
|
158
|
+
case rack_env
|
149
159
|
when "RACK_ENV=production"
|
150
160
|
system "rake db:migrate RACK_ENV=production"
|
151
161
|
else
|
152
162
|
system "rake db:migrate && rake db:migrate RACK_ENV=test"
|
153
163
|
end
|
154
164
|
when "db:seed"
|
155
|
-
|
165
|
+
rack_env = ARGV[1]
|
166
|
+
case rack_env
|
156
167
|
when "RACK_ENV=production"
|
157
168
|
system "rake db:seed RACK_ENV=production"
|
158
169
|
else
|
159
170
|
system "rake db:seed"
|
160
171
|
end
|
161
172
|
when "db:migrate:reset"
|
162
|
-
|
173
|
+
rack_env = ARGV[1]
|
174
|
+
case rack_env
|
163
175
|
when "RACK_ENV=production"
|
164
176
|
system "rake db:migrate:reset RACK_ENV=production DISABLE_DATABASE_ENVIRONMENT_CHECK=1"
|
165
177
|
else
|
@@ -184,10 +196,11 @@ begin
|
|
184
196
|
system "docker build . -t souls -f Dockerfile.dev"
|
185
197
|
system "docker run --rm --env-file .env -p 3000:3000 souls:latest"
|
186
198
|
when "deploy"
|
187
|
-
|
199
|
+
project_id = Souls.configuration.project_id
|
200
|
+
system "gcloud builds submit --config=cloudbuild.yml --project #{project_id}"
|
188
201
|
else
|
189
202
|
puts Paint["Welcome to SOULs!", :green]
|
190
203
|
end
|
191
204
|
rescue StandardError => error
|
192
|
-
puts Paint[
|
205
|
+
puts Paint[error, :red]
|
193
206
|
end
|
data/lib/souls/version.rb
CHANGED