rubocop-rspec 1.3.0 → 1.3.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/CHANGELOG.md +7 -1
- data/README.md +17 -1
- data/lib/rubocop/cop/rspec/described_class.rb +1 -1
- data/lib/rubocop/cop/rspec/example_wording.rb +2 -2
- data/lib/rubocop/rspec/version.rb +1 -1
- data/rubocop-rspec.gemspec +2 -2
- data/spec/spec_helper.rb +5 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5db54be8660c0653843bf09d2b723a73b82e364
|
4
|
+
data.tar.gz: 69588667c375c8a39add5aa8e6ca8fa795aed5df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bee62048a06069c3e02844cf8ecc9054812b40990e70d00498c1bec861fddf1e67719438d3b788526eb08df98ca2405323e61249896c4ec257137961fb6f905
|
7
|
+
data.tar.gz: 87a7b3dfeb17da9a359abeee8881c8a6cf7fbb6e96aad10a33656207d904bb1d6e9d12150c6c24df39945e81294a0e34772c2c6d160eefb0bcc8e720f9569fd0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
# 1.3.1
|
4
|
+
|
5
|
+
* Fix auto correction issue - syntax had changed in RuboCop v0.31. ([@bquorning][])
|
6
|
+
* Add RuboCop clone to vendor folder - see #39 for details. ([@bquorning][])
|
7
|
+
|
3
8
|
# 1.3.0
|
4
9
|
|
5
10
|
* Ignore non string arguments for FilePathCop - thanks to @deivid-rodriguez. ([@geniou][])
|
@@ -53,7 +58,8 @@
|
|
53
58
|
|
54
59
|
<!-- Contributors -->
|
55
60
|
|
56
|
-
[@andyw8]: https://github.com/
|
61
|
+
[@andyw8]: https://github.com/andyw8i
|
62
|
+
[@bquorning]: https://github.com/bquorning
|
57
63
|
[@deivid-rodriguez]: https://github.com/deivid-rodriguez
|
58
64
|
[@geniou]: https://github.com/geniou
|
59
65
|
[@nevir]: https://github.com/nevir
|
data/README.md
CHANGED
@@ -59,7 +59,7 @@ end
|
|
59
59
|
## The Cops
|
60
60
|
|
61
61
|
All cops are located under
|
62
|
-
[`lib/rubocop/cop/
|
62
|
+
[`lib/rubocop/cop/rspec`](lib/rubocop/cop/rspec), and contain
|
63
63
|
examples/documentation.
|
64
64
|
|
65
65
|
In your `.rubocop.yml`, you may treat the RSpec cops just like any other
|
@@ -72,6 +72,22 @@ RSpec/FilePath:
|
|
72
72
|
```
|
73
73
|
|
74
74
|
|
75
|
+
## Contributing
|
76
|
+
|
77
|
+
1. Fork it
|
78
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
79
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
80
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
81
|
+
5. Create new Pull Request
|
82
|
+
|
83
|
+
For running the spec files, this project depends on RuboCop's spec helpers.
|
84
|
+
This means that in order to run the specs locally, you need a (shallow) clone
|
85
|
+
of the RuboCop repository:
|
86
|
+
|
87
|
+
```bash
|
88
|
+
git clone --depth 1 git://github.com/bbatsov/rubocop.git vendor/rubocop
|
89
|
+
```
|
90
|
+
|
75
91
|
## License
|
76
92
|
|
77
93
|
`rubocop-rspec` is MIT licensed. [See the accompanying file](MIT-LICENSE.md) for
|
@@ -21,7 +21,7 @@ module RuboCop
|
|
21
21
|
MSG = 'Do not use should when describing your tests.'
|
22
22
|
|
23
23
|
def on_block(node) # rubocop:disable Metrics/AbcSize
|
24
|
-
method,
|
24
|
+
method, = *node
|
25
25
|
_, method_name, *args = *method
|
26
26
|
|
27
27
|
return unless method_name == :it
|
@@ -38,7 +38,7 @@ module RuboCop
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def autocorrect(range)
|
41
|
-
|
41
|
+
lambda do |corrector|
|
42
42
|
corrector.replace(range, corrected_message(range))
|
43
43
|
end
|
44
44
|
end
|
data/rubocop-rspec.gemspec
CHANGED
@@ -27,10 +27,10 @@ Gem::Specification.new do |spec|
|
|
27
27
|
'Gemfile',
|
28
28
|
'Rakefile'
|
29
29
|
]
|
30
|
-
spec.test_files = spec.files.grep(
|
30
|
+
spec.test_files = spec.files.grep(%r{^spec/})
|
31
31
|
spec.extra_rdoc_files = ['MIT-LICENSE.md', 'README.md']
|
32
32
|
|
33
|
-
spec.add_development_dependency('rubocop', '~> 0.
|
33
|
+
spec.add_development_dependency('rubocop', '~> 0.31')
|
34
34
|
spec.add_development_dependency('rake', '~> 10.1')
|
35
35
|
spec.add_development_dependency('rspec', '~> 3.0')
|
36
36
|
spec.add_development_dependency('simplecov', '~> 0.8')
|
data/spec/spec_helper.rb
CHANGED
@@ -2,8 +2,11 @@
|
|
2
2
|
|
3
3
|
require 'rubocop'
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
rubocop_path = File.join(File.dirname(__FILE__), '../vendor/rubocop')
|
6
|
+
unless File.directory?(rubocop_path)
|
7
|
+
fail "Can't run specs without a local RuboCop checkout. Look in the README."
|
8
|
+
end
|
9
|
+
Dir["#{rubocop_path}/spec/support/**/*.rb"].each { |f| require f }
|
7
10
|
|
8
11
|
RSpec.configure do |config|
|
9
12
|
config.order = :random
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian MacLeod
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-04
|
12
|
+
date: 2015-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubocop
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '0.
|
20
|
+
version: '0.31'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '0.
|
27
|
+
version: '0.31'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|