stack_trace-rspec 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e87256ab41b5337395f25ec03dd050f8943f336a087f53e2645ddad48e045976
4
- data.tar.gz: 2ff5f9c437d80e5750d41a7d8f47f8c91bc2e51c703d2feb334986ade2cc460a
3
+ metadata.gz: 8c919857275574dcd0d3892bb2fae3b137e742de6fb542a0bdee4424aa0e5513
4
+ data.tar.gz: 43e7a4987ddc23299d00d1ee19405705d68f78875784a6e97b603cc3419e6c52
5
5
  SHA512:
6
- metadata.gz: 451a1965d98455b1895d5ed5bd86100f5ef5105270c2739e080321f274ed967ab3bd3a5e268ff59058364983deb1bad4e1b938df9d539bd9aeeaa5918039f3ed
7
- data.tar.gz: f0ffcfd14540dacd37142dab92d9bc12ccb34308e404e47f3aa1137fd2d48e6e87cf456472cad72309cedd6894ebbe402e861d1ac2fb319b4e7682fbed3fcb1d
6
+ metadata.gz: 66fada6f46c3967efb4d99f6daad8a2bf6fe3419c079bb3f61ad4b41c89b92b67ddaf4e36fd635b304c423038ba7e4c64b8c9f15651dd26d9b13e74d5b7fd956
7
+ data.tar.gz: daa880aba8892dcedd3a3c00b559b50ef3aafe6a0b7018fe1e6847f5ef2ef2b459f42981c04f767537a1ada6afb1db48cb206c38d001cb52eac71922764b0452
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stack_trace-rspec (0.1.3)
4
+ stack_trace-rspec (0.1.4)
5
5
  stack_trace-viz (~> 0.2)
6
6
 
7
7
  GEM
@@ -2,6 +2,6 @@
2
2
 
3
3
  module StackTrace
4
4
  module Rspec
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
@@ -29,6 +29,8 @@ module StackTrace
29
29
 
30
30
  class << self
31
31
  def finish_tracing
32
+ ensure_path_is_created!
33
+
32
34
  html.save(file_path)
33
35
  .then { |path| print_message(path) }
34
36
  end
@@ -39,6 +41,10 @@ module StackTrace
39
41
 
40
42
  private
41
43
 
44
+ def ensure_path_is_created!
45
+ Dir.mkdir(file_dir) unless File.directory?(file_dir)
46
+ end
47
+
42
48
  def html
43
49
  @html ||= StackTrace::Viz::HTML.new
44
50
  end
@@ -48,9 +54,12 @@ module StackTrace
48
54
  end
49
55
 
50
56
  def file_path
57
+ file_dir.join("#{SecureRandom.uuid}.html")
58
+ end
59
+
60
+ def file_dir
51
61
  Pathname.new(RSpec.configuration.default_path)
52
62
  .join("stack_trace")
53
- .join("#{Securerandom.uuid}.html")
54
63
  end
55
64
  end
56
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack_trace-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehmet Emin INAC