rubocop-inflector 0.1.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codespellignore +0 -0
- data/.github/workflows/codespell.yml +18 -0
- data/.github/workflows/test.yml +27 -0
- data/.travis.yml +6 -5
- data/CHANGELOG.md +19 -1
- data/README.md +2 -1
- data/lib/rubocop/inflector/extensions/rspec.rb +12 -1
- data/lib/rubocop/inflector/version.rb +1 -1
- data/rubocop-inflector.gemspec +4 -3
- metadata +29 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f5dcf4547a0b35aae90adbc837925f59ba9ff4dd04397ef9634a2536d664bc1
|
4
|
+
data.tar.gz: be70d8e8de30363f21006911cf8ccbefe7bb44cbd8798de062e7177694d0157f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce73f59fb85567544263d84d21e7ac0de451978533e6898f71e843427e07de00aad56d6316c4346ccdc82cea5616061ed81f48a64025851836316899d5ef1cb4
|
7
|
+
data.tar.gz: 4fc3b941d5508620c4dfbcdf9e0ae926aa895a128d6a64be40a6ef493cfdea775c7a7b04e974d2ff4f7e2333988c0be7a3ffd7cf36d49488ac6f4e7d4fb410e5
|
data/.codespellignore
ADDED
File without changes
|
@@ -0,0 +1,18 @@
|
|
1
|
+
name: CodeSpell
|
2
|
+
on:
|
3
|
+
- pull_request
|
4
|
+
concurrency:
|
5
|
+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
6
|
+
cancel-in-progress: true
|
7
|
+
jobs:
|
8
|
+
codespell:
|
9
|
+
name: CodeSpell
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v4
|
13
|
+
- name: CodeSpell
|
14
|
+
uses: codespell-project/actions-codespell@v2
|
15
|
+
with:
|
16
|
+
check_filenames: true
|
17
|
+
check_hidden: true
|
18
|
+
ignore_words_file: .codespellignore
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
strategy:
|
15
|
+
matrix:
|
16
|
+
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', 'head']
|
17
|
+
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby-version }}
|
24
|
+
- name: Install dependencies
|
25
|
+
run: bundle install
|
26
|
+
- name: Run tests
|
27
|
+
run: bundle exec rspec
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -8,7 +8,25 @@
|
|
8
8
|
|
9
9
|
### Changes
|
10
10
|
|
11
|
-
## 0.
|
11
|
+
## 1.0.0 (2025-02-10)
|
12
|
+
|
13
|
+
### New features
|
14
|
+
|
15
|
+
* Support `RSpec/SpecFilePathFormat` cop ([Ryo Maeda](@epaew))
|
16
|
+
|
17
|
+
### Bug fixes
|
18
|
+
|
19
|
+
* Fix failing tests with newer version of RuboCop RSpec ([Ryo Maeda](@epaew))
|
20
|
+
|
21
|
+
### Changes
|
22
|
+
|
23
|
+
* Drop support for Ruby < 2.6 ([Ryo Maeda](@epaew))
|
24
|
+
|
25
|
+
## 0.2.1 (2022-04-12)
|
26
|
+
|
27
|
+
* Increment minor version respecting semantic versioning. No changes are included except version number. ([Takumasa Ochi](@aeroastro))
|
28
|
+
|
29
|
+
## 0.1.2 (2022-04-12)
|
12
30
|
|
13
31
|
### Changes
|
14
32
|
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ gem 'rubocop-inflector'
|
|
42
42
|
## Usage
|
43
43
|
|
44
44
|
You need to tell RuboCop to load the Inflector extension and your custom ActiveSupport::Inflector rule.
|
45
|
-
Custom rule file would be the
|
45
|
+
Custom rule file would be the following. If you are using Rails, you can find it under `config` directory.
|
46
46
|
|
47
47
|
### Custom ActiveSupport::Inflector rule
|
48
48
|
|
@@ -75,6 +75,7 @@ Now you can run `rubocop` and it will automatically integrate ActiveSupport Inte
|
|
75
75
|
Following cops and logics are now supported.
|
76
76
|
|
77
77
|
* `RSpec/FilePath`
|
78
|
+
* `RSpec/SpecFilePathFormat`
|
78
79
|
|
79
80
|
## Development
|
80
81
|
|
@@ -12,10 +12,21 @@ module RuboCop
|
|
12
12
|
ActiveSupport::Inflector.underscore(string)
|
13
13
|
end
|
14
14
|
end
|
15
|
+
|
16
|
+
module SpecFilePathFormat
|
17
|
+
def camel_to_snake_case(string)
|
18
|
+
ActiveSupport::Inflector.underscore(string)
|
19
|
+
end
|
20
|
+
end
|
15
21
|
end
|
16
22
|
end
|
17
23
|
|
18
|
-
::RuboCop::Cop::RSpec::FilePath
|
24
|
+
if const_defined? '::RuboCop::Cop::RSpec::FilePath'
|
25
|
+
::RuboCop::Cop::RSpec::FilePath.prepend Cop::RSpec::FilePath
|
26
|
+
end
|
27
|
+
if const_defined? '::RuboCop::Cop::RSpec::SpecFilePathFormat'
|
28
|
+
::RuboCop::Cop::RSpec::SpecFilePathFormat.prepend Cop::RSpec::SpecFilePathFormat
|
29
|
+
end
|
19
30
|
end
|
20
31
|
end
|
21
32
|
end
|
data/rubocop-inflector.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
34
34
|
spec.require_paths = ['lib']
|
35
35
|
|
36
|
-
spec.required_ruby_version = '>= 2.
|
36
|
+
spec.required_ruby_version = '>= 2.6'
|
37
37
|
|
38
38
|
spec.add_dependency 'activesupport'
|
39
39
|
spec.add_dependency 'rubocop'
|
@@ -41,6 +41,7 @@ Gem::Specification.new do |spec|
|
|
41
41
|
|
42
42
|
spec.add_development_dependency 'pry'
|
43
43
|
spec.add_development_dependency 'pry-byebug'
|
44
|
-
spec.add_development_dependency 'rake', '
|
45
|
-
spec.add_development_dependency 'rspec', '
|
44
|
+
spec.add_development_dependency 'rake', '>= 10'
|
45
|
+
spec.add_development_dependency 'rspec', '>= 3'
|
46
|
+
spec.add_development_dependency 'rubocop-rspec', '>= 2.15'
|
46
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-inflector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takumasa Ochi
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-02-10 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activesupport
|
@@ -84,30 +83,44 @@ dependencies:
|
|
84
83
|
name: rake
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
86
85
|
requirements:
|
87
|
-
- - "
|
86
|
+
- - ">="
|
88
87
|
- !ruby/object:Gem::Version
|
89
|
-
version: '10
|
88
|
+
version: '10'
|
90
89
|
type: :development
|
91
90
|
prerelease: false
|
92
91
|
version_requirements: !ruby/object:Gem::Requirement
|
93
92
|
requirements:
|
94
|
-
- - "
|
93
|
+
- - ">="
|
95
94
|
- !ruby/object:Gem::Version
|
96
|
-
version: '10
|
95
|
+
version: '10'
|
97
96
|
- !ruby/object:Gem::Dependency
|
98
97
|
name: rspec
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
100
99
|
requirements:
|
101
|
-
- - "
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '3'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '3'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rubocop-rspec
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
102
115
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
116
|
+
version: '2.15'
|
104
117
|
type: :development
|
105
118
|
prerelease: false
|
106
119
|
version_requirements: !ruby/object:Gem::Requirement
|
107
120
|
requirements:
|
108
|
-
- - "
|
121
|
+
- - ">="
|
109
122
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
123
|
+
version: '2.15'
|
111
124
|
description: RuboCop extension to integrate ActiveSupport::Inflector
|
112
125
|
email:
|
113
126
|
- aeroastro007@gmail.com
|
@@ -115,7 +128,10 @@ executables: []
|
|
115
128
|
extensions: []
|
116
129
|
extra_rdoc_files: []
|
117
130
|
files:
|
131
|
+
- ".codespellignore"
|
118
132
|
- ".gitattributes"
|
133
|
+
- ".github/workflows/codespell.yml"
|
134
|
+
- ".github/workflows/test.yml"
|
119
135
|
- ".gitignore"
|
120
136
|
- ".rspec"
|
121
137
|
- ".rubocop.yml"
|
@@ -140,7 +156,6 @@ licenses:
|
|
140
156
|
- MIT
|
141
157
|
metadata:
|
142
158
|
allowed_push_host: https://rubygems.org
|
143
|
-
post_install_message:
|
144
159
|
rdoc_options: []
|
145
160
|
require_paths:
|
146
161
|
- lib
|
@@ -148,15 +163,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
163
|
requirements:
|
149
164
|
- - ">="
|
150
165
|
- !ruby/object:Gem::Version
|
151
|
-
version: '2.
|
166
|
+
version: '2.6'
|
152
167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
168
|
requirements:
|
154
169
|
- - ">="
|
155
170
|
- !ruby/object:Gem::Version
|
156
171
|
version: '0'
|
157
172
|
requirements: []
|
158
|
-
rubygems_version: 3.
|
159
|
-
signing_key:
|
173
|
+
rubygems_version: 3.6.2
|
160
174
|
specification_version: 4
|
161
175
|
summary: RuboCop extension to integrate ActiveSupport::Inflector
|
162
176
|
test_files: []
|