rubocop-rspec 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 885b88b3cfe9f4d470eed5daccc1071135e59e11
4
- data.tar.gz: 0d91a813ca891c4b7b90227188a87d24250088cf
3
+ metadata.gz: b5db54be8660c0653843bf09d2b723a73b82e364
4
+ data.tar.gz: 69588667c375c8a39add5aa8e6ca8fa795aed5df
5
5
  SHA512:
6
- metadata.gz: 8f100ef7123bf5a9df50d45dae99592e1704cab30aa12e24f4d1d8d58e851b88c0db6f9efc46b531743fdcf487f295a75fd1033b0a05e8c2de2d4cf25c9499bd
7
- data.tar.gz: d9ec52c5ac1aebb71bd8e16303ecc479f4fdde51d1ff9fa27dc1f1bf95d4b9f80d8e7389aa472f400d91a532e4aff8d6168c9b4b7761aa32fab560845591b5d6
6
+ metadata.gz: 6bee62048a06069c3e02844cf8ecc9054812b40990e70d00498c1bec861fddf1e67719438d3b788526eb08df98ca2405323e61249896c4ec257137961fb6f905
7
+ data.tar.gz: 87a7b3dfeb17da9a359abeee8881c8a6cf7fbb6e96aad10a33656207d904bb1d6e9d12150c6c24df39945e81294a0e34772c2c6d160eefb0bcc8e720f9569fd0
@@ -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/andyw8
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/spec`](lib/rubocop/cop/rspec), and contain
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
@@ -34,7 +34,7 @@ module RuboCop
34
34
  end
35
35
 
36
36
  def autocorrect(node)
37
- @corrections << lambda do |corrector|
37
+ lambda do |corrector|
38
38
  corrector.replace(node.loc.expression, 'described_class')
39
39
  end
40
40
  end
@@ -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, _, _ = *node
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
- @corrections << lambda do |corrector|
41
+ lambda do |corrector|
42
42
  corrector.replace(range, corrected_message(range))
43
43
  end
44
44
  end
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module RSpec
5
5
  # Version information for the RSpec RuboCop plugin.
6
6
  module Version
7
- STRING = '1.3.0'
7
+ STRING = '1.3.1'
8
8
  end
9
9
  end
10
10
  end
@@ -27,10 +27,10 @@ Gem::Specification.new do |spec|
27
27
  'Gemfile',
28
28
  'Rakefile'
29
29
  ]
30
- spec.test_files = spec.files.grep(/^spec\//)
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.24')
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')
@@ -2,8 +2,11 @@
2
2
 
3
3
  require 'rubocop'
4
4
 
5
- rubocop_gem_path = Gem::Specification.find_by_name('rubocop').gem_dir
6
- Dir["#{rubocop_gem_path}/spec/support/**/*.rb"].each { |f| require f }
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.0
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-23 00:00:00.000000000 Z
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.24'
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.24'
27
+ version: '0.31'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement