rubocop-inflector 0.1.0 → 0.1.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/.travis.yml +1 -0
- data/CHANGELOG.md +7 -0
- data/README.md +30 -0
- data/lib/rubocop/inflector/version.rb +1 -1
- data/rubocop-inflector.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93f0a95fd785a54844b74dd34f271b44227e461b
|
4
|
+
data.tar.gz: b82f7d46e1103ba0b6289b44ce71ad6fea4fc0cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d35f4eff09bf1843a09fbd58647f8cdd66206f918f4d7e61db9b5fe0231be795b61a4b3f6eb824d62b7bf9538a1718b0d4c417dfb2d4d0c6e7c949cdbc3171a
|
7
|
+
data.tar.gz: 23b12f2abd4e4c234c38ec4015d530d3987d410893816c63fdb92883033e1cd53c817dd099afa2b46e3846810202d8eddd1f8788acfbaa7fcc16b4a4cadcfef6
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -7,6 +7,30 @@ RuboCop extension to integrate ActiveSupport::Inflector and your custom rule.
|
|
7
7
|
|
8
8
|
This saves you from writing redundant `CustomTransform` and keep the concise and consistent rule over your project.
|
9
9
|
|
10
|
+
## Before Rubocop::Inflector
|
11
|
+
|
12
|
+
For example, `CustomTransform` config is exact-match, which results in redundant definitions.
|
13
|
+
|
14
|
+
```yaml
|
15
|
+
RSpec/FilePath:
|
16
|
+
CustomTransform:
|
17
|
+
PvP: pvp
|
18
|
+
SyncPvP: sync_pvp
|
19
|
+
AsyncPvP: async_pvp
|
20
|
+
PvPOverPvP: pvp_over_pvp
|
21
|
+
PvPController: pvp_controller
|
22
|
+
```
|
23
|
+
|
24
|
+
## After Rubocop::Inflector
|
25
|
+
|
26
|
+
All you have to do is define 1 concise rule. You can also share this rule with your application itself. (e.g. Rails)
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
ActiveSupport::Inflector.inflections(:en) do |inflect|
|
30
|
+
inflect.acronym 'PvP'
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
10
34
|
## Installation
|
11
35
|
|
12
36
|
Just install the `rubocop-inflector` gem
|
@@ -46,6 +70,12 @@ require:
|
|
46
70
|
|
47
71
|
Now you can run `rubocop` and it will automatically integrate ActiveSupport Integration
|
48
72
|
|
73
|
+
## Supported Cops and Logics
|
74
|
+
|
75
|
+
Following cops and logics are now supported.
|
76
|
+
|
77
|
+
* `RSpec/FilePath`
|
78
|
+
|
49
79
|
## Development
|
50
80
|
|
51
81
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
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.3'
|
37
37
|
|
38
38
|
spec.add_dependency 'activesupport'
|
39
39
|
spec.add_dependency 'rubocop'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-inflector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takumasa Ochi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: '2.
|
151
|
+
version: '2.3'
|
152
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
154
|
- - ">="
|