danger-swiftformat 0.3.6 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/lib/swiftformat/cmd.rb +1 -3
- data/lib/swiftformat/gem_version.rb +1 -1
- data/lib/swiftformat/swiftformat.rb +12 -2
- data/spec/swiftformat/swiftformat_spec.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e4ff2c06c4f47af744f1ecc4900ec266670fd93c20180b0aedd39a808f3c54c
|
4
|
+
data.tar.gz: 96433fecb5ba65121988850db61de14cd990d30f05146764e918766e006b7daf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '093e955e3ad8c198b162e557746ab18fc572ef5d99f856d0c054db05d402a1e4f1b48d3c4f6c39b5cc88d30fdc4e4fd05cefc3cd3bd64339c06a3146546aee28'
|
7
|
+
data.tar.gz: 29b8270dcc22adbd1e84c2dd128c0f5c5c4f60bd52349480cc8896087edfbc3abd1a9c0c7ad52b2a6571c5e863a3831e3b8ad4b1363410f3d448c12c5c66122b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
danger-swiftformat (0.
|
4
|
+
danger-swiftformat (0.4.0)
|
5
5
|
danger-plugin-api (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -19,7 +19,7 @@ GEM
|
|
19
19
|
colored2 (3.1.2)
|
20
20
|
cork (0.3.0)
|
21
21
|
colored2 (~> 3.1)
|
22
|
-
danger (5.
|
22
|
+
danger (5.11.0)
|
23
23
|
claide (~> 1.0)
|
24
24
|
claide-plugins (>= 0.9.2)
|
25
25
|
colored2 (~> 3.1)
|
@@ -34,7 +34,7 @@ GEM
|
|
34
34
|
danger-plugin-api (1.0.0)
|
35
35
|
danger (> 2.0)
|
36
36
|
diff-lcs (1.3)
|
37
|
-
faraday (0.15.
|
37
|
+
faraday (0.15.4)
|
38
38
|
multipart-post (>= 1.2, < 3)
|
39
39
|
faraday-http-cache (1.3.1)
|
40
40
|
faraday (~> 0.8)
|
@@ -70,7 +70,7 @@ GEM
|
|
70
70
|
notiffany (0.1.1)
|
71
71
|
nenv (~> 0.1)
|
72
72
|
shellany (~> 0.0)
|
73
|
-
octokit (4.
|
73
|
+
octokit (4.13.0)
|
74
74
|
sawyer (~> 0.8.0, >= 0.5.3)
|
75
75
|
open4 (1.3.4)
|
76
76
|
parallel (1.12.1)
|
@@ -135,4 +135,4 @@ DEPENDENCIES
|
|
135
135
|
yard (~> 0.9)
|
136
136
|
|
137
137
|
BUNDLED WITH
|
138
|
-
1.
|
138
|
+
1.17.2
|
data/lib/swiftformat/cmd.rb
CHANGED
@@ -14,8 +14,18 @@ module Danger
|
|
14
14
|
cmd = [@path] + files
|
15
15
|
cmd << additional_args.split unless additional_args.nil? || additional_args.empty?
|
16
16
|
cmd << %w(--dryrun --verbose)
|
17
|
-
|
18
|
-
|
17
|
+
stdout, stderr, status = Cmd.run(cmd.flatten)
|
18
|
+
|
19
|
+
output = stdout.empty? ? stderr : stdout
|
20
|
+
raise "Error running SwiftFormat: Empty output." unless output
|
21
|
+
|
22
|
+
output = output.strip.no_color
|
23
|
+
|
24
|
+
if status && !status.success?
|
25
|
+
raise "Error running SwiftFormat:\nError: #{output}"
|
26
|
+
else
|
27
|
+
raise "Error running SwiftFormat: Empty output." if output.empty?
|
28
|
+
end
|
19
29
|
|
20
30
|
process(output)
|
21
31
|
end
|
@@ -81,7 +81,7 @@ RSpec.describe Danger::SwiftFormat do
|
|
81
81
|
.with(%w(swiftformat . --dryrun --verbose))
|
82
82
|
.and_return("")
|
83
83
|
|
84
|
-
expect { @sut.check_format(%w(.)) }.to raise_error("
|
84
|
+
expect { @sut.check_format(%w(.)) }.to raise_error("Error running SwiftFormat: Empty output.")
|
85
85
|
end
|
86
86
|
|
87
87
|
it "should support nil additional command line arguments" do
|
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.4.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: 2019-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|
@@ -198,8 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
198
|
- !ruby/object:Gem::Version
|
199
199
|
version: '0'
|
200
200
|
requirements: []
|
201
|
-
|
202
|
-
rubygems_version: 2.7.6
|
201
|
+
rubygems_version: 3.0.1
|
203
202
|
signing_key:
|
204
203
|
specification_version: 4
|
205
204
|
summary: A danger plugin for checking Swift formatting using SwiftFormat.
|