eac_ruby_gem_support 0.9.0 → 0.10.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 +4 -4
- data/.rubocop.yml +3 -1
- data/lib/eac_ruby_gem_support/rspec/setup.rb +1 -0
- data/lib/eac_ruby_gem_support/rspec/shared_examples/source_target_fixtures.rb +3 -1
- data/lib/eac_ruby_gem_support/rspec/shared_examples/spec_paths.rb +14 -0
- data/lib/eac_ruby_gem_support/rspec/source_target_fixtures_controller.rb +3 -9
- data/lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb +29 -0
- data/lib/eac_ruby_gem_support/source_target_fixtures.rb +5 -4
- data/lib/eac_ruby_gem_support/version.rb +1 -1
- metadata +16 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 450211e7d4b2284e32d19e3032ad57fabfd50e424df7b8c4bbc027015cc1656c
|
4
|
+
data.tar.gz: 5687dc13fdc0b8839320e5eecd7a7c7f31127680b066e0a3f6f0b04d8a455d32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd51b49b45b9496c9cfa943d89060427b7c33ffdb8c11c03dbaf152248b62516df520124734a7b7fb3ca5e4f8a975e61e5f430c2980a17fb3af69d499bd23746
|
7
|
+
data.tar.gz: b3b27ba660cd10276f27708808df57f0a207c255adea2017d5ce6dee50d860877f4ded84f09b303b2334e9c301323ec33acacaa68acdebe6bd3757221b854884
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
plugins:
|
2
2
|
- rubocop-rails
|
3
3
|
- rubocop-rspec
|
4
4
|
AllCops:
|
@@ -23,6 +23,8 @@ Rails/DynamicFindBy:
|
|
23
23
|
Enabled: false
|
24
24
|
Rails/Exit:
|
25
25
|
Enabled: false
|
26
|
+
Rails/FindEach:
|
27
|
+
Enabled: false
|
26
28
|
Rails/Output:
|
27
29
|
Enabled: false
|
28
30
|
Rails/SkipsModelValidations:
|
@@ -1,12 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'eac_ruby_gem_support/rspec/shared_examples/spec_paths'
|
3
4
|
require 'eac_ruby_gem_support/rspec/source_target_fixtures_controller'
|
4
5
|
require 'eac_ruby_gem_support/source_target_fixtures'
|
5
6
|
require 'yaml'
|
6
7
|
|
7
8
|
RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable Metrics/BlockLength
|
9
|
+
include_examples 'spec_paths', spec_file
|
8
10
|
fixtures_controller = EacRubyGemSupport::Rspec::SourceTargetFixturesController
|
9
|
-
.new(
|
11
|
+
.new(spec_paths_controller)
|
10
12
|
|
11
13
|
let(:fixtures_controller) { fixtures_controller }
|
12
14
|
let(:spec_file) { spec_file }
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_gem_support/rspec/spec_paths_controller'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
RSpec.shared_context 'spec_paths' do |the_spec_file|
|
7
|
+
cattr_accessor :spec_paths_controller
|
8
|
+
self.spec_paths_controller = EacRubyGemSupport::Rspec::SpecPathsController.new(self,
|
9
|
+
the_spec_file)
|
10
|
+
|
11
|
+
%i[fixtures_directory spec_directory spec_file].each do |m|
|
12
|
+
let(m) { self.class.spec_paths_controller.send(m) }
|
13
|
+
end
|
14
|
+
end
|
@@ -7,20 +7,14 @@ module EacRubyGemSupport
|
|
7
7
|
module Rspec
|
8
8
|
class SourceTargetFixturesController
|
9
9
|
enable_simple_cache
|
10
|
-
common_constructor :
|
11
|
-
|
12
|
-
def default_fixtures_dir
|
13
|
-
::File.join(
|
14
|
-
::File.dirname(spec_file),
|
15
|
-
"#{::File.basename(spec_file, '.*')}_files"
|
16
|
-
)
|
17
|
-
end
|
10
|
+
common_constructor :spec_paths_controller
|
11
|
+
delegate :example, to: :spec_paths_controller
|
18
12
|
|
19
13
|
def fixtures_dir
|
20
14
|
if example.respond_to?(:fixtures_dir)
|
21
15
|
example.fixtures_dir
|
22
16
|
else
|
23
|
-
|
17
|
+
spec_paths_controller.fixtures_directory
|
24
18
|
end
|
25
19
|
end
|
26
20
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module EacRubyGemSupport
|
6
|
+
module Rspec
|
7
|
+
class SpecPathsController
|
8
|
+
# @!attribute [r] spec_file
|
9
|
+
# @return [Pathname]
|
10
|
+
|
11
|
+
# @!method initialize(example, spec_file)
|
12
|
+
# @param example [RSpec::Core::ExampleGroup]
|
13
|
+
# @param spec_file [Pathname]
|
14
|
+
common_constructor :example, :spec_file do
|
15
|
+
self.spec_file = spec_file.to_pathname
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [Pathname]
|
19
|
+
def fixtures_directory
|
20
|
+
spec_directory.join(spec_file.basename('.*')).basename_sub { |b| "#{b}_files" }
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [Pathname]
|
24
|
+
def spec_directory
|
25
|
+
spec_file.parent
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -14,11 +14,12 @@ module EacRubyGemSupport
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
|
17
|
+
# @!attribute [r] fixtures_directory
|
18
|
+
# @return [String]
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
# @!method initialize(fixtures_directory)
|
21
|
+
# @param fixtures_directory [Pathname]
|
22
|
+
common_constructor :fixtures_directory
|
22
23
|
|
23
24
|
def source_target_files
|
24
25
|
sources_targets_basenames.map do |basename|
|
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.10.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: 2025-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_ruby_utils
|
@@ -16,88 +16,76 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.119.2
|
19
|
+
version: '0.124'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 0.119.2
|
26
|
+
version: '0.124'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: rspec
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: '3.
|
33
|
+
version: '3.13'
|
40
34
|
type: :runtime
|
41
35
|
prerelease: false
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
38
|
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: '3.
|
40
|
+
version: '3.13'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: rubocop
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '1.
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 1.57.2
|
47
|
+
version: '1.74'
|
57
48
|
type: :runtime
|
58
49
|
prerelease: false
|
59
50
|
version_requirements: !ruby/object:Gem::Requirement
|
60
51
|
requirements:
|
61
52
|
- - "~>"
|
62
53
|
- !ruby/object:Gem::Version
|
63
|
-
version: '1.
|
64
|
-
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 1.57.2
|
54
|
+
version: '1.74'
|
67
55
|
- !ruby/object:Gem::Dependency
|
68
56
|
name: rubocop-rails
|
69
57
|
requirement: !ruby/object:Gem::Requirement
|
70
58
|
requirements:
|
71
59
|
- - "~>"
|
72
60
|
- !ruby/object:Gem::Version
|
73
|
-
version: '2.
|
61
|
+
version: '2.30'
|
74
62
|
- - ">="
|
75
63
|
- !ruby/object:Gem::Version
|
76
|
-
version: 2.
|
64
|
+
version: 2.30.3
|
77
65
|
type: :runtime
|
78
66
|
prerelease: false
|
79
67
|
version_requirements: !ruby/object:Gem::Requirement
|
80
68
|
requirements:
|
81
69
|
- - "~>"
|
82
70
|
- !ruby/object:Gem::Version
|
83
|
-
version: '2.
|
71
|
+
version: '2.30'
|
84
72
|
- - ">="
|
85
73
|
- !ruby/object:Gem::Version
|
86
|
-
version: 2.
|
74
|
+
version: 2.30.3
|
87
75
|
- !ruby/object:Gem::Dependency
|
88
76
|
name: rubocop-rspec
|
89
77
|
requirement: !ruby/object:Gem::Requirement
|
90
78
|
requirements:
|
91
79
|
- - "~>"
|
92
80
|
- !ruby/object:Gem::Version
|
93
|
-
version: '
|
81
|
+
version: '3.5'
|
94
82
|
type: :runtime
|
95
83
|
prerelease: false
|
96
84
|
version_requirements: !ruby/object:Gem::Requirement
|
97
85
|
requirements:
|
98
86
|
- - "~>"
|
99
87
|
- !ruby/object:Gem::Version
|
100
|
-
version: '
|
88
|
+
version: '3.5'
|
101
89
|
description:
|
102
90
|
email:
|
103
91
|
executables: []
|
@@ -111,7 +99,9 @@ files:
|
|
111
99
|
- lib/eac_ruby_gem_support/rspec/helpers/utils.rb
|
112
100
|
- lib/eac_ruby_gem_support/rspec/setup.rb
|
113
101
|
- lib/eac_ruby_gem_support/rspec/shared_examples/source_target_fixtures.rb
|
102
|
+
- lib/eac_ruby_gem_support/rspec/shared_examples/spec_paths.rb
|
114
103
|
- lib/eac_ruby_gem_support/rspec/source_target_fixtures_controller.rb
|
104
|
+
- lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb
|
115
105
|
- lib/eac_ruby_gem_support/rspec/specs/rubocop.rb
|
116
106
|
- lib/eac_ruby_gem_support/source_target_fixtures.rb
|
117
107
|
- lib/eac_ruby_gem_support/source_target_fixtures/source_target_file.rb
|