eac_ruby_gem_support 0.3.0 → 0.4.0
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: 9f0126919f17364de71fda5732bcfb16039b6dbe95afcbc81c9765136a931e11
|
4
|
+
data.tar.gz: 5b935c6a042d5a31eb52fb1c9ca88915b07f7956e4898f63107c6111fcdb39cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33e1865c9395e630c625a95ff298770bf8e4da31dbea555c933100f5dc9fd5a7314191e02921404eace12299825e8bf6d972b2e30d80ea5639252b1ac219a416
|
7
|
+
data.tar.gz: ce079ff56c0dced8d63c09126fd0ef461891a63263df321befecdce7ab227c33b6a05aa6adce7acebf7e081646d850b94002235ac5cc8f17e689b5c1f1a7bf81
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'eac_ruby_gem_support/rspec/helpers/filesystem'
|
5
|
+
require 'eac_ruby_gem_support/rspec/specs/rubocop'
|
6
|
+
require 'tmpdir'
|
7
|
+
|
8
|
+
module EacRubyGemSupport
|
9
|
+
module Rspec
|
10
|
+
module Setup
|
11
|
+
extend ::ActiveSupport::Concern
|
12
|
+
include ::EacRubyGemSupport::Rspec::Specs::Rubocop
|
13
|
+
|
14
|
+
def self.extended(setup_obj)
|
15
|
+
setup_obj.setup_load_path
|
16
|
+
setup_obj.setup_example_persistence
|
17
|
+
setup_obj.setup_filesystem_helper
|
18
|
+
end
|
19
|
+
|
20
|
+
def setup_filesystem_helper
|
21
|
+
rspec_config.include ::EacRubyGemSupport::Rspec::Helpers::Filesystem
|
22
|
+
rspec_config.after(:each) { purge_temp_files }
|
23
|
+
end
|
24
|
+
|
25
|
+
def setup_load_path
|
26
|
+
$LOAD_PATH.push app_root_path.join('lib').to_path
|
27
|
+
end
|
28
|
+
|
29
|
+
def setup_example_persistence
|
30
|
+
rspec_config.example_status_persistence_file_path = example_persistence_path.to_path
|
31
|
+
end
|
32
|
+
|
33
|
+
# @return [Pathname]
|
34
|
+
def example_persistence_path
|
35
|
+
root_tmp.join('example_status_persistence')
|
36
|
+
end
|
37
|
+
|
38
|
+
# The root directory for temporary files.
|
39
|
+
# @return [Pathname]
|
40
|
+
def root_tmp
|
41
|
+
r = ::Pathname.new(::Dir.tmpdir)
|
42
|
+
.join(app_root_path.expand_path.to_path.variableize + '_specs_tmp')
|
43
|
+
r.mkpath unless r.exist?
|
44
|
+
r
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
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.4.0
|
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-
|
11
|
+
date: 2021-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_ruby_utils
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.74'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.74'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,7 +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/
|
92
|
+
- lib/eac_ruby_gem_support/rspec/setup.rb
|
93
93
|
- lib/eac_ruby_gem_support/rspec/specs/rubocop.rb
|
94
94
|
- lib/eac_ruby_gem_support/version.rb
|
95
95
|
homepage: https://github.com/esquilo-azul/eac_ruby_gem_support
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
require 'eac_ruby_gem_support/rspec/helpers/filesystem'
|
5
|
-
require 'eac_ruby_gem_support/rspec/specs/rubocop'
|
6
|
-
require 'tmpdir'
|
7
|
-
|
8
|
-
module EacRubyGemSupport
|
9
|
-
module Rspec
|
10
|
-
module SetupInclude
|
11
|
-
common_concern do
|
12
|
-
include ::EacRubyGemSupport::Rspec::Specs::Rubocop
|
13
|
-
end
|
14
|
-
|
15
|
-
class << self
|
16
|
-
def setup(setup_obj)
|
17
|
-
setup_load_path(setup_obj)
|
18
|
-
setup_example_persistence(setup_obj)
|
19
|
-
setup_filesystem_helper(setup_obj)
|
20
|
-
end
|
21
|
-
|
22
|
-
private
|
23
|
-
|
24
|
-
def setup_filesystem_helper(setup_obj)
|
25
|
-
setup_obj.rspec_config.include ::EacRubyGemSupport::Rspec::Helpers::Filesystem
|
26
|
-
setup_obj.rspec_config.after(:each) { purge_temp_files }
|
27
|
-
end
|
28
|
-
|
29
|
-
def setup_load_path(setup_obj)
|
30
|
-
$LOAD_PATH.push setup_obj.app_root_path.join('lib').to_path
|
31
|
-
end
|
32
|
-
|
33
|
-
def setup_example_persistence(setup_obj)
|
34
|
-
setup_obj.rspec_config.example_status_persistence_file_path =
|
35
|
-
setup_obj.example_persistence_path.to_path
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
# @return [Pathname]
|
40
|
-
def example_persistence_path
|
41
|
-
::File.join(::Dir.tmpdir, app_root_path.basename.to_path.variableize).to_pathname
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|