fastlane-plugin-forsis 0.1.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 61e815ba689e3be9ad2ff6dded943d4d07112a0a
4
- data.tar.gz: 141989f822f5281eca255525b09b9698fa12e087
2
+ SHA256:
3
+ metadata.gz: ffc2ba339accb4cc2f8ecc26d0a9c2b3926caaf3880ca2450f67752b4edddcae
4
+ data.tar.gz: d864a8811e6f35401fc0689be53be901e995cfae577ba5525fdb8158c5448b43
5
5
  SHA512:
6
- metadata.gz: 7b785ecd7bab08100a2872bf8e09cab1120680f52b342c12e0de15719035be9b0a34438340cfc69d2c685b8ced9a34e8c042ae3b4300819fd8f54f67ca883136
7
- data.tar.gz: 78e6061b5723108ed7da1fe850a20d8a7eae8a5a611319bdd5b68217b999ea0cc060b3df62647fdb539e087ce68127d854e3c9ab49d193dbaacb83763c837d8b
6
+ metadata.gz: 71d2c9735c37ee5aae6100478759e21f7d6e8ef7cec399bc1be13291a71c24289601cff33a12145265b2d96357badaebaed03d345472757db323584a4e88b907
7
+ data.tar.gz: 53414c7ea5545f47d7d97e127c371412632bdcc6392148f87867c37884885dec72b191b9146f7d6fe8858ff3c9985cbc005b56d809b2d5641583fc31875f712e
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2019 Azohra/forsis
3
+ Copyright (c) 2022 Tumiya/forsis
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # forsis plugin
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-forsis)
4
+ [![Gem Version](https://badge.fury.io/rb/fastlane-plugin-forsis.svg)](https://rubygems.org/gems/fastlane-plugin-forsis)
5
+ [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
6
+ [![Actions Status](https://github.com/Tumiya/forsis/actions/workflows/CI-workflow.yml/badge.svg)](https://github.com/Tumiya/forsis/actions/workflows/CI-workflow.yml?query=branch%3Amaster)
7
+
4
8
 
5
9
  **forsis** is a [_fastlane_](https://github.com/fastlane/fastlane) plugin that will be helpful to those swift developers who use SonarQube to analyze their code. forsis uses JUnit test reports generated by fastlane to produce generic test execution reports supported by SonarQube.
6
10
 
@@ -17,7 +21,7 @@ In addidtion, you can see a breakdown of test results under project Measures > C
17
21
  To get started with `fastlane-plugin-forsis`, add it to your project by running:
18
22
 
19
23
  ```bash
20
- fastlane add_plugin forsis
24
+ bundle exec fastlane add_plugin forsis
21
25
  ```
22
26
  Start using the plugin by adding this example 'lane' to your Fastfile:
23
27
 
@@ -62,31 +66,14 @@ This plugin creates an XML test report called `Test_sonarqube_report.xml`. To ge
62
66
  * `sonar.testExecutionReportPaths` is the path to the SonarQube test report file generated by the plugin *i.e.*, the value of the `sonar_report_directory` in the forsis action followed by the name of the XML file that contains the report. This would be `fastlane/Test_sonarqube_report.xml`, if sonar_report_directory was not set.
63
67
 
64
68
  If you need help setting up analysis parameters for SonarQube, refer to the [SonarQube Analysis Parameters](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) documentation.
65
- ## Run tests for this plugin
66
-
67
- To run both the tests, and code style validation, run
68
-
69
- ```
70
- rake
71
- ```
72
-
73
- To automatically fix many of the styling issues, use
74
- ```
75
- rubocop -a
76
- ```
77
69
 
78
70
  ## Troubleshooting
79
71
 
80
72
  If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
81
73
 
82
- ## Using _fastlane_ Plugins
83
-
84
- For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
85
-
86
74
  ## About _fastlane_
87
75
 
88
76
  _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).
89
- This software is available as open source under the terms of the MIT License.
90
77
 
91
78
  ## Contributing
92
79
 
@@ -95,9 +82,9 @@ Bug reports and suggestions for improvements are always welcome. PRs are even be
95
82
  If you run into any issues, before submitting a new GitHub issue, please make sure to
96
83
 
97
84
  * Check out the entire README on this repo
98
- * Search for [existing GitHub issues](https://github.com/azohra/forsis/issues)
85
+ * Search for [existing GitHub issues](https://github.com/Tumiya/forsis/issues)
99
86
 
100
- If the above doesn't help, please submit an issue on [GitHub](https://github.com/azohra/forsis/issues). When reporting a bug, please make sure to include a spec that highlights the bug.
87
+ If the above doesn't help, please submit an issue on [GitHub](https://github.com/Tumiya/forsis/issues). When reporting a bug, please make sure to include a spec that highlights the bug.
101
88
 
102
89
  ## License
103
90
 
@@ -4,7 +4,6 @@ require_relative '../helper/forsis_helper'
4
4
  module Fastlane
5
5
  module Actions
6
6
  class ForsisAction < Action
7
-
8
7
  def self.run(params)
9
8
  junit_report_path = params[:junit_report_file]
10
9
  sonarqube_report_path = params[:sonar_report_directory]
@@ -55,7 +54,6 @@ module Fastlane
55
54
  [:ios, :mac].include?(platform)
56
55
  true
57
56
  end
58
-
59
57
  end
60
58
  end
61
59
  end
@@ -6,23 +6,23 @@ module Fastlane
6
6
  class Generator
7
7
  def self.generate(junit_report_path, sonarqube_report_path)
8
8
  junit_file = Nokogiri::XML(File.open(junit_report_path))
9
- sonarqube_file = File.open(sonarqube_report_path + "/Test_sonarqube_report.xml", 'w')
9
+ sonarqube_file = File.open("#{sonarqube_report_path}/Test_sonarqube_report.xml", 'w')
10
10
  test_suites = junit_file.xpath("//testsuite")
11
11
  builder = Nokogiri::XML::Builder.new do |xml|
12
- xml.testExecutions({ version: :"1" }) do
12
+ xml.testExecutions({ version: :'1' }) do
13
13
  test_suites.each do |test_file|
14
14
  file_name = `echo #{test_file["name"]}| cut -d'.' -f 2`.gsub(/\n/, '')
15
15
  file_path = get_test_file_path(file_name)
16
16
  test_cases = []
17
17
  test_file.children.each do |child|
18
- test_cases << child if child.class == Nokogiri::XML::Element
18
+ test_cases << child if child.instance_of?(Nokogiri::XML::Element)
19
19
  end
20
20
  xml.file({ path: :"#{file_path}" }) do
21
21
  test_cases.each do |test|
22
22
  test_duration = (test["time"].to_f * 1000).round
23
23
  test_failures = []
24
24
  test.children.each do |test_child|
25
- test_failures << test_child if test_child.class == Nokogiri::XML::Element
25
+ test_failures << test_child if test_child.instance_of?(Nokogiri::XML::Element)
26
26
  end
27
27
  xml.testCase({ name: :"#{test["name"]}", duration: :"#{test_duration}" }) do
28
28
  test_failures.each do |failure|
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Forsis
3
- VERSION = "0.1.1"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -0,0 +1,14 @@
1
+ require_relative '../fastlane/plugin/forsis/version'
2
+
3
+ namespace :validate do
4
+ desc "Validate the gem version before release to ensure a corresponding tag doesn't exit"
5
+ task :version do
6
+ include Fastlane::Forsis
7
+ current_version = "v#{Fastlane::Forsis::VERSION}"
8
+ latest_tag = `git ls-remote --tags --refs --sort=v:refname origin | tail -n 1 | cut -d '/' -f 3`
9
+ if current_version == latest_tag.tr("\n", '')
10
+ puts "ERROR: Tag already exists"
11
+ exit 1
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,57 +1,63 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-forsis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Azadeh Bagheri
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-06 00:00:00.000000000 Z
11
+ date: 2022-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.9.0
19
+ version: 1.13.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.9.0
26
+ version: 1.13.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.15.0
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: 3.0.0
34
37
  type: :development
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - ">="
39
42
  - !ruby/object:Gem::Version
40
- version: '0'
43
+ version: 1.15.0
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: 3.0.0
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: fastlane
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - ">="
51
+ - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: 2.111.0
53
+ version: '2.185'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - ">="
58
+ - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: 2.111.0
60
+ version: '2.185'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: pry
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +90,16 @@ dependencies:
84
90
  name: rspec
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
- - - ">="
93
+ - - "~>"
88
94
  - !ruby/object:Gem::Version
89
- version: '0'
95
+ version: '3.10'
90
96
  type: :development
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
- - - ">="
100
+ - - "~>"
95
101
  - !ruby/object:Gem::Version
96
- version: '0'
102
+ version: '3.10'
97
103
  - !ruby/object:Gem::Dependency
98
104
  name: rspec_junit_formatter
99
105
  requirement: !ruby/object:Gem::Requirement
@@ -114,16 +120,16 @@ dependencies:
114
120
  requirements:
115
121
  - - "~>"
116
122
  - !ruby/object:Gem::Version
117
- version: 0.65.0
123
+ version: '1.24'
118
124
  type: :development
119
125
  prerelease: false
120
126
  version_requirements: !ruby/object:Gem::Requirement
121
127
  requirements:
122
128
  - - "~>"
123
129
  - !ruby/object:Gem::Version
124
- version: 0.65.0
130
+ version: '1.24'
125
131
  - !ruby/object:Gem::Dependency
126
- name: simplecov
132
+ name: rubocop-rake
127
133
  requirement: !ruby/object:Gem::Requirement
128
134
  requirements:
129
135
  - - ">="
@@ -136,8 +142,36 @@ dependencies:
136
142
  - - ">="
137
143
  - !ruby/object:Gem::Version
138
144
  version: '0'
139
- description:
140
- email: Azadeh.Bagheri@loblaw.ca
145
+ - !ruby/object:Gem::Dependency
146
+ name: rubocop-rspec
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: simplecov
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - "~>"
164
+ - !ruby/object:Gem::Version
165
+ version: 0.21.2
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: 0.21.2
173
+ description:
174
+ email: azadeh.bagheri7@gmail.com
141
175
  executables: []
142
176
  extensions: []
143
177
  extra_rdoc_files: []
@@ -148,11 +182,16 @@ files:
148
182
  - lib/fastlane/plugin/forsis/actions/forsis_action.rb
149
183
  - lib/fastlane/plugin/forsis/helper/forsis_helper.rb
150
184
  - lib/fastlane/plugin/forsis/version.rb
151
- homepage: https://github.com/azohra/forsis
185
+ - lib/tasks/validate.rake
186
+ homepage: https://github.com/Tumiya/forsis
152
187
  licenses:
153
188
  - MIT
154
- metadata: {}
155
- post_install_message:
189
+ metadata:
190
+ bug_tracker_uri: https://github.com/Tumiya/forsis/issues
191
+ changelog_uri: https://github.com/Tumiya/forsis/releases
192
+ homepage_uri: https://github.com/Tumiya/forsis
193
+ source_code_uri: https://github.com/Tumiya/forsis
194
+ post_install_message:
156
195
  rdoc_options: []
157
196
  require_paths:
158
197
  - lib
@@ -160,16 +199,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
160
199
  requirements:
161
200
  - - ">="
162
201
  - !ruby/object:Gem::Version
163
- version: '0'
202
+ version: 2.6.0
164
203
  required_rubygems_version: !ruby/object:Gem::Requirement
165
204
  requirements:
166
205
  - - ">="
167
206
  - !ruby/object:Gem::Version
168
207
  version: '0'
169
208
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 2.6.11
172
- signing_key:
209
+ rubygems_version: 3.1.6
210
+ signing_key:
173
211
  specification_version: 4
174
212
  summary: This plugin produces generic test execution reports supported by SonarQube
175
213
  from JUnit test reports generated by fastlane.