danger-SwiftInfo 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/danger-SwiftInfo.gemspec +1 -1
- data/lib/danger_SwiftInfo.rb +3 -1
- data/lib/danger_plugin.rb +31 -1
- data/spec/SwiftInfo_spec.rb +2 -2
- metadata +1 -3
- data/lib/SwiftInfo/gem_version.rb +0 -3
- data/lib/SwiftInfo/plugin.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f79aa81d20b9946f3e74a5d56a4205d3226b0d723c41faa428edc214e7950c4
|
4
|
+
data.tar.gz: 3b72ae88fa9f5c4d147bd503fdf0d2a2414e0c472a6794e44f78e4704867afb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '042798967e1704ef9153033c469a2e2a91d74c7ea8ab8d65470e3c737ee82a157c4130fac7ce2da5a6be1f5a7037f07e1adc011eb197f5d23cfd075e8e905433'
|
7
|
+
data.tar.gz: 022cbea2b8a6bab044c441d01cf3bc3731d47ac60591a36e83a1cbdbf3a2315ca157ab5735a9d790d0ceb33a6f522593338869f478bd76203d8a2bb29035270b
|
data/Gemfile.lock
CHANGED
data/danger-SwiftInfo.gemspec
CHANGED
data/lib/danger_SwiftInfo.rb
CHANGED
data/lib/danger_plugin.rb
CHANGED
@@ -1 +1,31 @@
|
|
1
|
-
require "
|
1
|
+
require "open3"
|
2
|
+
|
3
|
+
module Danger
|
4
|
+
# Runs SwiftInfo and prints the results to the pull request.
|
5
|
+
# You must have [SwiftInfo](https://github.com/rockbruno/SwiftInfo) installed
|
6
|
+
# somewhere in your project.
|
7
|
+
# You can detect that SwiftInfo is running specifically for Danger
|
8
|
+
# by adding a `if isInPullRequestMode` condition in your Infofile.
|
9
|
+
# You can use it to extract different rules and prevent saving the new output.
|
10
|
+
# @example Run SwiftInfo
|
11
|
+
#
|
12
|
+
# SwiftInfo.run './Pods/SwiftInfo/bin/swiftinfo'
|
13
|
+
#
|
14
|
+
# @see Bruno Rocha/danger-SwiftInfo
|
15
|
+
# @tags swift, xcode, swiftinfo, ios
|
16
|
+
#
|
17
|
+
class DangerSwiftInfo < Plugin
|
18
|
+
# Run SwiftInfo and print the results to the PR.
|
19
|
+
# @param [String] path Path to the SwiftInfo binary.
|
20
|
+
# @return [void]
|
21
|
+
#
|
22
|
+
def run(path)
|
23
|
+
stdout, stderr, status = Open3.capture3(path + " -pullRequest -s")
|
24
|
+
message(stdout)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.instance_name
|
28
|
+
"swiftinfo"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/spec/SwiftInfo_spec.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require File.expand_path("../spec_helper", __FILE__)
|
2
2
|
|
3
3
|
module Danger
|
4
|
-
describe Danger::
|
4
|
+
describe Danger::DangerSwiftInfo do
|
5
5
|
it "should be a plugin" do
|
6
|
-
expect(Danger::
|
6
|
+
expect(Danger::DangerSwiftInfo.new(nil)).to be_a Danger::Plugin
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-SwiftInfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno Rocha
|
@@ -167,8 +167,6 @@ files:
|
|
167
167
|
- README.md
|
168
168
|
- Rakefile
|
169
169
|
- danger-SwiftInfo.gemspec
|
170
|
-
- lib/SwiftInfo/gem_version.rb
|
171
|
-
- lib/SwiftInfo/plugin.rb
|
172
170
|
- lib/danger_SwiftInfo.rb
|
173
171
|
- lib/danger_plugin.rb
|
174
172
|
- spec/SwiftInfo_spec.rb
|
data/lib/SwiftInfo/plugin.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require "open3"
|
2
|
-
|
3
|
-
module Danger
|
4
|
-
# Runs SwiftInfo and prints the results to the pull request.
|
5
|
-
# You must have [SwiftInfo](https://github.com/rockbruno/SwiftInfo) installed
|
6
|
-
# somewhere in your project.
|
7
|
-
# You can detect that SwiftInfo is running specifically for Danger
|
8
|
-
# by adding a `if isInPullRequestMode` condition in your Infofile.
|
9
|
-
# You can use it to extract different rules and prevent saving the new output.
|
10
|
-
# @example Run SwiftInfo
|
11
|
-
#
|
12
|
-
# SwiftInfo.run './Pods/SwiftInfo/bin/swiftinfo'
|
13
|
-
#
|
14
|
-
# @see Bruno Rocha/danger-SwiftInfo
|
15
|
-
# @tags swift, xcode, swiftinfo, ios
|
16
|
-
#
|
17
|
-
class DangerSwiftInfo < Plugin
|
18
|
-
# Run SwiftInfo and print the results to the PR.
|
19
|
-
# @param [String] path Path to the SwiftInfo binary.
|
20
|
-
# @return [void]
|
21
|
-
#
|
22
|
-
def run(path)
|
23
|
-
stdout, stderr, status = Open3.capture3(path + " -pullRequest -s")
|
24
|
-
message(stdout)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|