fastlane-plugin-forsis 0.1.2 → 0.4.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
2
  SHA256:
3
- metadata.gz: 4247e28c6c483f05835363fd337939d7d6debd8a23a30505324af0d1ef8b339a
4
- data.tar.gz: 47b7d609d3134ca8988f655fe4c098cea70452f08f6a19615a6c5741d925bdf4
3
+ metadata.gz: c6214350ae7ccc08b5f37ddd4d4493108fff8771ac4c9a2d90418ff8cf31c7eb
4
+ data.tar.gz: 7309ead2707217254b2f0caca6ef6483702a47ce26c0bac870887a86ceac9e69
5
5
  SHA512:
6
- metadata.gz: 1d905ad3f4404cc5234dc816158780944c5a8196b0de361b4e6439fa9252eea33ffb60d54bf0b757a8b83450f0f55101599c5339fa04a29fd853d11d767c355d
7
- data.tar.gz: 97906621f8990ed0056f2755efff724f7fc04bcb75f0b7185335d097de69d236f83ce01af9dcbcc6f32550486a7eecbd1470176fc0efccd3308423b014406587
6
+ metadata.gz: 6f6ce65fde0d0f7aa01ad59d7a48e14dac12238135355d152c507257f1e19fa63a1bb7afca1e39bccb398c07fc730000937caeb0ff7c05091eb03cad50719d4f
7
+ data.tar.gz: fbb9506f41ea44efa692450ed8eb26a36d3bd2dc68e0670ab8e9a1be12cf9f628f98232ed07c82f94d32887509298054e298e42b4ea0bdb4addc3a735f3ee7d6
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.2"
3
+ VERSION = "0.4.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.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Azadeh Bagheri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-20 00:00:00.000000000 Z
11
+ date: 2022-06-15 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.11.0
19
+ version: 1.13.6
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.11.0
26
+ version: 1.13.6
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'
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
139
173
  description:
140
- email: Azadeh.Bagheri@loblaw.ca
174
+ email: azadeh.bagheri7@gmail.com
141
175
  executables: []
142
176
  extensions: []
143
177
  extra_rdoc_files: []
@@ -148,10 +182,15 @@ 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: {}
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
155
194
  post_install_message:
156
195
  rdoc_options: []
157
196
  require_paths:
@@ -160,14 +199,14 @@ 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
- rubygems_version: 3.0.3
209
+ rubygems_version: 3.1.6
171
210
  signing_key:
172
211
  specification_version: 4
173
212
  summary: This plugin produces generic test execution reports supported by SonarQube