fastlane-plugin-sonarcloud_metric_kit 0.1.1 → 0.1.2

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: 7c0c5f65d4d9a28b71b7167801b1e482c6e5ebbca7a46004014d1beef6865011
4
- data.tar.gz: 29b278995c38d9f31b62b7de49be795ce20298d385ec3bd420bed1018ff47f46
3
+ metadata.gz: 9937149157a6ce405039b7620b058d30b72d4da49b5af6a09af5318fa796c882
4
+ data.tar.gz: 64512ec468f1905429f9f186e757edd5e1e0272d0cb8c2b55d813514f8b9f284
5
5
  SHA512:
6
- metadata.gz: 58685710cb6749e958f13bb529cd7d61ee5d7803c01e50489c0d1595024851fbf8554be0ec2e03f5a69098dc3a32baa2ae90e4e0838410cb4a65df42530fead2
7
- data.tar.gz: aa9c2dc590a96dcd806dbfb442cb6c4e1a39b72d2374aebd598ad859a44783991de79b8628aecdb0bc5dabb4fe0d3bb2f23af9e2d95dc40c33f642ea631e0514
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 = measures(params)
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 = quality_gate(params)
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.measures(params)
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.quality_gate(params)
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
- 'Generates a report from SonarCloud'
139
+ 'Collects metrics from SonarCloud'
140
140
  end
141
141
 
142
142
  def self.available_options
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module SonarcloudMetricKit
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
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.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-22 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler