eac_ruby_gem_support 0.3.0 → 0.3.1

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: 4a68c6c81f0347a649ef8c9e77653d5119b060d0fd288bc60a926ca94d4d38e4
4
- data.tar.gz: f54ede8dae8455aa64923620841a7cfa4affc93f54f7e1ae36d4246396a0f6ea
3
+ metadata.gz: 84b3ca5402c7c6e6f3db0c188918cb13068e4910ae638347460d7247ebbb6e89
4
+ data.tar.gz: 39ce126f55b25a5fc2e2a665795b2cfd5c2c63e95b8c4424372e4b66d73e8cae
5
5
  SHA512:
6
- metadata.gz: 3d3f9ca90a5683821f98d603cef434614b41b7c1879cd0cd92452657e632667dee069640f72833f74a7b50dba93b5e717c02e971b601aa6e70f703293527b3b2
7
- data.tar.gz: 3c886d153dc873c94c3d29f2aa40a5ee5084b1a35fb65e37d280f9e61c094de85f00e0ddfbf8920281c89a4e36eaebae4b3f95fabd6028a7b74c29b89660c24a
6
+ metadata.gz: eee5209187b9d48ac954e710bf3b7e466ffb556325f88e8379fceb980a508ede8d7df5f3dcea661b32c5ee4ae36cf9b8a886b1df22c9a37e7cc26666ffaa050a
7
+ data.tar.gz: 94ea6d74d01eff15e49da65069cd3f70cf8f4024cf8beeeee97e07492cf15865ac16872cc2a555d6f1685df70789c12a5138cbb21cef0ff2285c84da156caf83
@@ -0,0 +1,42 @@
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
+ class Setup
11
+ common_constructor :setup_obj
12
+
13
+ def perform
14
+ setup_obj.singleton_class.include ::EacRubyGemSupport::Rspec::Specs::Rubocop
15
+ setup_load_path
16
+ setup_example_persistence
17
+ setup_filesystem_helper
18
+ end
19
+
20
+ private
21
+
22
+ def setup_filesystem_helper
23
+ setup_obj.rspec_config.include ::EacRubyGemSupport::Rspec::Helpers::Filesystem
24
+ setup_obj.rspec_config.after(:each) { purge_temp_files }
25
+ end
26
+
27
+ def setup_load_path
28
+ $LOAD_PATH.push setup_obj.app_root_path.join('lib').to_path
29
+ end
30
+
31
+ def setup_example_persistence
32
+ setup_obj.rspec_config.example_status_persistence_file_path =
33
+ example_persistence_path.to_path
34
+ end
35
+
36
+ # @return [Pathname]
37
+ def example_persistence_path
38
+ ::File.join(::Dir.tmpdir, setup_obj.app_root_path.basename.to_path.variableize).to_pathname
39
+ end
40
+ end
41
+ end
42
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyGemSupport
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.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.0
4
+ version: 0.3.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-07-25 00:00:00.000000000 Z
11
+ date: 2021-07-31 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.70'
19
+ version: '0.72'
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.70'
26
+ version: '0.72'
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/setup_include.rb
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