souls 0.66.0 → 0.67.0
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/job.rb +1 -1
- data/lib/souls/cli/generate/mutation_rbs.rb +4 -6
- 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: 1a8a73d2576e7e778ac9c146e667f6a0c6c5b7d60f14d9cd3f87d7a782455da3
|
4
|
+
data.tar.gz: c6ce668992cb359293852b9e417136d9fd52188e6a2b5c3e33442540856bb827
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40eb1a0cab71929a0fec2e6b51c7b8a0a91258065ad1e2f657657be9432c3699fb85a6c67098237bb3da9271384f8dcb9afd569ddb7ad5e918d869a5fa719c44
|
7
|
+
data.tar.gz: 62f392d86d935bdb41d8976a322e981bd4ab3d069227fd3f6fd1a82b5ce6e7239a14b2ce5cc71b873d7ede4d70382372b31b7ed3b3db48231c009b04fd070bdc
|
@@ -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
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Souls
|
2
2
|
class Generate < Thor
|
3
3
|
desc "job [CLASS_NAME]", "Generate Job File in Worker"
|
4
|
-
method_option :
|
4
|
+
method_option :mailer, type: :boolean, aliases: "--mailer", default: false, desc: "Mailer Option"
|
5
5
|
def job(class_name)
|
6
6
|
if options[:mailer]
|
7
7
|
mailgun_mailer(class_name: class_name)
|
@@ -122,6 +122,7 @@ module Souls
|
|
122
122
|
cols.each_with_index do |param, i|
|
123
123
|
type = Souls.rbs_type_check(param[:type])
|
124
124
|
type = "[#{type}]" if param[:array]
|
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")
|
@@ -142,15 +143,12 @@ module Souls
|
|
142
143
|
type = Souls.type_check(param[:type])
|
143
144
|
rbs_type = Souls.rbs_type_check(param[:type])
|
144
145
|
type = "[#{type}]" if param[:array]
|
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.46.0
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.46.0
|