souls 1.7.21 → 1.7.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/souls/cli/cli_exception.rb +2 -1
- data/lib/souls/cli/console/index.rb +2 -1
- data/lib/souls/cli/create/index.rb +1 -2
- data/lib/souls/cli/gcloud/index.rb +2 -2
- data/lib/souls/cli/generate/mutation_rbs.rb +12 -3
- data/lib/souls/cli/release/release.rb +1 -1
- data/lib/souls/cli/update/mutation.rb +12 -4
- data/lib/souls/cli/update/mutation_rbs.rb +6 -5
- data/lib/souls/cli/update/resolver.rb +8 -5
- data/lib/souls/cli/update/rspec_mutation.rb +4 -2
- data/lib/souls/cli/upgrade/index.rb +1 -1
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- metadata +2 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a290f2d3352519c56e7fc9bd6700e0d2e4491f72baffd2b68c8577a7fb66a79
|
4
|
+
data.tar.gz: 37cfe63c0027a77d9e0e3d034ea613878400cf2693d76c35a3d92410d78e5680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc96eb79e065a30d1dea1ffd3453ed945e5e685290e02f37afdab0d96b196359c728129d133c311fdbd53736013d46ff38225546fb0d16acb261dd8b4025ff23
|
7
|
+
data.tar.gz: aa9a78d415b6b0ff15d68033461b56ad38db2e020f41ab7b2936582505f7e9864dc0336d67b4b05198f6adcdaa94f729889d7247ba746f789b1206db3a5ebcdf
|
@@ -22,7 +22,8 @@ module Souls
|
|
22
22
|
attr_reader :message
|
23
23
|
|
24
24
|
def initialize
|
25
|
-
message = "You either haven't created or don't have access to a GCP project.
|
25
|
+
message = "You either haven't created or don't have access to a GCP project. " \
|
26
|
+
"Please create a GCP project with the same name as this app."
|
26
27
|
super(message)
|
27
28
|
@message = message
|
28
29
|
end
|
@@ -3,7 +3,8 @@ module Souls
|
|
3
3
|
desc "console", "Run IRB Console"
|
4
4
|
method_option :env, aliases: "--e", default: "development", desc: "Difine APP Enviroment - development | production"
|
5
5
|
def console
|
6
|
-
return system("RACK_ENV=production bundle exec irb") if options[:env].eql?
|
6
|
+
return system("RACK_ENV=production bundle exec irb") if options[:env].eql?("production")
|
7
|
+
|
7
8
|
system("bundle exec irb")
|
8
9
|
end
|
9
10
|
end
|
@@ -142,10 +142,9 @@ end
|
|
142
142
|
steps:
|
143
143
|
- uses: actions/checkout@v2
|
144
144
|
- name: Set up Ruby 3.0
|
145
|
-
uses:
|
145
|
+
uses: ruby/setup-ruby@v1
|
146
146
|
with:
|
147
147
|
ruby-version: 3.0
|
148
|
-
bundler-cache: true
|
149
148
|
- name: Build and test with Rake
|
150
149
|
env:
|
151
150
|
PGHOST: 127.0.0.1
|
@@ -27,7 +27,7 @@ module Souls
|
|
27
27
|
desc "auth_login", "gcloud config set and gcloud auth login"
|
28
28
|
def auth_login
|
29
29
|
project_id = Souls.configuration.project_id
|
30
|
-
system("gcloud projects describe #{project_id}", out:
|
30
|
+
system("gcloud projects describe #{project_id}", out: File::NULL) or raise(Souls::GcloudException)
|
31
31
|
system("gcloud config set project #{project_id}")
|
32
32
|
system("gcloud auth login")
|
33
33
|
rescue Thor::Error => e
|
@@ -37,7 +37,7 @@ module Souls
|
|
37
37
|
desc "config_set", "gcloud config set"
|
38
38
|
def config_set
|
39
39
|
project_id = Souls.configuration.project_id
|
40
|
-
system("gcloud projects describe #{project_id}", out:
|
40
|
+
system("gcloud projects describe #{project_id}", out: File::NULL) or raise(Souls::GcloudException)
|
41
41
|
system("gcloud config set project #{project_id}")
|
42
42
|
end
|
43
43
|
|
@@ -62,14 +62,23 @@ module Souls
|
|
62
62
|
type = "[#{type}]" if param[:array]
|
63
63
|
if i.zero?
|
64
64
|
if param[:column_name].match?(/$*_id\z/)
|
65
|
-
f.write(
|
65
|
+
f.write(
|
66
|
+
" def self.argument: (:#{param[:column_name]}, String, " \
|
67
|
+
"required: false ) -> #{rbs_type}\n"
|
68
|
+
)
|
66
69
|
else
|
67
|
-
f.write(
|
70
|
+
f.write(
|
71
|
+
" def self.argument: (:#{param[:column_name]}, #{type}, " \
|
72
|
+
"required: false ) -> #{rbs_type}\n"
|
73
|
+
)
|
68
74
|
end
|
69
75
|
elsif param[:column_name].match?(/$*_id\z/)
|
70
76
|
f.write(" | (:#{param[:column_name]}, String, required: false ) -> String\n")
|
71
77
|
else
|
72
|
-
f.write(
|
78
|
+
f.write(
|
79
|
+
" | (:#{param[:column_name]}, #{type}, " \
|
80
|
+
"required: false ) -> #{rbs_type}\n"
|
81
|
+
)
|
73
82
|
end
|
74
83
|
end
|
75
84
|
end
|
@@ -37,7 +37,7 @@ module Souls
|
|
37
37
|
system("rake release")
|
38
38
|
write_changelog(current_souls_ver: current_souls_ver)
|
39
39
|
system("gh release create v#{souls_new_ver} -t v#{souls_new_ver} -F ./CHANGELOG.md")
|
40
|
-
system("gsutil -m -q cp -r coverage gs://souls-bucket/souls-coverage")
|
40
|
+
system("gsutil -m -q -o 'GSUtil:parallel_process_count=1' cp -r coverage gs://souls-bucket/souls-coverage")
|
41
41
|
system("bundle exec rake upload:init_files")
|
42
42
|
Whirly.status = Paint["soul-v#{souls_new_ver} successfully updated!"]
|
43
43
|
end
|
@@ -8,8 +8,12 @@ module Souls
|
|
8
8
|
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
9
9
|
dir_name = "./app/graphql/mutations/base/#{singularized_class_name}"
|
10
10
|
file_path = "#{dir_name}/create_#{singularized_class_name}.rb"
|
11
|
-
|
12
|
-
|
11
|
+
unless File.exist?(file_path)
|
12
|
+
raise(
|
13
|
+
Souls::CLIException,
|
14
|
+
"File #{file_path} is missing. Please recreate it and then run this command again."
|
15
|
+
)
|
16
|
+
end
|
13
17
|
|
14
18
|
mutation_argument = check_mutation_argument(class_name: "user", action: "create")
|
15
19
|
overwrite_class_file(mutation_argument: mutation_argument, file_path: file_path, new_cols: new_cols)
|
@@ -22,8 +26,12 @@ module Souls
|
|
22
26
|
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
23
27
|
dir_name = "./app/graphql/mutations/base/#{singularized_class_name}"
|
24
28
|
file_path = "#{dir_name}/update_#{singularized_class_name}.rb"
|
25
|
-
|
26
|
-
|
29
|
+
unless File.exist?(file_path)
|
30
|
+
raise(
|
31
|
+
Souls::CLIException,
|
32
|
+
"File #{file_path} is missing. Please recreate it and then run this command again."
|
33
|
+
)
|
34
|
+
end
|
27
35
|
|
28
36
|
mutation_argument = check_mutation_argument(class_name: class_name, action: "update")
|
29
37
|
overwrite_class_file(mutation_argument: mutation_argument, file_path: file_path, new_cols: new_cols)
|
@@ -27,11 +27,12 @@ module Souls
|
|
27
27
|
type = "[#{type}]" if col[:array]
|
28
28
|
next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
write_txt +=
|
31
|
+
if i.zero?
|
32
|
+
line
|
33
|
+
else
|
34
|
+
" #{col[:column_name]}: #{type}?,\n"
|
35
|
+
end
|
35
36
|
end
|
36
37
|
resolve = true
|
37
38
|
elsif line.include?("def self.argument:") && !argument
|
@@ -28,11 +28,14 @@ module Souls
|
|
28
28
|
type = Souls.type_check(col[:type])
|
29
29
|
type = "[#{type}]" if col[:array]
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
add_line =
|
32
|
+
if type.include?("[")
|
33
|
+
" scope = scope.where('#{col[:column_name]} @> ARRAY[?]::#{col[:type]}[]', " \
|
34
|
+
"value[:#{col[:column_name]}]) if value[:#{col[:column_name]}]\n"
|
35
|
+
else
|
36
|
+
" scope = scope.where(#{col[:column_name]}: value[:#{col[:column_name]}]) if " \
|
37
|
+
"value[:#{col[:column_name]}]\n"
|
38
|
+
end
|
36
39
|
new_line.write(add_line) unless scope_args.include?(col[:column_name])
|
37
40
|
end
|
38
41
|
scope = true
|
@@ -26,9 +26,11 @@ module Souls
|
|
26
26
|
|
27
27
|
type_line =
|
28
28
|
if type == "String" && !col[:array]
|
29
|
-
" #{col[:column_name].camelize(:lower)}
|
29
|
+
" #{col[:column_name].camelize(:lower)}" \
|
30
|
+
": \"\#{#{class_name}[:#{col[:column_name].underscore}]}\"\n"
|
30
31
|
else
|
31
|
-
" #{col[:column_name].camelize(:lower)}
|
32
|
+
" #{col[:column_name].camelize(:lower)}" \
|
33
|
+
": \#{#{class_name}[:#{col[:column_name].underscore}]}\n"
|
32
34
|
end
|
33
35
|
args = check_rspec_mutation_argument(class_name: class_name)
|
34
36
|
new_line.write(type_line) unless args.include?(col[:column_name].underscore)
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.27
|
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.27
|
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: 1.7.
|
4
|
+
version: 1.7.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
@@ -224,9 +224,7 @@ homepage: https://souls.elsoul.nl
|
|
224
224
|
licenses:
|
225
225
|
- Apache-2.0
|
226
226
|
metadata:
|
227
|
-
|
228
|
-
source_code_uri: https://github.com/elsoul/souls
|
229
|
-
changelog_uri: https://github.com/elsoul/souls/releases/tag/v1.7.21
|
227
|
+
rubygems_mfa_required: 'true'
|
230
228
|
post_install_message:
|
231
229
|
rdoc_options: []
|
232
230
|
require_paths:
|