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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9668744d6f7ab994894ba17ef1c53d0f69b5e828a6fc4720645ce7bc43ea6c4f
4
- data.tar.gz: bc9f74c7d5c3b79ac0e0dcb89a5dfc8065eb1596f6bae120b038090dadf6b3cc
3
+ metadata.gz: e0b6870319e1ec1a6b819c2b56e817cb9e8d831305388a2d43e047f8244c0916
4
+ data.tar.gz: c04a0bcdca122e881b32bf78c29060d078cdb6aa30b7ed674797f2201c740709
5
5
  SHA512:
6
- metadata.gz: f833edff4c62daa9f6c43a86070c68772da1958e243c8143545446cf3d2ed9ec18376776714a2ba7d8012e101ae80a6e10af1b1010ef90e6a03c92aeb390a992
7
- data.tar.gz: 7abe95a9c4aadde62a01cb293fd4f463518075727590b2bfcfed8252807d7ef5dac803e90a337cf189189e01b07169a54ea81926747f76961b385073a5c203f5
6
+ metadata.gz: d46e174bed964ed2eee82d92d56d8f9c4a051a53713e7ba2a0cc9c3f5ebd04b24885930d2136acdfdfb66d8f6a591c760c5677fc41e3dfd9211db3fafd0a9fb7
7
+ data.tar.gz: 9a446715a7e901c7637dd70c34b0739427d123aa3414f6ae361b63bf0ebe31e48e585730cc28b384c0226d883e0d396a0b8a6a399db25c38d1f1c350ce4b6bc3
@@ -145,6 +145,7 @@ end
145
145
  uses: actions/setup-ruby@v1
146
146
  with:
147
147
  ruby-version: 3.0
148
+ bundler-cache: true
148
149
  - name: Build and test with Rake
149
150
  env:
150
151
  PGHOST: 127.0.0.1
@@ -125,8 +125,7 @@ module Souls
125
125
  gcloud beta sql instances patch #{instance_name} \
126
126
  --project=#{project_id} \
127
127
  --assign-ip \
128
- --authorized-networks=#{ip} \
129
- --quiet
128
+ --authorized-networks=#{ip}
130
129
  "
131
130
  )
132
131
  rescue Thor::Error => e
@@ -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
- File.open(file_path, "w") do |f|
12
- f.write(<<~TEXT)
13
- RSpec.describe("#{singularized_class_name.camelize}") do
14
- describe "Define #{singularized_class_name.camelize}" do
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
- let(:mutation) do
17
- %(mutation {
18
- #{singularized_class_name.camelize(:lower)}(input: {}) {
19
- response
18
+ let(:mutation) do
19
+ %(mutation {
20
+ #{singularized_class_name.camelize(:lower)}(input: {}) {
21
+ response
22
+ }
20
23
  }
21
- }
22
- )
23
- end
24
+ )
25
+ end
26
+
27
+ subject(:result) do
28
+ SoulsApiSchema.execute(mutation).as_json
29
+ end
24
30
 
25
- subject(:result) do
26
- SoulsApiSchema.execute(mutation).as_json
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
- it "return StockSheet Data" do
30
- begin
31
- a1 = result.dig("data", "#{singularized_class_name.camelize(:lower)}")
32
- raise unless a1.present?
33
- rescue StandardError
34
- raise(StandardError, result)
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
- end
40
- TEXT
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,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.5.7".freeze
2
+ VERSION = "1.6.3".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.5.7
1
+ 1.6.3
@@ -1 +1 @@
1
- 1.5.7
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.5.7
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: