souls 1.5.7 → 1.6.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 -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/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: e0b6870319e1ec1a6b819c2b56e817cb9e8d831305388a2d43e047f8244c0916
|
4
|
+
data.tar.gz: c04a0bcdca122e881b32bf78c29060d078cdb6aa30b7ed674797f2201c740709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d46e174bed964ed2eee82d92d56d8f9c4a051a53713e7ba2a0cc9c3f5ebd04b24885930d2136acdfdfb66d8f6a591c760c5677fc41e3dfd9211db3fafd0a9fb7
|
7
|
+
data.tar.gz: 9a446715a7e901c7637dd70c34b0739427d123aa3414f6ae361b63bf0ebe31e48e585730cc28b384c0226d883e0d396a0b8a6a399db25c38d1f1c350ce4b6bc3
|
@@ -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 StockSheet Data" 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 StockSheet Data" 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
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.3
|
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.3
|
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.
|
4
|
+
version: 1.6.3
|
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/1.6.3
|
236
236
|
post_install_message:
|
237
237
|
rdoc_options: []
|
238
238
|
require_paths:
|