fastlane-plugin-sonarcloud_metric_kit 0.1.1 → 0.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9937149157a6ce405039b7620b058d30b72d4da49b5af6a09af5318fa796c882
|
4
|
+
data.tar.gz: 64512ec468f1905429f9f186e757edd5e1e0272d0cb8c2b55d813514f8b9f284
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27daa2068beb22d13187eaa29e9c58dd0c1580f395a291336bac4399dc3242fa390b5a06b0f63d670f8368c3e412136905fc7e55492c08b77051a4767a96fa59
|
7
|
+
data.tar.gz: a1da12010c6c2a5d809583f137800e2dea3efe38f57046e548fb8798546a4d91efcde99f541d72ed524c78aa4070b3e07f414b749ce2d02c59182a1c5fd74d40
|
@@ -13,7 +13,7 @@ module Fastlane
|
|
13
13
|
|
14
14
|
def self.collect_metrics(params)
|
15
15
|
metrics = {}
|
16
|
-
measures =
|
16
|
+
measures = get_measures(params)
|
17
17
|
metric_keys.each do |key|
|
18
18
|
metric = measures.find { |m| m['metric'] == key.to_s }
|
19
19
|
metrics[key.to_sym] =
|
@@ -27,7 +27,7 @@ module Fastlane
|
|
27
27
|
end
|
28
28
|
return metrics unless params[:quality_gate]
|
29
29
|
|
30
|
-
quality_gate =
|
30
|
+
quality_gate = get_quality_gate(params)
|
31
31
|
metrics[:quality_gate] = quality_gate
|
32
32
|
if params[:period] && quality_gate['periods'].size > params[:period]
|
33
33
|
metrics[:period_value] = quality_gate['periods'][params[:period]]['parameter']
|
@@ -35,14 +35,14 @@ module Fastlane
|
|
35
35
|
metrics
|
36
36
|
end
|
37
37
|
|
38
|
-
def self.
|
38
|
+
def self.get_measures(params)
|
39
39
|
queries = "componentKey=#{params[:project_key]}&metricKeys=#{metric_keys.join(',')}"
|
40
40
|
url = URI("#{api_url}/measures/component?#{queries}")
|
41
41
|
response = request(url, token: params[:sonar_token])
|
42
42
|
json_parse(response.read_body)['component']['measures']
|
43
43
|
end
|
44
44
|
|
45
|
-
def self.
|
45
|
+
def self.get_quality_gate(params)
|
46
46
|
url = URI("#{api_url}/qualitygates/project_status?projectKey=#{params[:project_key]}")
|
47
47
|
JSON.parse(request(url, token: params[:sonar_token]).read_body)['projectStatus']
|
48
48
|
end
|
@@ -136,7 +136,7 @@ module Fastlane
|
|
136
136
|
#####################################################
|
137
137
|
|
138
138
|
def self.description
|
139
|
-
'
|
139
|
+
'Collects metrics from SonarCloud'
|
140
140
|
end
|
141
141
|
|
142
142
|
def self.available_options
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-sonarcloud_metric_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alteral
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|