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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: badff53370c04ff529c865e90e33f7fffd0f046759027d917992fdb868e50782
4
- data.tar.gz: edd9677f32e2cdb62f507da4807bc659e63c15c0293701349be5a760572f0f93
3
+ metadata.gz: 1a8a73d2576e7e778ac9c146e667f6a0c6c5b7d60f14d9cd3f87d7a782455da3
4
+ data.tar.gz: c6ce668992cb359293852b9e417136d9fd52188e6a2b5c3e33442540856bb827
5
5
  SHA512:
6
- metadata.gz: d7bb2bd4099d1aab172120a713b6a9ab1cf3b22911072e52cf3964705d310c214757cdfbb6d35f33c1649bc52128f490c2c51294ae871c2d362a55da40944964
7
- data.tar.gz: 71e553091f8ec4368eebb66243e4e9878c39f633a3e6c036b0141fa225c8d16f157e74b9367b5ae402ef680a8e66efbb6f3cf48a42765d4a1769ac02abb84be8
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 :mutation, type: :boolean, aliases: "--mailer", default: false, desc: "Mailer 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
- if param[:column_name].match?(/$*_id\z/)
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("#{class_name.singularize.camelize}") do
14
- describe "Define #{class_name.singularize.camelize}" do
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
- #{class_name.singularize.camelize(:lower)}(input: {}) {
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", "#{options[:mutation].singularize.camelize(:lower)}", "response")
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
- system("rubocop -A")
44
- system("bundle exec rspec")
45
- end
46
-
47
- desc "test_all", "Run (Rspec & steep check & Rubocop)"
48
- def test_all
49
- Dir.chdir(Souls.get_mother_path.to_s) do
50
- system("steep check")
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
- system("steep check")
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,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.66.0".freeze
2
+ VERSION = "0.67.0".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.45.0
1
+ 0.46.0
@@ -1 +1 @@
1
- 0.45.0
1
+ 0.46.0
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.66.0
4
+ version: 0.67.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI