danger-apple_swift_format 0.0.4 → 0.0.5
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/.ruby-version +1 -0
- data/Dangerfile +1 -0
- data/Gemfile.lock +1 -1
- data/lib/swift_format/gem_version.rb +1 -1
- data/lib/swift_format/plugin.rb +5 -7
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0d9866693ffef34aaa5aa15cf8120536b709c05dc03e1474181dbbaeba832935
|
|
4
|
+
data.tar.gz: 6cfc1eae862197407afb47d5c9723307b091124f494865c2a92454ca42a55aa9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 548ba2163a772b7c2e5587f9c85b6f5dee71e1f08026cc673c209b5d47069b41c9942fd3fb1d61b00d38b09a7262c5d16f58d87038a575310f29b53116828766
|
|
7
|
+
data.tar.gz: ba523a13f515ae46a20febd2e050614d2eb93d969388b331cb8dd7274c68a12f49f19af8d6aa53b51301beafad915b2bd23bde9133ff8b8c929d8de8b57a54da
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.6.6
|
data/Dangerfile
CHANGED
data/Gemfile.lock
CHANGED
data/lib/swift_format/plugin.rb
CHANGED
|
@@ -40,16 +40,14 @@ module Danger
|
|
|
40
40
|
# run swift-format format
|
|
41
41
|
# @return [Array<String>]
|
|
42
42
|
#
|
|
43
|
-
def format(files
|
|
44
|
-
in_place_option = "-i"
|
|
45
|
-
in_place_option = '' if !in_place
|
|
46
|
-
|
|
43
|
+
def format(files)
|
|
47
44
|
target = target_file(files)
|
|
48
45
|
return if target.empty?
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
`#{binary_path} format -r -i --configuration #{configuration} #{target}`
|
|
48
|
+
o, e, s = Open3.capture3("git diff #{target}")
|
|
49
|
+
return if o == ''
|
|
50
|
+
warn o
|
|
53
51
|
end
|
|
54
52
|
|
|
55
53
|
def target_file(files)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: danger-apple_swift_format
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kaito watanabe
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-09-
|
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: danger-plugin-api
|
|
@@ -159,6 +159,7 @@ extra_rdoc_files: []
|
|
|
159
159
|
files:
|
|
160
160
|
- ".gitignore"
|
|
161
161
|
- ".rubocop.yml"
|
|
162
|
+
- ".ruby-version"
|
|
162
163
|
- ".travis.yml"
|
|
163
164
|
- Dangerfile
|
|
164
165
|
- Gemfile
|
|
@@ -182,7 +183,7 @@ homepage: https://github.com/marumemomo/danger-swift_format
|
|
|
182
183
|
licenses:
|
|
183
184
|
- MIT
|
|
184
185
|
metadata: {}
|
|
185
|
-
post_install_message:
|
|
186
|
+
post_install_message:
|
|
186
187
|
rdoc_options: []
|
|
187
188
|
require_paths:
|
|
188
189
|
- lib
|
|
@@ -198,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
198
199
|
version: '0'
|
|
199
200
|
requirements: []
|
|
200
201
|
rubygems_version: 3.0.3
|
|
201
|
-
signing_key:
|
|
202
|
+
signing_key:
|
|
202
203
|
specification_version: 4
|
|
203
204
|
summary: danger plugin for apple/swift-format.
|
|
204
205
|
test_files:
|