danger-swiftlint 0.4.1 → 0.5.0

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: b673a12b035e24daddf4915729da974602975f99
4
- data.tar.gz: edd6a4eb9fd5bb1a8a9dd08da756c13e8a5a58ba
3
+ metadata.gz: 24ffc13551a8fc301e52e246257e507939190185
4
+ data.tar.gz: f194d6b75fc9dd688cd624a6dd61bac56cf691d8
5
5
  SHA512:
6
- metadata.gz: 002d49f84c99347a74976ea6bdd45ab4507819db78065171446247481abed27986480af1af6280226b65a6f3f26df6ec7c4d9fb94f13274e16b73c7ee7dd755d
7
- data.tar.gz: 533e487912bda9b981e9ac2354eba7c44a9e3f7ab6af20f3692886eb907fefe36defd49b2cc118d470b5247c85455424a0ebba77d360cb046ebb2733a0018abd
6
+ metadata.gz: 4029424658ca97f7548a22a01b57c587b74c6a2448eb7ece889d79b433e47d398f490f922995d071e90b1c419f6ea7a613099338eda60588b110af19745f5b1e
7
+ data.tar.gz: 0b5b53d7fb22979333e2ad1ced741e39e017ab7b89ddddee47c41ddac716523185e4c1c2dde69b31e4d884081f77611b24ffb768071f15e95baf6ea9f24c54f1
data/Changelog.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Current Master
4
4
 
5
+ ## 0.5.0
6
+
7
+ - Bump managed SwiftLint version to 0.18.1
8
+
5
9
  ## 0.4.1
6
10
 
7
11
  - Fixes deleted files being added to the list of files to lint. See [#34](https://github.com/ashfurrow/danger-swiftlint/pull/34).
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-swiftlint (0.4.1)
4
+ danger-swiftlint (0.5.0)
5
5
  danger
6
6
  rake (~> 10.0)
7
7
  thor (~> 0.19)
@@ -9,7 +9,7 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.5.0)
12
+ addressable (2.5.1)
13
13
  public_suffix (~> 2.0, >= 2.0.2)
14
14
  bacon (1.2.0)
15
15
  claide (1.0.1)
@@ -18,11 +18,10 @@ GEM
18
18
  nap
19
19
  open4 (~> 1.3)
20
20
  coderay (1.1.1)
21
- colored (1.2)
22
21
  colored2 (3.1.2)
23
- cork (0.2.0)
24
- colored (~> 1.2)
25
- danger (4.3.0)
22
+ cork (0.3.0)
23
+ colored2 (~> 3.1)
24
+ danger (5.1.0)
26
25
  claide (~> 1.0)
27
26
  claide-plugins (>= 0.9.2)
28
27
  colored2 (~> 3.1)
@@ -33,15 +32,15 @@ GEM
33
32
  kramdown (~> 1.5)
34
33
  octokit (~> 4.2)
35
34
  terminal-table (~> 1)
36
- diff-lcs (1.2.5)
37
- faraday (0.11.0)
35
+ diff-lcs (1.3)
36
+ faraday (0.12.1)
38
37
  multipart-post (>= 1.2, < 3)
39
38
  faraday-http-cache (1.3.1)
40
39
  faraday (~> 0.8)
41
- ffi (1.9.10)
40
+ ffi (1.9.18)
42
41
  formatador (0.2.5)
43
42
  git (1.3.0)
44
- guard (2.14.0)
43
+ guard (2.14.1)
45
44
  formatador (>= 0.2.4)
46
45
  listen (>= 2.7, < 4.0)
47
46
  lumberjack (~> 1.0)
@@ -51,7 +50,7 @@ GEM
51
50
  shellany (~> 0.0)
52
51
  thor (>= 0.18.1)
53
52
  guard-compat (1.2.1)
54
- guard-rspec (4.7.2)
53
+ guard-rspec (4.7.3)
55
54
  guard (~> 2.1)
56
55
  guard-compat (~> 1.1)
57
56
  rspec (>= 2.99.0, < 4.0)
@@ -59,46 +58,46 @@ GEM
59
58
  listen (3.0.7)
60
59
  rb-fsevent (>= 0.9.3)
61
60
  rb-inotify (>= 0.9.7)
62
- lumberjack (1.0.10)
61
+ lumberjack (1.0.11)
63
62
  metaclass (0.0.4)
64
63
  method_source (0.8.2)
65
- mocha (1.1.0)
64
+ mocha (1.2.1)
66
65
  metaclass (~> 0.0.1)
67
- mocha-on-bacon (0.2.2)
66
+ mocha-on-bacon (0.2.3)
68
67
  mocha (>= 0.13.0)
69
68
  multipart-post (2.0.0)
70
69
  nap (1.1.0)
71
70
  nenv (0.3.0)
72
- notiffany (0.1.0)
71
+ notiffany (0.1.1)
73
72
  nenv (~> 0.1)
74
73
  shellany (~> 0.0)
75
- octokit (4.6.2)
74
+ octokit (4.7.0)
76
75
  sawyer (~> 0.8.0, >= 0.5.3)
77
76
  open4 (1.3.4)
78
77
  prettybacon (0.0.2)
79
78
  bacon (~> 1.2)
80
- pry (0.10.3)
79
+ pry (0.10.4)
81
80
  coderay (~> 1.1.0)
