danger-swiftlint 0.1.1 → 0.1.2

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: 87e9b7b9fa76a4c5eefb696e8c740412649a911b
4
- data.tar.gz: 07912282f4773d83c09174486559228ed23fa3e0
3
+ metadata.gz: 724a5435fe3b3b09ef18f15e76407a5f9d2deea0
4
+ data.tar.gz: ad2d97395e8578039090fdf1898b8f290f6b1ff8
5
5
  SHA512:
6
- metadata.gz: 9f165ce986edb988dbae14b66df46e50753cc02e27c212046820995b4744d0f18c360bcaa31c88706985ce07c681af81f0665f712732f5c9c120cf2b5e46f8c3
7
- data.tar.gz: 2c7168c8c3aa3ac5e088ec93c1d4b526cf00d5259ff2d278f8d7768bc820aecfbf3e23babb1c785412e4fe7e979db3709c61fbf9374c022c71f77c7c13007ca6
6
+ metadata.gz: c181f89260aa3c63f1efae0b2a63312025a0bc23cf6471a207c8a6c6f0296129bcc5434c3129211d661e729d75cdcc89a88c99a63bd7da07762644673cd9cbb8
7
+ data.tar.gz: 5b6916bb7e8011aaff00bb19b96ccf30cd80c7f8cdd9572ee9ac4a92a53908e4e7a340511155c778831e77fb1937b19962b971a3b67326a1e216daf1a4e592c6
@@ -4,6 +4,10 @@
4
4
 
5
5
  - Nothing yet!
6
6
 
7
+ ## 0.1.2
8
+
9
+ - Adds support for files with spaces in their names. See [#9](https://github.com/ashfurrow/danger-swiftlint/issues/9).
10
+
7
11
  ## 0.1.1
8
12
 
9
13
  - Fixes double-escaped newline characters. See [#11](https://github.com/ashfurrow/danger-swiftlint/issues/11).
data/README.md CHANGED
@@ -30,7 +30,7 @@ swiftlint.lint_files
30
30
  And finally, you can provide a list of files manually:
31
31
 
32
32
  ``` ruby
33
- # Look through all changed Markdown files
33
+ # Look through all changed Swift files
34
34
  swift_files = (modified_files + added_files).select do |file|
35
35
  file.end_with?(".swift")
36
36
  end
@@ -40,6 +40,9 @@ module Danger
40
40
  swift_files = files ? Dir.glob(files) : (modified_files + added_files)
41
41
  swift_files.select! do |line| line.end_with?(".swift") end
42
42
 
43
+ # Make sure we don't fail when paths have spaces
44
+ swift_files = swift_files.map { |file| "\"#{file}\"" }
45
+
43
46
  swiftlint_command = "swiftlint lint --quiet --reporter json"
44
47
  swiftlint_command += " --config #{config_file}" if config_file
45
48
 
@@ -1,3 +1,3 @@
1
1
  module DangerSwiftlint
2
- VERSION = "0.1.1".freeze
2
+ VERSION = "0.1.2".freeze
3
3
  end
@@ -5,7 +5,7 @@ module Danger
5
5
  it 'is a plugin' do
6
6
  expect(Danger::DangerSwiftlint < Danger::Plugin).to be_truthy
7
7
  end
8
-
8
+
9
9
  describe 'with Dangerfile' do
10
10
  before do
11
11
  @dangerfile = testing_dangerfile
@@ -34,7 +34,7 @@ module Danger
34
34
  end
35
35
 
36
36
  it 'handles a known SwiftLint report' do
37
- allow(@swiftlint).to receive(:`).with('swiftlint lint --quiet --reporter json --path spec/fixtures/SwiftFile.swift').and_return(@swiftlint_response)
37
+ allow(@swiftlint).to receive(:`).with('swiftlint lint --quiet --reporter json --path "spec/fixtures/SwiftFile.swift"').and_return(@swiftlint_response)
38
38
 
39
39
  # Do it
40
40
  @swiftlint.lint_files("spec/fixtures/*.swift")
@@ -52,7 +52,7 @@ module Danger
52
52
  it 'handles no files' do
53
53
  allow(@swiftlint).to receive(:modified_files).and_return(['spec/fixtures/SwiftFile.swift'])
54
54
  allow(@swiftlint).to receive(:added_files).and_return([])
55
- allow(@swiftlint).to receive(:`).with('swiftlint lint --quiet --reporter json --path spec/fixtures/SwiftFile.swift').and_return(@swiftlint_response)
55
+ allow(@swiftlint).to receive(:`).with('swiftlint lint --quiet --reporter json --path "spec/fixtures/SwiftFile.swift"').and_return(@swiftlint_response)
56
56
 
57
57
  @swiftlint.lint_files
58
58
 
@@ -61,7 +61,7 @@ module Danger
61
61
 
62
62
  it 'uses a config file' do
63
63
  @swiftlint.config_file = 'some_config.yml'
64
- allow(@swiftlint).to receive(:`).with('swiftlint lint --quiet --reporter json --config some_config.yml --path spec/fixtures/SwiftFile.swift').and_return(@swiftlint_response)
64
+ allow(@swiftlint).to receive(:`).with('swiftlint lint --quiet --reporter json --config some_config.yml --path "spec/fixtures/SwiftFile.swift"').and_return(@swiftlint_response)
65
65
 
66
66
  @swiftlint.lint_files("spec/fixtures/*.swift")
67
67
 
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.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ash Furrow
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-07-07 00:00:00.000000000 Z
13
+ date: 2016-07-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: danger