souls 1.6.0 → 1.6.4

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: b1e142b60e401ade7ffda7ba7595afbd93f100705477fdade05880146fea7c1c
4
- data.tar.gz: 6789297e1f035bdeacbf8e924ca6144a6ab94db19b9e77de932d3196d4a0ec91
3
+ metadata.gz: 5e2a7a90fc039851ad49fbe0a676aa74bac1bb1f6be6db3e5fec02475c169cf3
4
+ data.tar.gz: 1f7e9643586cbbb93ae90c9609cb68286d00ebcff3a1ea902d812300e1b96879
5
5
  SHA512:
6
- metadata.gz: eb60c2fe6c785b1741a5f6f491e0c0d88248ef16c0a3953d3347ca81bc2a89a360394fbd8744f16a11ed69bf2988d304c7149e3f97e03186abb3dab4adca5a99
7
- data.tar.gz: 33a497afe8c94b6e2e6b4ae2ece5e60cd38dce565a4b6fd6ade77d265fde3a6cf0ef6084b9c1d3ae459319fe865abe7d9334bed8c3a9f15ffda5c5c9cf6ad98c
6
+ metadata.gz: b3c030e46fc9a3394e745d2a5396f6f89b1998478c36766bc7ffe0fe0cd09ef851e14d9b81bb2955802be94f331ec6d022414d137d0c2f7fe4999120749cb820
7
+ data.tar.gz: 68605f4a7a313dda42e1c91bc379d36f6abf1d2ccbc0e6dd6eedd64ec041df9e4cc8c8a27e6d54dc811ce3e083c072ee517325e7e41fbd36f727b6466bcf3ec0
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 confif! Please make `./config/souls.rb` File!")
8
+ raise(StandardError, "No config! Please make `./config/souls.rb` File!")
9
9
  end
10
10
 
11
11
  Souls::CLI.start
@@ -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 #{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
- 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 #{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
- 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
@@ -27,7 +27,7 @@ module Souls
27
27
  SoulsApiSchema.execute(mutation).as_json
28
28
  end
29
29
 
30
- it "return StockSheet Data" do
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,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.6.0".freeze
2
+ VERSION = "1.6.4".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.6.0
1
+ 1.6.4
@@ -1 +1 @@
1
- 1.6.0
1
+ 1.6.4
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.0
4
+ version: 1.6.4
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.4
236
236
  post_install_message:
237
237
  rdoc_options: []
238
238
  require_paths: