eac_ruby_gem_support 0.13.0 → 0.15.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 +4 -4
- data/.rubocop.yml +2 -2
- data/lib/eac_ruby_gem_support/rspec/setup/rubocop.rb +61 -0
- data/lib/eac_ruby_gem_support/rspec/setup.rb +3 -2
- data/lib/eac_ruby_gem_support/version.rb +1 -1
- data/lib/eac_ruby_gem_support.rb +5 -10
- metadata +27 -26
- data/lib/eac_ruby_gem_support/rspec/specs/rubocop.rb +0 -33
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e0835d4a6536c14af49bc8344471fd828e11c711a605d911fd35856afa3bc106
|
|
4
|
+
data.tar.gz: c9c79e2326d2abba8c6caa41887fe096ac55d6799f53a2f99cd196d00c958f4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f009e09fd21674873a069b45e9e0604a1d54be455ad8ba86fb02eed3f0da60ce6679340ae7ca219787b789a8625a36650594e1f938b42efaf799e3baffb3a968
|
|
7
|
+
data.tar.gz: d73cefe98a89c66b25d393f508dd6b532252d1de3ffa3b4cf3ad3ef0f03e549446d1a913e1e6f6b2446d714d1e97fc82c3c54bdb317011c81aacdbbc31fa13be
|
data/.rubocop.yml
CHANGED
|
@@ -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,9 @@
|
|
|
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 '
|
|
9
|
-
require 'super_diff'
|
|
10
|
-
require 'super_diff/active_support'
|
|
11
|
-
require 'super_diff/rspec'
|
|
12
|
-
|
|
13
|
-
module EacRubyGemSupport
|
|
6
|
+
require 'super_diff'
|
|
7
|
+
require 'super_diff/active_support'
|
|
8
|
+
require 'super_diff/rspec'
|
|
14
9
|
end
|
metadata
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
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.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esquilo Azul Company
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
13
|
+
name: eac_ruby_base1
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
16
|
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.
|
|
18
|
+
version: '0.1'
|
|
19
|
+
- - ">="
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 0.1.1
|
|
20
22
|
type: :runtime
|
|
21
23
|
prerelease: false
|
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
25
|
requirements:
|
|
24
26
|
- - "~>"
|
|
25
27
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0.
|
|
28
|
+
version: '0.1'
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 0.1.1
|
|
27
32
|
- !ruby/object:Gem::Dependency
|
|
28
33
|
name: rspec
|
|
29
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -50,54 +55,54 @@ dependencies:
|
|
|
50
55
|
requirements:
|
|
51
56
|
- - "~>"
|
|
52
57
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '1.
|
|
58
|
+
version: '1.88'
|
|
54
59
|
- - ">="
|
|
55
60
|
- !ruby/object:Gem::Version
|
|
56
|
-
version: 1.
|
|
61
|
+
version: 1.88.2
|
|
57
62
|
type: :runtime
|
|
58
63
|
prerelease: false
|
|
59
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
60
65
|
requirements:
|
|
61
66
|
- - "~>"
|
|
62
67
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: '1.
|
|
68
|
+
version: '1.88'
|
|
64
69
|
- - ">="
|
|
65
70
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: 1.
|
|
71
|
+
version: 1.88.2
|
|
67
72
|
- !ruby/object:Gem::Dependency
|
|
68
73
|
name: rubocop-rails
|
|
69
74
|
requirement: !ruby/object:Gem::Requirement
|
|
70
75
|
requirements:
|
|
71
76
|
- - "~>"
|
|
72
77
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '2.
|
|
74
|
-
- - ">="
|
|
75
|
-
- !ruby/object:Gem::Version
|
|
76
|
-
version: 2.34.3
|
|
78
|
+
version: '2.36'
|
|
77
79
|
type: :runtime
|
|
78
80
|
prerelease: false
|
|
79
81
|
version_requirements: !ruby/object:Gem::Requirement
|
|
80
82
|
requirements:
|
|
81
83
|
- - "~>"
|
|
82
84
|
- !ruby/object:Gem::Version
|
|
83
|
-
version: '2.
|
|
84
|
-
- - ">="
|
|
85
|
-
- !ruby/object:Gem::Version
|
|
86
|
-
version: 2.34.3
|
|
85
|
+
version: '2.36'
|
|
87
86
|
- !ruby/object:Gem::Dependency
|
|
88
87
|
name: rubocop-rspec
|
|
89
88
|
requirement: !ruby/object:Gem::Requirement
|
|
90
89
|
requirements:
|
|
91
90
|
- - "~>"
|
|
92
91
|
- !ruby/object:Gem::Version
|
|
93
|
-
version: '3.
|
|
92
|
+
version: '3.10'
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: 3.10.2
|
|
94
96
|
type: :runtime
|
|
95
97
|
prerelease: false
|
|
96
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
97
99
|
requirements:
|
|
98
100
|
- - "~>"
|
|
99
101
|
- !ruby/object:Gem::Version
|
|
100
|
-
version: '3.
|
|
102
|
+
version: '3.10'
|
|
103
|
+
- - ">="
|
|
104
|
+
- !ruby/object:Gem::Version
|
|
105
|
+
version: 3.10.2
|
|
101
106
|
- !ruby/object:Gem::Dependency
|
|
102
107
|
name: super_diff
|
|
103
108
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -112,8 +117,6 @@ dependencies:
|
|
|
112
117
|
- - "~>"
|
|
113
118
|
- !ruby/object:Gem::Version
|
|
114
119
|
version: '0.19'
|
|
115
|
-
description:
|
|
116
|
-
email:
|
|
117
120
|
executables: []
|
|
118
121
|
extensions: []
|
|
119
122
|
extra_rdoc_files: []
|
|
@@ -123,11 +126,11 @@ files:
|
|
|
123
126
|
- lib/eac_ruby_gem_support/rspec/helpers/filesystem.rb
|
|
124
127
|
- lib/eac_ruby_gem_support/rspec/helpers/utils.rb
|
|
125
128
|
- lib/eac_ruby_gem_support/rspec/setup.rb
|
|
129
|
+
- lib/eac_ruby_gem_support/rspec/setup/rubocop.rb
|
|
126
130
|
- lib/eac_ruby_gem_support/rspec/shared_examples/source_target_fixtures.rb
|
|
127
131
|
- lib/eac_ruby_gem_support/rspec/shared_examples/spec_paths.rb
|
|
128
132
|
- lib/eac_ruby_gem_support/rspec/source_target_fixtures_controller.rb
|
|
129
133
|
- lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb
|
|
130
|
-
- lib/eac_ruby_gem_support/rspec/specs/rubocop.rb
|
|
131
134
|
- lib/eac_ruby_gem_support/source_target_fixtures.rb
|
|
132
135
|
- lib/eac_ruby_gem_support/source_target_fixtures/source_target_file.rb
|
|
133
136
|
- lib/eac_ruby_gem_support/version.rb
|
|
@@ -135,7 +138,6 @@ homepage: https://github.com/esquilo-azul/eac_ruby_gem_support
|
|
|
135
138
|
licenses: []
|
|
136
139
|
metadata:
|
|
137
140
|
source_code_uri: https://github.com/esquilo-azul/eac_ruby_gem_support
|
|
138
|
-
post_install_message:
|
|
139
141
|
rdoc_options: []
|
|
140
142
|
require_paths:
|
|
141
143
|
- lib
|
|
@@ -150,8 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
150
152
|
- !ruby/object:Gem::Version
|
|
151
153
|
version: '0'
|
|
152
154
|
requirements: []
|
|
153
|
-
rubygems_version: 3.
|
|
154
|
-
signing_key:
|
|
155
|
+
rubygems_version: 3.6.9
|
|
155
156
|
specification_version: 4
|
|
156
157
|
summary: Development support for Ruby' Gem.
|
|
157
158
|
test_files: []
|
|
@@ -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
|