souls 0.65.5 → 0.66.3
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/lib/souls/cli/create/index.rb +1 -1
- data/lib/souls/cli/generate/mutation_rbs.rb +8 -10
- data/lib/souls/cli/generate/rspec_job.rb +4 -4
- data/lib/souls/cli.rb +15 -11
- 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 +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebe34aa1db4723fa7b163777eb253fcb9428aa3840bbc331d0f6afda796c5cf6
|
4
|
+
data.tar.gz: 91e80663564657018c3f1ead3e6f040e384eb1e15e200518d0f8c8e3bee6ba5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e26a2fb84d6852c98b534b36a16e030b350673f26abec817d5a4250ea658120c003e45b2e2fc24a4bb4b5c5e0af9c615e17e0f8ff29dcf39dc4efd8ef07079a3
|
7
|
+
data.tar.gz: 50f2032f270ee0203bd418f1b044862a5d0e6c37e9d4312d46435cb97a3796fe729a0a9a7898949835d93d1aff5606253211c32a397a7d3af96a720e292f4ec4
|
@@ -21,6 +21,7 @@ module Souls
|
|
21
21
|
souls_config_init(worker_name: options[:name])
|
22
22
|
steepfile(worker_name: options[:name])
|
23
23
|
souls_helper_rbs(worker_name: options[:name])
|
24
|
+
system("cd apps/#{options[:name]} && bundle")
|
24
25
|
souls_worker_credit(worker_name: options[:name])
|
25
26
|
end
|
26
27
|
true
|
@@ -313,7 +314,6 @@ end
|
|
313
314
|
endroll = <<~TEXT
|
314
315
|
Easy to Run
|
315
316
|
$ cd apps/#{worker_name}
|
316
|
-
$ bundle
|
317
317
|
$ souls sync model
|
318
318
|
$ souls s
|
319
319
|
Go To : http://localhost:3000
|
@@ -118,10 +118,11 @@ module Souls
|
|
118
118
|
TEXT
|
119
119
|
end
|
120
120
|
File.open(file_path, "a") do |f|
|
121
|
-
params[:params].
|
121
|
+
cols = params[:params].reject { |n| n[:column_name] == "user_id" }
|
122
|
+
cols.each_with_index do |param, i|
|
122
123
|
type = Souls.rbs_type_check(param[:type])
|
123
124
|
type = "[#{type}]" if param[:array]
|
124
|
-
|
125
|
+
type = "String" if param[:column_name].match?(/$*_id\z/)
|
125
126
|
|
126
127
|
if i == params[:params].size - 1
|
127
128
|
f.write(" #{param[:column_name]}: #{type}?\n")
|
@@ -137,20 +138,17 @@ module Souls
|
|
137
138
|
# rubocop:enable Layout/LineLength
|
138
139
|
|
139
140
|
File.open(file_path, "a") do |f|
|
140
|
-
params[:params].
|
141
|
+
cols = params[:params].reject { |n| n[:column_name] == "user_id" }
|
142
|
+
cols.each_with_index do |param, i|
|
141
143
|
type = Souls.type_check(param[:type])
|
142
144
|
rbs_type = Souls.rbs_type_check(param[:type])
|
143
145
|
type = "[#{type}]" if param[:array]
|
144
|
-
|
146
|
+
type = "String" if param[:column_name].match?(/$*_id\z/)
|
147
|
+
rbs_type = "String" if param[:column_name].match?(/$*_id\z/)
|
145
148
|
|
146
149
|
required = param[:column_name] == "id" ? "required: true" : "required: false"
|
147
150
|
if i.zero?
|
148
|
-
|
149
|
-
f.write(" def self.argument: (:#{param[:column_name]}, String, #{required} ) -> String\n")
|
150
|
-
else
|
151
|
-
f.write(" def self.argument: (:#{param[:column_name]}, #{type}, #{required} ) -> #{rbs_type}\n")
|
152
|
-
end
|
153
|
-
|
151
|
+
f.write(" def self.argument: (:#{param[:column_name]}, #{type}, #{required} ) -> #{rbs_type}\n")
|
154
152
|
else
|
155
153
|
f.write(" | (:#{param[:column_name]}, #{type}, #{required} ) -> #{rbs_type}\n")
|
156
154
|
end
|
@@ -10,12 +10,12 @@ module Souls
|
|
10
10
|
|
11
11
|
File.open(file_path, "w") do |f|
|
12
12
|
f.write(<<~TEXT)
|
13
|
-
RSpec.describe("#{
|
14
|
-
describe "Define #{
|
13
|
+
RSpec.describe("#{singularized_class_name.camelize}") do
|
14
|
+
describe "Define #{singularized_class_name.camelize}" do
|
15
15
|
|
16
16
|
let(:mutation) do
|
17
17
|
%(mutation {
|
18
|
-
#{
|
18
|
+
#{singularized_class_name.camelize(:lower)}(input: {}) {
|
19
19
|
response
|
20
20
|
}
|
21
21
|
}
|
@@ -28,7 +28,7 @@ module Souls
|
|
28
28
|
|
29
29
|
it "return StockSheet Data" do
|
30
30
|
begin
|
31
|
-
a1 = result.dig("data", "#{
|
31
|
+
a1 = result.dig("data", "#{singularized_class_name.camelize(:lower)}", "response")
|
32
32
|
raise unless a1.present?
|
33
33
|
rescue StandardError
|
34
34
|
raise(StandardError, result)
|
data/lib/souls/cli.rb
CHANGED
@@ -39,23 +39,27 @@ module Souls
|
|
39
39
|
end
|
40
40
|
|
41
41
|
desc "test", "Run Rspec & Rubocop"
|
42
|
+
method_option :all, type: :boolean, aliases: "--all", default: false, desc: "Run (Rspec & steep check & Rubocop)"
|
42
43
|
def test
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
44
|
+
if options[:all]
|
45
|
+
Dir.chdir(Souls.get_mother_path.to_s) do
|
46
|
+
system("steep check")
|
47
|
+
end
|
48
|
+
Dir.chdir(Souls.get_api_path.to_s) do
|
49
|
+
system("rubocop -A")
|
50
|
+
system("bundle exec rspec")
|
51
|
+
end
|
52
|
+
else
|
53
|
+
system("rubocop -A")
|
54
|
+
system("bundle exec rspec")
|
51
55
|
end
|
52
|
-
system("rubocop -A")
|
53
|
-
system("bundle exec rspec")
|
54
56
|
end
|
55
57
|
|
56
58
|
desc "check", "Run steep check"
|
57
59
|
def check
|
58
|
-
|
60
|
+
Dir.chdir(Souls.get_mother_path.to_s) do
|
61
|
+
system("steep check")
|
62
|
+
end
|
59
63
|
end
|
60
64
|
|
61
65
|
def self.exit_on_failure?
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.45.3
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.45.3
|