reek 4.6.0 → 4.6.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: 5c827e3718e3a4f1524fdaf0d6c28df6e86b671b
4
- data.tar.gz: 9755661abe970fb1499ee2b9de2f6d701b8c8ee2
3
+ metadata.gz: a703ee92e2eee612e747e83dd8f7262cc889a347
4
+ data.tar.gz: 2cd0f17e74826fabc001c770a96f7cc24545ced3
5
5
  SHA512:
6
- metadata.gz: 77122032bb96bbd32994195c9745acc214ecfbfff7963348aff01239402deefb74032883eed3762df8eda34c6054447a5ca076dfe707a9a1460a5c14bc85ddf7
7
- data.tar.gz: e86a819d479502f6f091c6d6f8b7d1b6c1aae20779131a3e6e62445eb048db3f1f0e1226b59a0b11ca82e9f3c4471578ce4c71c19d0a1fdff96b51f8f5e7d752
6
+ metadata.gz: 3bc0fe4ede8578d81c431bda322171cc240daaa3502da110fe98ecd6cd927fd7d336b83a813df6dff2acfd7d685fc70248e490f51cce4ede9ade528b80ff0e34
7
+ data.tar.gz: 8387daed0291caee16f71bd78c9dd3477d1cad1220e7998618039d937b5c017f5ca5fc95182268e7793d4ea975ac88a50a4d8fbd1b494fd02ad32a4c8f908095
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 4.6.1 (2017-04-05)
4
+
5
+ * (IanWhitney) Properly handle absolute paths.
6
+
3
7
  ## 4.6.0 (2017-04-04)
4
8
 
5
9
  * (IanWhitney) Implement `--force-exclusion` flag
@@ -62,7 +62,7 @@ module Reek
62
62
  end
63
63
 
64
64
  def path_excluded?(path)
65
- excluded_paths.include?(path)
65
+ excluded_paths.map(&:expand_path).include?(path.expand_path)
66
66
  end
67
67
 
68
68
  def load_values(configuration_hash)
data/lib/reek/version.rb CHANGED
@@ -7,6 +7,6 @@ module Reek
7
7
  # @public
8
8
  module Version
9
9
  # @public
10
- STRING = '4.6.0'.freeze
10
+ STRING = '4.6.1'.freeze
11
11
  end
12
12
  end
@@ -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.0
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-04 00:00:00.000000000 Z
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