fastlane-plugin-forsis 0.1.2 → 0.2.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: ab0d0ac2b67065c08bad779629b4018f40283cfc4e249f7fdae867320bbec5e5
4
+ data.tar.gz: be0cf65fd5db78c85eaad85464f266d47a4c4f30593ae60668811e1cf7fbcc18
5
5
  SHA512:
6
- metadata.gz: 1d905ad3f4404cc5234dc816158780944c5a8196b0de361b4e6439fa9252eea33ffb60d54bf0b757a8b83450f0f55101599c5339fa04a29fd853d11d767c355d
7
- data.tar.gz: 97906621f8990ed0056f2755efff724f7fc04bcb75f0b7185335d097de69d236f83ce01af9dcbcc6f32550486a7eecbd1470176fc0efccd3308423b014406587
6
+ metadata.gz: b021735b9d847889f31342e5d3e073bdecf92c34d83937906efe3dd5002c746523ff59c52d0ce1fe58e805d9365a2f33e3d294fcea7acd6dd2cae5a746de3a2e
7
+ data.tar.gz: 8f642d422400b2052096acef5c850e0ea9d72ea8e539b9eb9d0514dfe63b9278b6c7b572908fae277892a032ee8d58287308b56512feb9af15e2f27191223cdc
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](https://img.shields.io/gem/v/fastlane-plugin-forsis.svg?style=flat)](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/azohra/forsis/actions/workflows/CI-workflow.yml/badge.svg)](https://github.com/azohra/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
 
@@ -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.2.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,14 +1,14 @@
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.2.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-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -16,42 +16,48 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.11.0
19
+ version: 1.12.5
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.12.5
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,6 +142,34 @@ 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
174
  email: Azadeh.Bagheri@loblaw.ca
141
175
  executables: []
@@ -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
185
+ - lib/tasks/validate.rake
151
186
  homepage: https://github.com/azohra/forsis
152
187
  licenses:
153
188
  - MIT
154
- metadata: {}
189
+ metadata:
190
+ bug_tracker_uri: https://github.com/azohra/forsis/issues
191
+ changelog_uri: https://github.com/azohra/forsis/releases
192
+ homepage_uri: https://github.com/azohra/forsis
193
+ source_code_uri: https://github.com/azohra/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.5'
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