eac_ruby_gem_support 0.2.0 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eac_ruby_gem_support/rspec.rb +3 -38
- data/lib/eac_ruby_gem_support/rspec/helpers/filesystem.rb +1 -1
- data/lib/eac_ruby_gem_support/rspec/setup.rb +39 -0
- data/lib/eac_ruby_gem_support/rspec/specs/rubocop.rb +1 -1
- data/lib/eac_ruby_gem_support/version.rb +1 -1
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 841cb9c3f61d1207cff12a90f1a05df6762c1656959890711c7e1590de86e22c
|
4
|
+
data.tar.gz: 99bc488cbb4754ad0ba5fc0f535a2b832df38a59d11d524e95b5ed18c68f9899
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d847fbc3ea74aa1574288fd903bdb8f5a57ab8708e62b2de822480797a2094d01e87e4b7592be674d647906f16741a5ea807d87fc3d729d73fb7ad155bc2b285
|
7
|
+
data.tar.gz: db410649565cb4b121e902b960e958ebb16fb3fa5020606dfe475327b078c7fdbcac39ea8a8034be80ed84b74d1670a0fffeef68299bcf066f4787fbeb481d15
|
@@ -1,44 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require 'eac_ruby_gem_support/rspec/specs/rubocop'
|
5
|
-
require 'rspec'
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
6
4
|
|
7
5
|
module EacRubyGemSupport
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def default
|
13
|
-
@default || raise("Default instance was not set. Use #{self.class.name}.setup")
|
14
|
-
end
|
15
|
-
|
16
|
-
def setup(app_root_path, config = nil)
|
17
|
-
@default = if config
|
18
|
-
new(app_root_path, config)
|
19
|
-
else
|
20
|
-
::RSpec.configure { |new_config| new(app_root_path, new_config) }
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
attr_reader :app_root_path, :config
|
26
|
-
|
27
|
-
def initialize(app_root_path, config)
|
28
|
-
@app_root_path = app_root_path
|
29
|
-
@config = config
|
30
|
-
setup
|
31
|
-
end
|
32
|
-
|
33
|
-
protected
|
34
|
-
|
35
|
-
def setup
|
36
|
-
setup_filesystem_helper
|
37
|
-
end
|
38
|
-
|
39
|
-
def setup_filesystem_helper
|
40
|
-
config.include ::EacRubyGemSupport::Rspec::Helpers::Filesystem
|
41
|
-
config.after(:each) { purge_temp_files }
|
42
|
-
end
|
6
|
+
module Rspec
|
7
|
+
require_sub __FILE__
|
43
8
|
end
|
44
9
|
end
|
@@ -0,0 +1,39 @@
|
|
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
|
+
::File.join(::Dir.tmpdir, app_root_path.basename.to_path.variableize).to_pathname
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
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.3.3
|
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-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: eac_ruby_utils
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.74'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.74'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rspec
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,6 +89,7 @@ files:
|
|
75
89
|
- lib/eac_ruby_gem_support.rb
|
76
90
|
- lib/eac_ruby_gem_support/rspec.rb
|
77
91
|
- lib/eac_ruby_gem_support/rspec/helpers/filesystem.rb
|
92
|
+
- lib/eac_ruby_gem_support/rspec/setup.rb
|
78
93
|
- lib/eac_ruby_gem_support/rspec/specs/rubocop.rb
|
79
94
|
- lib/eac_ruby_gem_support/version.rb
|
80
95
|
homepage: https://github.com/esquilo-azul/eac_ruby_gem_support
|
@@ -96,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
111
|
- !ruby/object:Gem::Version
|
97
112
|
version: '0'
|
98
113
|
requirements: []
|
99
|
-
rubygems_version: 3.
|
114
|
+
rubygems_version: 3.1.6
|
100
115
|
signing_key:
|
101
116
|
specification_version: 4
|
102
117
|
summary: Development support for Ruby' Gem.
|