eac_ruby_gem_support 0.13.0 → 0.14.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: 75e3a504328508607e51a61aa5bd94951c00edd0b74c2aa63717769e88b561c7
|
|
4
|
+
data.tar.gz: cbf8f58c2a0e7a962ffcc89c34902dc57afaeb68cc1f6e1ed57c34d3f1f8a47f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e62c0792ffe172e19ca0cefc9fbc8cd6cf66738e4d0db7c67566339c0f91440d096c8131ee322257b600d5507dfe1a95f50b8fdf1de6c1300d077e63d3098d86
|
|
7
|
+
data.tar.gz: 724dec9a07fb68356e835f51fe7dddc59e6af264af4cfe5fb71521b04d6dae6ca51525f3fc9af3d71d044881c94881dd338d041987e089070dc0d9fb0e36fc50
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'rspec'
|
|
4
|
+
require 'rubocop'
|
|
5
|
+
|
|
6
|
+
module EacRubyGemSupport
|
|
7
|
+
module Rspec
|
|
8
|
+
module Setup
|
|
9
|
+
module Rubocop
|
|
10
|
+
RUN_LAST_METADATA_KEY = :eac_ruby_gem_support_rubocop_check
|
|
11
|
+
|
|
12
|
+
def describe_rubocop # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
13
|
+
this = self
|
|
14
|
+
::RSpec.describe ::RuboCop, RUN_LAST_METADATA_KEY => true do
|
|
15
|
+
before do
|
|
16
|
+
::RuboCop::ConfigLoader.ignore_parent_exclusion = true
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
let(:root_path) { this.app_root_path }
|
|
20
|
+
let(:config_store) do
|
|
21
|
+
r = ::RuboCop::ConfigStore.new
|
|
22
|
+
r.for(root_path)
|
|
23
|
+
r
|
|
24
|
+
end
|
|
25
|
+
let(:runner) { ::RuboCop::Runner.new({}, config_store) }
|
|
26
|
+
|
|
27
|
+
it 'rubocop return ok' do
|
|
28
|
+
expect(::Dir.chdir(root_path) { runner.run([]) }).to eq(true)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @return [void]
|
|
34
|
+
def setup_rubocop
|
|
35
|
+
setup_rubocop_last
|
|
36
|
+
describe_rubocop unless specific_files_requested?
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @return [void]
|
|
40
|
+
def setup_rubocop_last
|
|
41
|
+
previous_strategy = ::RSpec.configuration.ordering_registry.fetch(:global)
|
|
42
|
+
::RSpec.configure do |config|
|
|
43
|
+
config.register_ordering(:global) do |list|
|
|
44
|
+
ordered = previous_strategy.order(list)
|
|
45
|
+
last, others = ordered.partition { |item| item.metadata[RUN_LAST_METADATA_KEY] }
|
|
46
|
+
others + last
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# @return [Boolean]
|
|
52
|
+
def specific_files_requested?
|
|
53
|
+
config = ::RSpec.configuration
|
|
54
|
+
files_or_directories = config.instance_variable_get(:@files_or_directories_to_run)
|
|
55
|
+
default_pattern = ::RSpec::Core::Configuration.new.pattern
|
|
56
|
+
files_or_directories != [config.default_path] || config.pattern != default_pattern
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -6,9 +6,8 @@ module EacRubyGemSupport
|
|
|
6
6
|
module Rspec
|
|
7
7
|
module Setup
|
|
8
8
|
extend ::ActiveSupport::Concern
|
|
9
|
-
include ::EacRubyGemSupport::Rspec::Specs::Rubocop
|
|
10
9
|
|
|
11
|
-
SETUPS = %w[load_path example_persistence filesystem_helper shared_examples].freeze
|
|
10
|
+
SETUPS = %w[load_path example_persistence filesystem_helper shared_examples rubocop].freeze
|
|
12
11
|
|
|
13
12
|
def self.extended(setup_obj)
|
|
14
13
|
SETUPS.each { |s| setup_obj.send("setup_#{s}") }
|
|
@@ -46,6 +45,8 @@ module EacRubyGemSupport
|
|
|
46
45
|
r.mkpath unless r.exist?
|
|
47
46
|
r
|
|
48
47
|
end
|
|
48
|
+
|
|
49
|
+
require_sub __FILE__, include_modules: true
|
|
49
50
|
end
|
|
50
51
|
end
|
|
51
52
|
end
|
data/lib/eac_ruby_gem_support.rb
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require '
|
|
4
|
-
|
|
3
|
+
require 'eac_ruby_base1'
|
|
4
|
+
EacRubyBase1::RootModuleSetup.perform __FILE__ do
|
|
5
5
|
ignore 'rspec/shared_examples/**/*'
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
require 'active_support
|
|
9
|
-
require 'super_diff'
|
|
10
|
-
require 'super_diff/active_support'
|
|
11
|
-
require 'super_diff/rspec'
|
|
12
|
-
|
|
13
|
-
module EacRubyGemSupport
|
|
6
|
+
require 'active_support/ordered_options' # Fix "super_diff" '0.18.0'.
|
|
7
|
+
require 'super_diff'
|
|
8
|
+
require 'super_diff/active_support'
|
|
9
|
+
require 'super_diff/rspec'
|
|
14
10
|
end
|
metadata
CHANGED
|
@@ -1,29 +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.14.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: 2026-
|
|
11
|
+
date: 2026-07-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: eac_ruby_base1
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.
|
|
19
|
+
version: '0.1'
|
|
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.1'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rspec
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -50,54 +50,54 @@ dependencies:
|
|
|
50
50
|
requirements:
|
|
51
51
|
- - "~>"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '1.
|
|
53
|
+
version: '1.88'
|
|
54
54
|
- - ">="
|
|
55
55
|
- !ruby/object:Gem::Version
|
|
56
|
-
version: 1.
|
|
56
|
+
version: 1.88.2
|
|
57
57
|
type: :runtime
|
|
58
58
|
prerelease: false
|
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
61
|
- - "~>"
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: '1.
|
|
63
|
+
version: '1.88'
|
|
64
64
|
- - ">="
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: 1.
|
|
66
|
+
version: 1.88.2
|
|
67
67
|
- !ruby/object:Gem::Dependency
|
|
68
68
|
name: rubocop-rails
|
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
|
70
70
|
requirements:
|
|
71
71
|
- - "~>"
|
|
72
72
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '2.
|
|
74
|
-
- - ">="
|
|
75
|
-
- !ruby/object:Gem::Version
|
|
76
|
-
version: 2.34.3
|
|
73
|
+
version: '2.36'
|
|
77
74
|
type: :runtime
|
|
78
75
|
prerelease: false
|
|
79
76
|
version_requirements: !ruby/object:Gem::Requirement
|
|
80
77
|
requirements:
|
|
81
78
|
- - "~>"
|
|
82
79
|
- !ruby/object:Gem::Version
|
|
83
|
-
version: '2.
|
|
84
|
-
- - ">="
|
|
85
|
-
- !ruby/object:Gem::Version
|
|
86
|
-
version: 2.34.3
|
|
80
|
+
version: '2.36'
|
|
87
81
|
- !ruby/object:Gem::Dependency
|
|
88
82
|
name: rubocop-rspec
|
|
89
83
|
requirement: !ruby/object:Gem::Requirement
|
|
90
84
|
requirements:
|
|
91
85
|
- - "~>"
|
|
92
86
|
- !ruby/object:Gem::Version
|
|
93
|
-
version: '3.
|
|
87
|
+
version: '3.10'
|
|
88
|
+
- - ">="
|
|
89
|
+
- !ruby/object:Gem::Version
|
|
90
|
+
version: 3.10.2
|
|
94
91
|
type: :runtime
|
|
95
92
|
prerelease: false
|
|
96
93
|
version_requirements: !ruby/object:Gem::Requirement
|
|
97
94
|
requirements:
|
|
98
95
|
- - "~>"
|
|
99
96
|
- !ruby/object:Gem::Version
|
|
100
|
-
version: '3.
|
|
97
|
+
version: '3.10'
|
|
98
|
+
- - ">="
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: 3.10.2
|
|
101
101
|
- !ruby/object:Gem::Dependency
|
|
102
102
|
name: super_diff
|
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -123,11 +123,11 @@ files:
|
|
|
123
123
|
- lib/eac_ruby_gem_support/rspec/helpers/filesystem.rb
|
|
124
124
|
- lib/eac_ruby_gem_support/rspec/helpers/utils.rb
|
|
125
125
|
- lib/eac_ruby_gem_support/rspec/setup.rb
|
|
126
|
+
- lib/eac_ruby_gem_support/rspec/setup/rubocop.rb
|
|
126
127
|
- lib/eac_ruby_gem_support/rspec/shared_examples/source_target_fixtures.rb
|
|
127
128
|
- lib/eac_ruby_gem_support/rspec/shared_examples/spec_paths.rb
|
|
128
129
|
- lib/eac_ruby_gem_support/rspec/source_target_fixtures_controller.rb
|
|
129
130
|
- lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb
|
|
130
|
-
- lib/eac_ruby_gem_support/rspec/specs/rubocop.rb
|
|
131
131
|
- lib/eac_ruby_gem_support/source_target_fixtures.rb
|
|
132
132
|
- lib/eac_ruby_gem_support/source_target_fixtures/source_target_file.rb
|
|
133
133
|
- lib/eac_ruby_gem_support/version.rb
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'rspec'
|
|
4
|
-
require 'rubocop'
|
|
5
|
-
|
|
6
|
-
module EacRubyGemSupport
|
|
7
|
-
module Rspec
|
|
8
|
-
module Specs
|
|
9
|
-
module Rubocop
|
|
10
|
-
def describe_rubocop # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
11
|
-
this = self
|
|
12
|
-
::RSpec.describe ::RuboCop do
|
|
13
|
-
before do
|
|
14
|
-
::RuboCop::ConfigLoader.ignore_parent_exclusion = true
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
let(:root_path) { this.app_root_path }
|
|
18
|
-
let(:config_store) do
|
|
19
|
-
r = ::RuboCop::ConfigStore.new
|
|
20
|
-
r.for(root_path)
|
|
21
|
-
r
|
|
22
|
-
end
|
|
23
|
-
let(:runner) { ::RuboCop::Runner.new({}, config_store) }
|
|
24
|
-
|
|
25
|
-
it 'rubocop return ok' do
|
|
26
|
-
expect(::Dir.chdir(root_path) { runner.run([]) }).to eq(true)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|