eac_ruby_gem_support 0.3.3 → 0.5.1

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: 841cb9c3f61d1207cff12a90f1a05df6762c1656959890711c7e1590de86e22c
4
- data.tar.gz: 99bc488cbb4754ad0ba5fc0f535a2b832df38a59d11d524e95b5ed18c68f9899
3
+ metadata.gz: 5950a290db342f30cd1ef6a454aa227aa84f8b9c81cdb1171483cfac7c75b2c9
4
+ data.tar.gz: 56245c1d2ff726893d56d6d8f2433cc5c1e443b52133d319050f672eae618a21
5
5
  SHA512:
6
- metadata.gz: d847fbc3ea74aa1574288fd903bdb8f5a57ab8708e62b2de822480797a2094d01e87e4b7592be674d647906f16741a5ea807d87fc3d729d73fb7ad155bc2b285
7
- data.tar.gz: db410649565cb4b121e902b960e958ebb16fb3fa5020606dfe475327b078c7fdbcac39ea8a8034be80ed84b74d1670a0fffeef68299bcf066f4787fbeb481d15
6
+ metadata.gz: 6a0e1da44ae1aca13e3a349e8f2736afffd3feb03a3dd60e3928c4df8de72bbd58f95c4f7d63389d771d6d7c9217db2f311e09d0f0cbb9612c2116e330666c57
7
+ data.tar.gz: 25272c2904eff7fd68dd65b2a06bbe69ba993212bfdb4a5e96e89be5285b02dcb3f7b76ea91425521796d82fd1394d35cf6f4362fdb202a2b804639e358af888
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fileutils'
4
+ require 'tmpdir'
5
+ require 'tempfile'
6
+
7
+ module EacRubyGemSupport
8
+ module Rspec
9
+ module Helpers
10
+ module Utils
11
+ # @return [StandardError, nil] If block raises an error, return this error. If not, return
12
+ # +nil+.
13
+ def capture_error
14
+ yield
15
+ nil
16
+ rescue ::StandardError => e
17
+ e
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
4
  require 'eac_ruby_gem_support/rspec/helpers/filesystem'
5
+ require 'eac_ruby_gem_support/rspec/helpers/utils'
5
6
  require 'eac_ruby_gem_support/rspec/specs/rubocop'
6
7
  require 'tmpdir'
7
8
 
@@ -19,6 +20,7 @@ module EacRubyGemSupport
19
20
 
20
21
  def setup_filesystem_helper
21
22
  rspec_config.include ::EacRubyGemSupport::Rspec::Helpers::Filesystem
23
+ rspec_config.include ::EacRubyGemSupport::Rspec::Helpers::Utils
22
24
  rspec_config.after(:each) { purge_temp_files }
23
25
  end
24
26
 
@@ -32,7 +34,16 @@ module EacRubyGemSupport
32
34
 
33
35
  # @return [Pathname]
34
36
  def example_persistence_path
35
- ::File.join(::Dir.tmpdir, app_root_path.basename.to_path.variableize).to_pathname
37
+ root_tmp.join('example_status_persistence')
38
+ end
39
+
40
+ # The root directory for temporary files.
41
+ # @return [Pathname]
42
+ def root_tmp
43
+ r = ::Pathname.new(::Dir.tmpdir)
44
+ .join(app_root_path.expand_path.to_path.variableize + '_specs_tmp')
45
+ r.mkpath unless r.exist?
46
+ r
36
47
  end
37
48
  end
38
49
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyGemSupport
4
- VERSION = '0.3.3'
4
+ VERSION = '0.5.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_ruby_gem_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-15 00:00:00.000000000 Z
11
+ date: 2022-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_ruby_utils
@@ -89,6 +89,7 @@ files:
89
89
  - lib/eac_ruby_gem_support.rb
90
90
  - lib/eac_ruby_gem_support/rspec.rb
91
91
  - lib/eac_ruby_gem_support/rspec/helpers/filesystem.rb
92
+ - lib/eac_ruby_gem_support/rspec/helpers/utils.rb
92
93
  - lib/eac_ruby_gem_support/rspec/setup.rb
93
94
  - lib/eac_ruby_gem_support/rspec/specs/rubocop.rb
94
95
  - lib/eac_ruby_gem_support/version.rb