danger-swiftformat 0.2.0 → 0.3.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/swiftformat/gem_version.rb +1 -1
- data/lib/swiftformat/swiftformat.rb +1 -1
- data/spec/swiftformat/swiftformat_spec.rb +15 -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: 1437a0e4028a1bb64f0627d4bc16e15bb8ab73e7
|
4
|
+
data.tar.gz: dbad08332fa993cd805425cc88557dbde5524e67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8314e9c66a55238c9923d80bc249ef6c5c0a7f86cb60a6bb7c5ccf951df51ac584565f4e2015e7499a42bd0f757c6108d1e122cad7880e480e10e3a47e385eca
|
7
|
+
data.tar.gz: 8c9a45515e26efa9cfb60f871b13c9e10a8755ad5979bb295309c1c05d0380401b79fbd52d8e294be2f01c0e049621b44e9f698aa49ff1977a882cccce0e106b
|
data/Gemfile.lock
CHANGED
@@ -10,7 +10,7 @@ module Danger
|
|
10
10
|
|
11
11
|
def check_format(files, additional_args = "")
|
12
12
|
cmd = [@path] + files
|
13
|
-
cmd << additional_args.split unless additional_args.empty?
|
13
|
+
cmd << additional_args.split unless additional_args.nil? || additional_args.empty?
|
14
14
|
cmd << %w(--dryrun --verbose)
|
15
15
|
output = Cmd.run(cmd.flatten)
|
16
16
|
raise "error running swiftformat: empty output" if output.empty?
|
@@ -84,6 +84,21 @@ RSpec.describe Danger::SwiftFormat do
|
|
84
84
|
expect { @sut.check_format(%w(.)) }.to raise_error("error running swiftformat: empty output")
|
85
85
|
end
|
86
86
|
|
87
|
+
it "should support nil additional command line arguments" do
|
88
|
+
expect(@cmd).to receive(:run)
|
89
|
+
.with(%w(swiftformat . --dryrun --verbose))
|
90
|
+
.and_return(fixture("swiftformat_output.txt"))
|
91
|
+
|
92
|
+
output = {
|
93
|
+
errors: [],
|
94
|
+
stats: {
|
95
|
+
run_time: "0.08"
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
expect(@sut.check_format(%w(.), nil)).to eq(output)
|
100
|
+
end
|
101
|
+
|
87
102
|
it "should support additional command line arguments" do
|
88
103
|
expect(@cmd).to receive(:run)
|
89
104
|
.with(%w(swiftformat . --self insert --indent tab --dryrun --verbose))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-swiftformat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Garrigues
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|