danger-SwiftInfo 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d38730dd2f9b3cd7b09b8b8a0a263973e0c8cfb81145c0810668a909dc9111d0
4
- data.tar.gz: 2323a16af9b01dd0d8e0dd6b3909bbaffb6089c83a2b330e6c3573d9704d2357
3
+ metadata.gz: 3f79aa81d20b9946f3e74a5d56a4205d3226b0d723c41faa428edc214e7950c4
4
+ data.tar.gz: 3b72ae88fa9f5c4d147bd503fdf0d2a2414e0c472a6794e44f78e4704867afb3
5
5
  SHA512:
6
- metadata.gz: 538b1b5fa53d8926c820762ee30d62c79ef64f369aded20984edf235f6f773b71a162eabdd241f2bb33298dc0f736aa9758b3fbb9a8f0a1e593ce0df1400e6f7
7
- data.tar.gz: d4ffa0eecc1b5489f22736e10738aed39767a4d129c431b6db32a60ad6d1e2d9c956e5d496b72b3f5ad8a9ecbb23bd8f7d1399b78594f996bb9442fa6813dd90
6
+ metadata.gz: '042798967e1704ef9153033c469a2e2a91d74c7ea8ab8d65470e3c737ee82a157c4130fac7ce2da5a6be1f5a7037f07e1adc011eb197f5d23cfd075e8e905433'
7
+ data.tar.gz: 022cbea2b8a6bab044c441d01cf3bc3731d47ac60591a36e83a1cbdbf3a2315ca157ab5735a9d790d0ceb33a6f522593338869f478bd76203d8a2bb29035270b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-SwiftInfo (0.0.2)
4
+ danger-SwiftInfo (0.0.3)
5
5
  danger-plugin-api (~> 1.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'SwiftInfo/gem_version.rb'
4
+ require 'danger_SwiftInfo.rb'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'danger-SwiftInfo'
@@ -1 +1,3 @@
1
- require "SwiftInfo/gem_version"
1
+ module SwiftInfo
2
+ VERSION = "0.0.3".freeze
3
+ end
data/lib/danger_plugin.rb CHANGED
@@ -1 +1,31 @@
1
- require "SwiftInfo/plugin"
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
@@ -1,9 +1,9 @@
1
1
  require File.expand_path("../spec_helper", __FILE__)
2
2
 
3
3
  module Danger
4
- describe Danger::DangerSwiftinfo do
4
+ describe Danger::DangerSwiftInfo do
5
5
  it "should be a plugin" do
6
- expect(Danger::DangerSwiftinfo.new(nil)).to be_a Danger::Plugin
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.2
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
@@ -1,3 +0,0 @@
1
- module SwiftInfo
2
- VERSION = "0.0.2".freeze
3
- end
@@ -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