danger-swiftlint 0.5.0 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24ffc13551a8fc301e52e246257e507939190185
4
- data.tar.gz: f194d6b75fc9dd688cd624a6dd61bac56cf691d8
3
+ metadata.gz: 40757cebea3dbc6624dba8273588487d0cdde1f7
4
+ data.tar.gz: 6c95846be51abaeec3ee99ed87eeb3c082fdd70a
5
5
  SHA512:
6
- metadata.gz: 4029424658ca97f7548a22a01b57c587b74c6a2448eb7ece889d79b433e47d398f490f922995d071e90b1c419f6ea7a613099338eda60588b110af19745f5b1e
7
- data.tar.gz: 0b5b53d7fb22979333e2ad1ced741e39e017ab7b89ddddee47c41ddac716523185e4c1c2dde69b31e4d884081f77611b24ffb768071f15e95baf6ea9f24c54f1
6
+ metadata.gz: 736318a6287be021e6d95a537cb4d067a15892e9e884ee0ca4a607626f75200b68d68258a9f47de55f65977268f9e87052597f45ac689fb0da7a7843abf8bebc
7
+ data.tar.gz: d22f58da0bec13124cfbb29b142ed2b0dcfac6a25ebcd3a88fcd21768e781c18dd87d8279e185ccd623ee5158b8b8c18202775abb4377928b11264dc37cdee6e
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.0
1
+ 2.3.4
data/Changelog.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Current Master
4
4
 
5
+ - Nothing yet!
6
+
7
+ ## 0.5.1
8
+
9
+ - Fixed excluded files containing characters that need escaping. See [#40](https://github.com/ashfurrow/danger-swiftlint/pull/40).
10
+
5
11
  ## 0.5.0
6
12
 
7
13
  - Bump managed SwiftLint version to 0.18.1
data/Gemfile.lock CHANGED
@@ -3,7 +3,7 @@ PATH
3
3
  specs:
4
4
  danger-swiftlint (0.5.0)
5
5
  danger
6
- rake (~> 10.0)
6
+ rake (> 10)
7
7
  thor (~> 0.19)
8
8
 
9
9
  GEM
@@ -21,7 +21,7 @@ GEM
21
21
  colored2 (3.1.2)
22
22
  cork (0.3.0)
23
23
  colored2 (~> 3.1)
24
- danger (5.1.0)
24
+ danger (5.2.1)
25
25
  claide (~> 1.0)
26
26
  claide-plugins (>= 0.9.2)
27
27
  colored2 (~> 3.1)
@@ -81,7 +81,7 @@ GEM
81
81
  method_source (~> 0.8.1)
82
82
  slop (~> 3.4)
83
83
  public_suffix (2.0.5)
84
- rake (10.5.0)
84
+ rake (12.0.0)
85
85
  rb-fsevent (0.9.8)
86
86
  rb-inotify (0.9.8)
87
87
  ffi (>= 0.5.0)
@@ -103,10 +103,10 @@ GEM
103
103
  faraday (~> 0.8, < 1.0)
104
104
  shellany (0.0.1)
105
105
  slop (3.6.0)
106
- terminal-table (1.7.3)
107
- unicode-display_width (~> 1.1.1)
106
+ terminal-table (1.8.0)
107
+ unicode-display_width (~> 1.1, >= 1.1.1)
108
108
  thor (0.19.4)
109
- unicode-display_width (1.1.3)
109
+ unicode-display_width (1.2.1)
110
110
 
111
111
  PLATFORMS
112
112
  ruby
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_dependency 'danger'
23
23
  spec.add_dependency 'thor', '~> 0.19'
24
- spec.add_dependency 'rake', '~> 10.0'
24
+ spec.add_dependency 'rake', '> 10'
25
25
 
26
26
  # General ruby development
27
27
  spec.add_development_dependency 'bundler', '~> 1.3'
data/lib/danger_plugin.rb CHANGED
@@ -90,7 +90,7 @@ module Danger
90
90
  # If files are not provided it will use git modifield and added files
91
91
  #
92
92
  # @return [Array] swift files
93
- def find_swift_files(files=nil, excluded_files=[])
93
+ def find_swift_files(files=nil, excluded_paths=[])
94
94
  # Assign files to lint
95
95
  files = files ? Dir.glob(files) : (git.modified_files - git.deleted_files) + git.added_files
96
96
 
@@ -105,7 +105,11 @@ module Danger
105
105
  map { |file| File.expand_path(file) }.
106
106
  # Reject files excluded on configuration
107
107
  reject { |file|
108
- excluded_files.any? { |excluded| Find.find(excluded).include?(file) }
108
+ excluded_paths.any? { |excluded_path|
109
+ Find.find(excluded_path).
110
+ map { |excluded_file| Shellwords.escape(excluded_file) }.
111
+ include?(file)
112
+ }
109
113
  }
110
114
  end
111
115
 
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module DangerSwiftlint
2
- VERSION = "0.5.0".freeze
2
+ VERSION = "0.5.1".freeze
3
3
  SWIFTLINT_VERSION = "0.18.1".freeze
4
4
  end
@@ -91,7 +91,8 @@ module Danger
91
91
  allow(@swiftlint.git).to receive(:added_files).and_return([])
92
92
  allow(@swiftlint.git).to receive(:modified_files).and_return([
93
93
  'spec/fixtures/SwiftFile.swift',
94
- 'spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift'
94
+ 'spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift',
95
+ 'spec/fixtures/excluded_dir/SwiftFile WithEscaped+CharactersThatShouldNotBeIncluded.swift'
95
96
  ])
96
97
 
97
98
  expect(Swiftlint).to receive(:lint)
@@ -0,0 +1 @@
1
+ // This file intentionally left blank-ish.
@@ -1 +1 @@
1
- // This file intentional left blank-ish.
1
+ // This file intentionally left blank-ish.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-swiftlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ash Furrow
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2017-04-26 00:00:00.000000000 Z
15
+ date: 2017-05-24 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: danger
@@ -46,16 +46,16 @@ dependencies:
46
46
  name: rake
47
47
  requirement: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - "~>"
49
+ - - ">"
50
50
  - !ruby/object:Gem::Version
51
- version: '10.0'
51
+ version: '10'
52
52
  type: :runtime
53
53
  prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - "~>"
56
+ - - ">"
57
57
  - !ruby/object:Gem::Version
58
- version: '10.0'
58
+ version: '10'
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: bundler
61
61
  requirement: !ruby/object:Gem::Requirement
@@ -171,6 +171,7 @@ files:
171
171
  - spec/danger_plugin_spec.rb
172
172
  - spec/fixtures/SwiftFile.swift
173
173
  - spec/fixtures/empty_excluded.yml
174
+ - spec/fixtures/excluded_dir/SwiftFile WithEscaped+CharactersThatShouldNotBeIncluded.swift
174
175
  - spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift
175
176
  - spec/fixtures/some_config.yml
176
177
  - spec/spec_helper.rb
@@ -203,6 +204,7 @@ test_files:
203
204
  - spec/danger_plugin_spec.rb
204
205
  - spec/fixtures/SwiftFile.swift
205
206
  - spec/fixtures/empty_excluded.yml
207
+ - spec/fixtures/excluded_dir/SwiftFile WithEscaped+CharactersThatShouldNotBeIncluded.swift
206
208
  - spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift
207
209
  - spec/fixtures/some_config.yml
208
210
  - spec/spec_helper.rb