fastlane-plugin-xcpretty_report 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c420c3a70ee26b855b91ef141dbcd847dd117090
4
+ data.tar.gz: eea1f30c06b5d624a94ef3239adef7b77cc4b3e3
5
+ SHA512:
6
+ metadata.gz: dada61c9c23739106372c9bec3637a5cc628ffe5d8aee2d19d75b479c99c9c9c53a0ee97ee9a521f0188ce6b4f12127ea43b70d031ebfcb03d2935dfa18e81e1
7
+ data.tar.gz: ca8d546df8122d0f8c0cd328282061c87e7b92fd350bcb72e2d49c4d4edfa4162de2180adf9d410e9bb8e9dd6b1535084503ec4c28832799093725ca486e1604
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Fernando Saragoca <fsaragoca@me.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # xcpretty_report plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-xcpretty_report)
4
+ [![Twitter: @fsaragoca](https://img.shields.io/badge/contact-@fsaragoca-blue.svg?style=flat)](https://twitter.com/fsaragoca)
5
+
6
+ [![CircleCI](https://circleci.com/gh/fsaragoca/fastlane-plugin-xcpretty_report.svg?style=svg)](https://circleci.com/gh/fsaragoca/fastlane-plugin-xcpretty_report)
7
+
8
+ ## Getting Started
9
+
10
+ This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-xcpretty_report`, add it to your project by running:
11
+
12
+ ```bash
13
+ fastlane add_plugin xcpretty_report
14
+ ```
15
+
16
+ ## About xcpretty_report
17
+
18
+ Generate xcodebuild reports using [xcpretty](supermarin/xcpretty).
19
+
20
+ ## Example
21
+
22
+ Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
23
+
24
+ ## Run tests for this plugin
25
+
26
+ To run both the tests, and code style validation, run
27
+
28
+ ```
29
+ rake
30
+ ```
31
+
32
+ To automatically fix many of the styling issues, use
33
+ ```
34
+ rubocop -a
35
+ ```
36
+
37
+ ## Issues and Feedback
38
+
39
+ For any other issues and feedback about this plugin, please submit it to this repository.
40
+
41
+ ## Troubleshooting
42
+
43
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
44
+
45
+ ## Using `fastlane` Plugins
46
+
47
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
48
+
49
+ ## About `fastlane`
50
+
51
+ `fastlane` is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/xcpretty_report/version'
2
+
3
+ module Fastlane
4
+ module XcprettyReport
5
+ # Return all .rb files inside the "actions" and "helper" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::XcprettyReport.all_classes.each do |current|
15
+ require current
16
+ end
@@ -0,0 +1,70 @@
1
+ module Fastlane
2
+ module Actions
3
+ class XcprettyReportAction < Action
4
+ def self.run(params)
5
+ log_file = File.join(params[:buildlog_path], 'xcodebuild.log')
6
+
7
+ output_path = params[:output_path]
8
+ unless File.exist?(output_path)
9
+ Actions.sh("mkdir #{output_path}", log: $verbose)
10
+ end
11
+
12
+ reports = ''
13
+ params[:types].each do |report|
14
+ path = File.join(output_path, params[:name]) + "." + report
15
+ reports << "--report #{report} --output #{path} "
16
+ end
17
+ Actions.sh("cat #{log_file} | bundle exec xcpretty #{reports}", log: $verbose)
18
+
19
+ if params[:use_json_formatter]
20
+ path = File.join(output_path, params[:name]) + ".json"
21
+ Actions.sh("cat #{log_file} | XCPRETTY_JSON_FILE_OUTPUT=#{path} bundle exec xcpretty -f `xcpretty-json-formatter`", log: $verbose)
22
+ end
23
+ end
24
+
25
+ def self.description
26
+ "xcpretty"
27
+ end
28
+
29
+ def self.authors
30
+ ["fsaragoca"]
31
+ end
32
+
33
+ def self.available_options
34
+ [
35
+ FastlaneCore::ConfigItem.new(key: :buildlog_path,
36
+ env_name: "XCPRETTY_REPORT_BUILDLOG_PATH",
37
+ description: "Path for xcodebuild buildlog folder",
38
+ optional: false,
39
+ type: String),
40
+ FastlaneCore::ConfigItem.new(key: :output_path,
41
+ env_name: "XCPRETTY_REPORT_OUTPUT_PATH",
42
+ description: "Path for output directory",
43
+ optional: false,
44
+ type: String),
45
+ FastlaneCore::ConfigItem.new(key: :name,
46
+ env_name: "XCPRETTY_REPORT_NAME",
47
+ description: "Name for report – defaults to 'report'",
48
+ optional: false,
49
+ default_value: 'report',
50
+ type: String),
51
+ FastlaneCore::ConfigItem.new(key: :types,
52
+ env_name: "XCPRETTY_REPORT_TYPES",
53
+ description: "Types of reports to generate",
54
+ optional: false,
55
+ default_value: ['junit', 'html'],
56
+ type: Array),
57
+ FastlaneCore::ConfigItem.new(key: :use_json_formatter,
58
+ env_name: "XCPRETTY_REPORT_JSON_FILE_OUTPUT",
59
+ description: "Outputs a report using 'xcpretty-json-formatter'",
60
+ optional: true,
61
+ is_string: false)
62
+ ]
63
+ end
64
+
65
+ def self.is_supported?(platform)
66
+ true
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,12 @@
1
+ module Fastlane
2
+ module Helper
3
+ class XcprettyReportHelper
4
+ # class methods that you define here become available in your action
5
+ # as `Helper::XcprettyReportHelper.your_method`
6
+ #
7
+ def self.show_message
8
+ UI.message("Hello from the xcpretty_report plugin helper!")
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module XcprettyReport
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,173 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-xcpretty_report
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Fernando Saragoca
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-12-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: xcpretty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.2.4
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 1.0.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 0.2.4
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: xcpretty-json-formatter
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.1.0
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: 1.0.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.1.0
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: 1.0.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: pry
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ - !ruby/object:Gem::Dependency
68
+ name: bundler
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ - !ruby/object:Gem::Dependency
82
+ name: rspec
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: rake
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ - !ruby/object:Gem::Dependency
110
+ name: rubocop
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ - !ruby/object:Gem::Dependency
124
+ name: fastlane
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: 2.0.5
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: 2.0.5
137
+ description:
138
+ email: fsaragoca@me.com
139
+ executables: []
140
+ extensions: []
141
+ extra_rdoc_files: []
142
+ files:
143
+ - LICENSE
144
+ - README.md
145
+ - lib/fastlane/plugin/xcpretty_report.rb
146
+ - lib/fastlane/plugin/xcpretty_report/actions/xcpretty_report_action.rb
147
+ - lib/fastlane/plugin/xcpretty_report/helper/xcpretty_report_helper.rb
148
+ - lib/fastlane/plugin/xcpretty_report/version.rb
149
+ homepage: https://github.com/fsaragoca/fastlane-plugin-xcpretty_report
150
+ licenses:
151
+ - MIT
152
+ metadata: {}
153
+ post_install_message:
154
+ rdoc_options: []
155
+ require_paths:
156
+ - lib
157
+ required_ruby_version: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ required_rubygems_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ requirements: []
168
+ rubyforge_project:
169
+ rubygems_version: 2.5.1
170
+ signing_key:
171
+ specification_version: 4
172
+ summary: Generate xcodebuild reports using xcpretty
173
+ test_files: []