reek 1.5.0 → 1.5.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 +3 -0
- data/features/samples.feature +10 -0
- data/lib/reek/smells/nested_iterators.rb +1 -0
- data/lib/reek/source/sexp_extensions.rb +5 -0
- data/lib/reek/version.rb +1 -1
- data/reek.gemspec +1 -1
- data/spec/reek/smells/nested_iterators_spec.rb +9 -0
- data/spec/samples/ruby21_syntax.rb +5 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c45202c174ceb4196695ec6f2a5b6a823c14d06
|
4
|
+
data.tar.gz: 34ec72fa7a3dc9cb07d40258e178ee8ab066e3b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2b8bf4eee7cba82e33ce1f2dbc6768c786829599d64d175d3eb232d82b3d9e6c605111ae0723e9164697ae9718194a4f91078cc4a6e130341b4bac1f178ed60
|
7
|
+
data.tar.gz: 52242fe4f536bb3d2bb2de1777b4cd77232307047392ad308542d0f1f62d4ecf337a8e7f78f892e6de95459accbbf17e7a1a1732fbce3bce924f82bb80e4d81f
|
data/CHANGELOG
CHANGED
data/features/samples.feature
CHANGED
@@ -290,3 +290,13 @@ Feature: Basic smell detection
|
|
290
290
|
spec/samples/ruby20_syntax.rb -- 1 warning:
|
291
291
|
[1]:SomeClass has no descriptive comment (IrresponsibleModule)
|
292
292
|
"""
|
293
|
+
|
294
|
+
@ruby21
|
295
|
+
Scenario: Correct smells from a source file with Ruby 2.1 specific syntax
|
296
|
+
When I run reek spec/samples/ruby21_syntax.rb
|
297
|
+
Then the exit status indicates smells
|
298
|
+
And it reports:
|
299
|
+
"""
|
300
|
+
spec/samples/ruby21_syntax.rb -- 1 warning:
|
301
|
+
[1]:SomeClass has no descriptive comment (IrresponsibleModule)
|
302
|
+
"""
|
data/lib/reek/version.rb
CHANGED
data/reek.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.require_paths = ['lib']
|
28
28
|
s.rubyforge_project = 'reek'
|
29
29
|
s.rubygems_version = '1.3.6'
|
30
|
-
s.required_ruby_version = '>= 1.9.
|
30
|
+
s.required_ruby_version = '>= 1.9.3'
|
31
31
|
s.summary = 'Code smell detector for Ruby'
|
32
32
|
|
33
33
|
s.add_runtime_dependency('parser', ['~> 2.2.0.pre.7'])
|
@@ -44,6 +44,15 @@ EOS
|
|
44
44
|
expect(src).not_to smell_of(NestedIterators)
|
45
45
|
end
|
46
46
|
|
47
|
+
it 'detects an iterator with an empty block' do
|
48
|
+
src = <<-EOS
|
49
|
+
def foo
|
50
|
+
bar { baz { } }
|
51
|
+
end
|
52
|
+
EOS
|
53
|
+
expect(src).to smell_of(NestedIterators, {})
|
54
|
+
end
|
55
|
+
|
47
56
|
it 'should report nested iterators only once per method' do
|
48
57
|
src = <<EOS
|
49
58
|
def bad(fred)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Rutherford
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-12-
|
13
|
+
date: 2014-12-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parser
|
@@ -341,6 +341,7 @@ files:
|
|
341
341
|
- spec/samples/overrides_defaults/config.reek
|
342
342
|
- spec/samples/redcloth.rb
|
343
343
|
- spec/samples/ruby20_syntax.rb
|
344
|
+
- spec/samples/ruby21_syntax.rb
|
344
345
|
- spec/samples/three_clean_files/clean_one.rb
|
345
346
|
- spec/samples/three_clean_files/clean_three.rb
|
346
347
|
- spec/samples/three_clean_files/clean_two.rb
|
@@ -369,7 +370,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
369
370
|
requirements:
|
370
371
|
- - ">="
|
371
372
|
- !ruby/object:Gem::Version
|
372
|
-
version: 1.9.
|
373
|
+
version: 1.9.3
|
373
374
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
374
375
|
requirements:
|
375
376
|
- - ">="
|