82
81
  method_source (~> 0.8.1)
83
82
  slop (~> 3.4)
84
83
  public_suffix (2.0.5)
85
84
  rake (10.5.0)
86
- rb-fsevent (0.9.7)
87
- rb-inotify (0.9.7)
85
+ rb-fsevent (0.9.8)
86
+ rb-inotify (0.9.8)
88
87
  ffi (>= 0.5.0)
89
- rspec (3.4.0)
90
- rspec-core (~> 3.4.0)
91
- rspec-expectations (~> 3.4.0)
92
- rspec-mocks (~> 3.4.0)
93
- rspec-core (3.4.4)
94
- rspec-support (~> 3.4.0)
95
- rspec-expectations (3.4.0)
88
+ rspec (3.5.0)
89
+ rspec-core (~> 3.5.0)
90
+ rspec-expectations (~> 3.5.0)
91
+ rspec-mocks (~> 3.5.0)
92
+ rspec-core (3.5.4)
93
+ rspec-support (~> 3.5.0)
94
+ rspec-expectations (3.5.0)
96
95
  diff-lcs (>= 1.2.0, < 2.0)
97
- rspec-support (~> 3.4.0)
98
- rspec-mocks (3.4.1)
96
+ rspec-support (~> 3.5.0)
97
+ rspec-mocks (3.5.0)
99
98
  diff-lcs (>= 1.2.0, < 2.0)
100
- rspec-support (~> 3.4.0)
101
- rspec-support (3.4.1)
99
+ rspec-support (~> 3.5.0)
100
+ rspec-support (3.5.0)
102
101
  sawyer (0.8.1)
103
102
  addressable (>= 2.3.5, < 2.6)
104
103
  faraday (~> 0.8, < 1.0)
@@ -106,7 +105,7 @@ GEM
106
105
  slop (3.6.0)
107
106
  terminal-table (1.7.3)
108
107
  unicode-display_width (~> 1.1.1)
109
- thor (0.19.1)
108
+ thor (0.19.4)
110
109
  unicode-display_width (1.1.3)
111
110
 
112
111
  PLATFORMS
data/lib/danger_plugin.rb CHANGED
@@ -119,8 +119,10 @@ module Danger
119
119
  {"excluded" => []}
120
120
  end
121
121
 
122
+ excluded_paths = config['excluded'] || []
123
+
122
124
  # Extract excluded paths
123
- return config['excluded'].
125
+ return excluded_paths.
124
126
  map { |path| File.join(File.dirname(config_file), path) }.
125
127
  map { |path| File.expand_path(path) }.
126
128
  select { |path| File.exists?(path) || Dir.exists?(path) }
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module DangerSwiftlint
2
- VERSION = "0.4.1".freeze
3
- SWIFTLINT_VERSION = "0.16.1".freeze
2
+ VERSION = "0.5.0".freeze
3
+ SWIFTLINT_VERSION = "0.18.1".freeze
4
4
  end
@@ -103,6 +103,21 @@ module Danger
103
103
  @swiftlint.lint_files
104
104
  end
105
105
 
106
+ it 'does not crash when excluded is nil' do
107
+ allow(@swiftlint.git).to receive(:added_files).and_return([])
108
+ allow(@swiftlint.git).to receive(:modified_files).and_return([
109
+ 'spec/fixtures/SwiftFile.swift',
110
+ ])
111
+
112
+ expect(Swiftlint).to receive(:lint)
113
+ .with(hash_including(:path => File.expand_path('spec/fixtures/SwiftFile.swift')))
114
+ .and_return(@swiftlint_response)
115
+ .once
116
+
117
+ @swiftlint.config_file = 'spec/fixtures/empty_excluded.yml'
118
+ @swiftlint.lint_files
119
+ end
120
+
106
121
  it 'does not lint deleted files paths' do
107
122
  # Danger (4.3.0 at the time of writing) returns deleted files in the
108
123
  # modified fiels array, which kinda makes sense.
@@ -0,0 +1,7 @@
1
+ disabled_rules:
2
+ - todo
3
+
4
+ included:
5
+ - an/included/folder
6
+
7
+ excluded:
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.4.1
4
+ version: 0.5.0
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-11 00:00:00.000000000 Z
15
+ date: 2017-04-26 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: danger
@@ -170,6 +170,7 @@ files:
170
170
  - lib/version.rb
171
171
  - spec/danger_plugin_spec.rb
172
172
  - spec/fixtures/SwiftFile.swift
173
+ - spec/fixtures/empty_excluded.yml
173
174
  - spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift
174
175
  - spec/fixtures/some_config.yml
175
176
  - spec/spec_helper.rb
@@ -194,13 +195,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
195
  version: '0'
195
196
  requirements: []
196
197
  rubyforge_project:
197
- rubygems_version: 2.5.1
198
+ rubygems_version: 2.6.11
198
199
  signing_key:
199
200
  specification_version: 4
200
201
  summary: A Danger plugin for linting Swift with SwiftLint.
201
202
  test_files:
202
203
  - spec/danger_plugin_spec.rb
203
204
  - spec/fixtures/SwiftFile.swift
205
+ - spec/fixtures/empty_excluded.yml
204
206
  - spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift
205
207
  - spec/fixtures/some_config.yml
206
208
  - spec/spec_helper.rb