souls 1.6.1 → 1.6.5
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/exe/souls +1 -1
- data/lib/souls/cli/create/index.rb +1 -0
- data/lib/souls/cli/gcloud/sql/index.rb +1 -2
- data/lib/souls/cli/generate/job.rb +1 -1
- data/lib/souls/cli/generate/rspec_job.rb +59 -22
- data/lib/souls/cli/generate/rspec_manager.rb +1 -1
- data/lib/souls/cli/github/index.rb +8 -0
- 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 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ed4af3543c0bea6062467ddbf1929eeb98d7eb35395cb88258ebd255680777c
|
4
|
+
data.tar.gz: eb16453c0ea26b86bb808e7cebd907c2334bfa06ad36ee92a8a7ab226b1f0ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 720e9d40626f9bffbfc95b1f7cf9241d2e396a9710433da94d387dd6266ebe0b4fe9c5f887c081152f8d2889d1b0ad6e8949464d251d522c3105c98f4579d90f
|
7
|
+
data.tar.gz: 993bcb80e1310eb883a5ba30c0bd10510d639ef5353141d3605b8450b11317aa1c83ef6aaf222e54eab474e8c055cad9064e9e52fc0aea21d5dc43fb3ae45eff
|
data/exe/souls
CHANGED
@@ -5,7 +5,7 @@ begin
|
|
5
5
|
souls_command = ARGV[0]
|
6
6
|
require("./config/souls") unless ["new", "docker", "-v", "help", "", nil].include?(souls_command)
|
7
7
|
rescue StandardError
|
8
|
-
raise(StandardError, "No
|
8
|
+
raise(StandardError, "No config! Please make `./config/souls.rb` File!")
|
9
9
|
end
|
10
10
|
|
11
11
|
Souls::CLI.start
|
@@ -9,7 +9,7 @@ module Souls
|
|
9
9
|
create_job_mutation(class_name)
|
10
10
|
end
|
11
11
|
Souls::Generate.new.invoke(:job_rbs, [class_name], {})
|
12
|
-
Souls::Generate.new.invoke(:rspec_job, [class_name], {})
|
12
|
+
Souls::Generate.new.invoke(:rspec_job, [class_name], { mailer: options[:mailer] })
|
13
13
|
rescue Thor::Error => e
|
14
14
|
raise(Thor::Error, e)
|
15
15
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Souls
|
2
2
|
class Generate < Thor
|
3
3
|
desc "rspec_job [CLASS_NAME]", "Generate Rspec Job Test Template"
|
4
|
+
method_option :mailer, type: :boolean, aliases: "--mailer", default: false, desc: "Mailgun Template"
|
4
5
|
def rspec_job(class_name)
|
5
6
|
singularized_class_name = class_name.underscore.singularize
|
6
7
|
file_dir = "./spec/mutations/jobs/"
|
@@ -8,36 +9,72 @@ module Souls
|
|
8
9
|
file_path = "#{file_dir}/#{singularized_class_name}_spec.rb"
|
9
10
|
return "RspecJob already exist! #{file_path}" if File.exist?(file_path)
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
describe
|
12
|
+
if options[:mailer]
|
13
|
+
File.open(file_path, "w") do |f|
|
14
|
+
f.write(<<~TEXT)
|
15
|
+
RSpec.describe("#{singularized_class_name.camelize}") do
|
16
|
+
describe "Define #{singularized_class_name.camelize}" do
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
let(:mutation) do
|
19
|
+
%(mutation {
|
20
|
+
#{singularized_class_name.camelize(:lower)}(input: {}) {
|
21
|
+
response
|
22
|
+
}
|
20
23
|
}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
subject(:result) do
|
28
|
+
SoulsApiSchema.execute(mutation).as_json
|
29
|
+
end
|
24
30
|
|
25
|
-
|
26
|
-
|
31
|
+
it "return #{singularized_class_name.camelize} response" do
|
32
|
+
stub_request(:post, "https://api.mailgun.net/v3/YOUR-MAILGUN-DOMAIN/messages")
|
33
|
+
.to_return(status: 200, body: "", headers: {})
|
34
|
+
begin
|
35
|
+
a1 = result.dig("data", "#{singularized_class_name.camelize(:lower)}")
|
36
|
+
raise unless a1.present?
|
37
|
+
rescue StandardError
|
38
|
+
raise(StandardError, result)
|
39
|
+
end
|
40
|
+
expect(a1).to(include("response" => be_a(String)))
|
41
|
+
end
|
27
42
|
end
|
43
|
+
end
|
44
|
+
TEXT
|
45
|
+
end
|
46
|
+
else
|
47
|
+
File.open(file_path, "w") do |f|
|
48
|
+
f.write(<<~TEXT)
|
49
|
+
RSpec.describe("#{singularized_class_name.camelize}") do
|
50
|
+
describe "Define #{singularized_class_name.camelize}" do
|
51
|
+
|
52
|
+
let(:mutation) do
|
53
|
+
%(mutation {
|
54
|
+
#{singularized_class_name.camelize(:lower)}(input: {}) {
|
55
|
+
response
|
56
|
+
}
|
57
|
+
}
|
58
|
+
)
|
59
|
+
end
|
60
|
+
|
61
|
+
subject(:result) do
|
62
|
+
SoulsApiSchema.execute(mutation).as_json
|
63
|
+
end
|
28
64
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
65
|
+
it "return #{singularized_class_name.camelize} response" do
|
66
|
+
begin
|
67
|
+
a1 = result.dig("data", "#{singularized_class_name.camelize(:lower)}")
|
68
|
+
raise unless a1.present?
|
69
|
+
rescue StandardError
|
70
|
+
raise(StandardError, result)
|
71
|
+
end
|
72
|
+
expect(a1).to(include("response" => be_a(String)))
|
35
73
|
end
|
36
|
-
expect(a1).to(include("response" => be_a(String)))
|
37
74
|
end
|
38
75
|
end
|
39
|
-
|
40
|
-
|
76
|
+
TEXT
|
77
|
+
end
|
41
78
|
end
|
42
79
|
puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
|
43
80
|
file_path
|
@@ -27,7 +27,7 @@ module Souls
|
|
27
27
|
SoulsApiSchema.execute(mutation).as_json
|
28
28
|
end
|
29
29
|
|
30
|
-
it "return
|
30
|
+
it "return User response" do
|
31
31
|
begin
|
32
32
|
a1 = result.dig("data", "#{options[:mutation].singularize.camelize(:lower)}", "response")
|
33
33
|
raise unless a1.present?
|
@@ -22,6 +22,14 @@ module Souls
|
|
22
22
|
Souls::Github.new.invoke(:secret_set)
|
23
23
|
end
|
24
24
|
|
25
|
+
desc "watch", "Watch GitHub Actions Workflow"
|
26
|
+
def watch
|
27
|
+
run_id = `gh run list | grep Mailer | awk '{print $7}'`.strip
|
28
|
+
raise(StandardError, "No workflow is running.") if run_id.include?("push")
|
29
|
+
|
30
|
+
system("gh run watch #{run_id}")
|
31
|
+
end
|
32
|
+
|
25
33
|
private
|
26
34
|
|
27
35
|
def update_env_production(key:, value:, dqm: false)
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.5
|
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.5
|
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.6.
|
4
|
+
version: 1.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
@@ -232,7 +232,7 @@ licenses:
|
|
232
232
|
metadata:
|
233
233
|
homepage_uri: https://souls.elsoul.nl
|
234
234
|
source_code_uri: https://github.com/elsoul/souls
|
235
|
-
changelog_uri: https://github.com/elsoul/souls
|
235
|
+
changelog_uri: https://github.com/elsoul/souls/releases/tag/v1.6.5
|
236
236
|
post_install_message:
|
237
237
|
rdoc_options: []
|
238
238
|
require_paths:
|