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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5950a290db342f30cd1ef6a454aa227aa84f8b9c81cdb1171483cfac7c75b2c9
|
4
|
+
data.tar.gz: 56245c1d2ff726893d56d6d8f2433cc5c1e443b52133d319050f672eae618a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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.
|
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:
|
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
|