Class: Danger::DangerSwiftInfo
- Inherits:
-
Plugin
- Object
- Plugin
- Danger::DangerSwiftInfo
- Defined in:
- lib/danger_plugin.rb
Overview
Runs SwiftInfo and prints the results to the pull request. You must have [SwiftInfo](github.com/rockbruno/SwiftInfo) installed somewhere in your project. You can detect that SwiftInfo is running specifically for Danger by adding a ‘if isInPullRequestMode` condition in your Infofile. You can use this condition to extract different rules and prevent saving the new output.
Class Method Summary collapse
Instance Method Summary collapse
-
#run(path) ⇒ void
Run SwiftInfo and print the results to the PR.
Class Method Details
.instance_name ⇒ Object
29 30 31 |
# File 'lib/danger_plugin.rb', line 29 def self.instance_name "swiftinfo" end |
Instance Method Details
#run(path) ⇒ void
This method returns an undefined value.
Run SwiftInfo and print the results to the PR.
22 23 24 25 26 27 |
# File 'lib/danger_plugin.rb', line 22 def run(path) binPath = path output = `#{binPath} -pullRequest -s` html = output.sub("\n", "<br>") (output) end |