rubocop-faker 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +4 -1
- data/lib/rubocop/cop/faker/deprecated_arguments.rb +11 -1
- data/lib/rubocop/faker/version.rb +1 -1
- data/rubocop-faker.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98fabe8553b31d2e305e72dfcbabef73e1480a2a76373ae444cabfdd1a0dd2d6
|
4
|
+
data.tar.gz: e59b83219cf65ea30a506caefdb901476ae4c5a68f78cd5ad0ef618afbc3c2cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40e2a38812bc30797479531581e0dfc87290384088ddb97ad9f8825650039745a812e480597c39ca6785866a64b110eadc19480cc20f14e9f1c5a9e8afc4ed70
|
7
|
+
data.tar.gz: f307c18b84f97fb365d77c0cd8779120021202caf6325cb6b094703459de90c7b4219b8eb74d242383147af3086ae6338fe5a17f16ecee654e5975e41f7e6375
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## master (unreleased)
|
2
2
|
|
3
|
+
## 0.2.0 (2019-09-04)
|
4
|
+
|
5
|
+
### Bug fixes
|
6
|
+
|
7
|
+
* Fix a problem that config/default.yml setting is not applied if .rubocop.yml does not exist when `rubocop --require rubocop-faker` option is used. ([@koic][])
|
8
|
+
|
3
9
|
## 0.1.0 (2019-09-02)
|
4
10
|
|
5
11
|
### New features
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# RuboCop Faker
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/rubocop-faker.svg)](https://badge.fury.io/rb/rubocop-faker)
|
4
|
+
[![CircleCI](https://circleci.com/gh/koic/rubocop-faker.svg?style=svg)](https://circleci.com/gh/koic/rubocop-faker)
|
5
|
+
|
3
6
|
A [RuboCop](https://github.com/rubocop-hq/rubocop) extension for [Faker](https://github.com/faker-ruby/faker).
|
4
7
|
|
5
8
|
RuboCop Faker is a tool for converting your Faker's methods to the latest Faker argument style with static code analysis.
|
@@ -30,7 +33,7 @@ Faker::Avatar.image(slug, size, format, set, bgset)
|
|
30
33
|
|
31
34
|
RuboCop Faker would convert it to the following Faker 2 form:
|
32
35
|
|
33
|
-
```
|
36
|
+
```ruby
|
34
37
|
Faker::Avatar.image(slug: slug, size: size, format: format, set: set, bgset: bgset)
|
35
38
|
```
|
36
39
|
|
@@ -105,7 +105,17 @@ module RuboCop
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def argument_keywords
|
108
|
-
cop_config.fetch('ArgumentKeywords'
|
108
|
+
cop_config.fetch('ArgumentKeywords')
|
109
|
+
# Workaround for a problem that config/default.yml setting is not applied
|
110
|
+
# if .rubocop.yml does not exist when `rubocop --require rubocop-faker`
|
111
|
+
# option is used.
|
112
|
+
rescue KeyError
|
113
|
+
config = File.read(
|
114
|
+
File.join(File.dirname(__FILE__), '../../../../config/default.yml')
|
115
|
+
)
|
116
|
+
yaml = YAML.safe_load(config)
|
117
|
+
|
118
|
+
yaml[cop_name].fetch('ArgumentKeywords', {})
|
109
119
|
end
|
110
120
|
end
|
111
121
|
end
|
data/rubocop-faker.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['Koichi ITO']
|
9
9
|
spec.email = ['koic.ito@gmail.com']
|
10
10
|
|
11
|
-
spec.summary = 'A RuboCop extension for Faker'
|
12
|
-
spec.description = 'A RuboCop extension for Faker'
|
11
|
+
spec.summary = 'A RuboCop extension for Faker.'
|
12
|
+
spec.description = 'A RuboCop extension for Faker.'
|
13
13
|
spec.homepage = 'https://github.com/koic/rubocop-faker'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-faker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi ITO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.74'
|
27
|
-
description: A RuboCop extension for Faker
|
27
|
+
description: A RuboCop extension for Faker.
|
28
28
|
email:
|
29
29
|
- koic.ito@gmail.com
|
30
30
|
executables: []
|
@@ -79,5 +79,5 @@ requirements: []
|
|
79
79
|
rubygems_version: 3.0.3
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
|
-
summary: A RuboCop extension for Faker
|
82
|
+
summary: A RuboCop extension for Faker.
|
83
83
|
test_files: []
|