reek 4.6.0 → 4.6.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 +4 -0
- data/lib/reek/configuration/app_configuration.rb +1 -1
- data/lib/reek/version.rb +1 -1
- data/spec/reek/source/source_locator_spec.rb +30 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a703ee92e2eee612e747e83dd8f7262cc889a347
|
4
|
+
data.tar.gz: 2cd0f17e74826fabc001c770a96f7cc24545ced3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bc0fe4ede8578d81c431bda322171cc240daaa3502da110fe98ecd6cd927fd7d336b83a813df6dff2acfd7d685fc70248e490f51cce4ede9ade528b80ff0e34
|
7
|
+
data.tar.gz: 8387daed0291caee16f71bd78c9dd3477d1cad1220e7998618039d937b5c017f5ca5fc95182268e7793d4ea975ac88a50a4d8fbd1b494fd02ad32a4c8f908095
|
data/CHANGELOG.md
CHANGED
data/lib/reek/version.rb
CHANGED
@@ -37,6 +37,36 @@ RSpec.describe Reek::Source::SourceLocator do
|
|
37
37
|
|
38
38
|
let(:options) { instance_double('Reek::CLI::Options', force_exclusion?: false) }
|
39
39
|
|
40
|
+
context 'when the path is absolute' do
|
41
|
+
let(:path) do
|
42
|
+
SAMPLES_PATH.join('source_with_exclude_paths',
|
43
|
+
'ignore_me',
|
44
|
+
'uncommunicative_method_name.rb').expand_path
|
45
|
+
end
|
46
|
+
|
47
|
+
context 'and options.force_exclusion? is true' do
|
48
|
+
before do
|
49
|
+
allow(options).to receive(:force_exclusion?).and_return(true)
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'excludes this file' do
|
53
|
+
sources = described_class.new([path], configuration: configuration, options: options).sources
|
54
|
+
expect(sources).not_to include(path)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
context 'and options.force_exclusion? is false' do
|
59
|
+
before do
|
60
|
+
allow(options).to receive(:force_exclusion?).and_return(false)
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'includes this file' do
|
64
|
+
sources = described_class.new([path], configuration: configuration, options: options).sources
|
65
|
+
expect(sources).to include(path)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
40
70
|
context 'when the path is a file name in an excluded directory' do
|
41
71
|
let(:path) { SAMPLES_PATH.join('source_with_exclude_paths', 'ignore_me', 'uncommunicative_method_name.rb') }
|
42
72
|
|
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: 4.6.
|
4
|
+
version: 4.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Rutherford
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-04-
|
14
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: codeclimate-engine-rb
|