fastlane-plugin-android_testlab_script_swit 0.1.73 → 0.1.75

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: 86a328d8f823a4ccfea6b91d1239c3704e62ce6022564c7574faed31d78e7a8a
4
- data.tar.gz: f3e8c0e6e1ccd31d0b6c4f867ff81d39f6ac2bccad28c959816875a320116547
3
+ metadata.gz: fe3ac169af8cb0247450d7ea27192f113a60ee44701601421abdf65a59407d7e
4
+ data.tar.gz: b6314bf5674c305af923baaaaa9c41f8a2bb7249a0ca823a31816fa65a92030a
5
5
  SHA512:
6
- metadata.gz: 66d8c32e887cec77875f9f6e8aa948eaf41a6702293dd6d0b2b2b7caeab23deb05e1af7fc7d169ecc1d617952295e21421b4a223f353588e911f5312736b79b4
7
- data.tar.gz: d538d4ca3cdde43174e50f6d7585089b8fe8bb10f13fc595b96c7e1f6fc7caf7f19cd5795d24c75668b1a9f09b0ee4793d55af99d9732791069cd9554ce046db
6
+ metadata.gz: f4b13da9d53cc2d9d3d3d660bec47ec4397d063f1b4bd2f7b44d208b9f8b0eb0f1226dde386800f658ae1404f1c2238222d7395060756d88cea86062203037b2
7
+ data.tar.gz: 7e5d53cbf1ad81b764a6aeadcdb7c3973126b0d47c40b4818574560fc274be09f3e563016051b0aa01db7ec66b37f2b87b18be1f044b6877c2bcfc7ac3aff821
@@ -12,19 +12,19 @@ module Fastlane
12
12
  def self.run(params)
13
13
  UI.message("Start Action")
14
14
 
15
- # results_bucket = params[:firebase_test_lab_results_bucket] || "#{params[:project_id]}_test_results"
16
- # results_dir = params[:firebase_test_lab_results_dir] || "firebase_test_result_#{DateTime.now.strftime('%Y-%m-%d-%H:%M:%S')}"
15
+ results_bucket = params[:firebase_test_lab_results_bucket] || "#{params[:project_id]}_test_results"
16
+ results_dir = params[:firebase_test_lab_results_dir] || "firebase_test_result_#{DateTime.now.strftime('%Y-%m-%d-%H:%M:%S')}"
17
17
 
18
18
  # Set target project
19
- # Helper.config(params[:project_id])
19
+ Helper.config(params[:project_id])
20
20
 
21
21
  # Activate service account
22
- # Helper.authenticate(params[:gcloud_key_file])
22
+ Helper.authenticate(params[:gcloud_key_file])
23
23
 
24
24
  # RoboScriptOption Add
25
- # robo_script_option = params[:robo_script_path].nil? ? "" : "--robo-script #{params[:robo_script_path]} "
25
+ robo_script_option = params[:robo_script_path].nil? ? "" : "--robo-script #{params[:robo_script_path]} "
26
26
 
27
- # UI.message(params[:gcloud_components_channel])
27
+ UI.message(params[:gcloud_components_channel])
28
28
 
29
29
  # Run Firebase Test Lab
30
30
  # Helper.run_tests(params[:gcloud_components_channel], "--type #{params[:type]} "\
@@ -45,22 +45,22 @@ module Fastlane
45
45
 
46
46
 
47
47
  # 각 JSON 객체에 대해 반복
48
- # json.each do |item|
49
- # # 정보 추출하기
50
- # axis_value = item["axis_value"]
51
- # outcome = item["outcome"]
52
- # test_details = item["test_details"]
53
- #
54
- # # 'axis_value' 분리하기
55
- # parts = axis_value.split('-')
56
- #
57
- # # 출력하기
58
- # UI.message("Outcome: #{outcome}, Test Details: #{test_details}")
59
- #
60
- # parts.each_with_index do |part, index|
61
- # UI.message("Part #{index + 1}: #{part}")
62
- # end
63
- # end
48
+ json.each do |item|
49
+ # 정보 추출하기
50
+ axis_value = item["axis_value"]
51
+ outcome = item["outcome"]
52
+ test_details = item["test_details"]
53
+
54
+ # 'axis_value' 분리하기
55
+ parts = axis_value.split('-')
56
+
57
+ # 출력하기
58
+ UI.message("Outcome: #{outcome}, Test Details: #{test_details}")
59
+
60
+ parts.each_with_index do |part, index|
61
+ UI.message("Part #{index + 1}: #{part}")
62
+ end
63
+ end
64
64
 
65
65
  # params[:devices].each_with_index do |device, index|
66
66
  # payload_string = +{,
@@ -73,6 +73,14 @@ module Fastlane
73
73
  # }
74
74
  # end
75
75
 
76
+ params[:devices].each_with_index do |device, index|
77
+ new_payload = "[{\"type\": \"rt_section\", \"indent\": 1, \"elements\": [{\"type\": \"rt_text\", \"content\": \"Device#{index + 1}\"}]},
78
+ {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"model : #{device[:model]}\"}]},
79
+ {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"OS Version : #{device[:version]}\"}]},
80
+ {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"locale : #{device[:locale]}\"}]},
81
+ {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"orientation : #{device[:orientation]}\"}]},
82
+ {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"Result : #{outcome}\"}]}]"
83
+ end
76
84
 
77
85
  # Fetch results
78
86
  # download_dir = params[:download_dir]
@@ -86,14 +94,6 @@ module Fastlane
86
94
  # end
87
95
  # end
88
96
 
89
- new_payload = [
90
- {"type" => "rt_section", "indent" => 1, "elements" => [{"type" => "rt_text", "content" => "Device#{index + 1}"}]},
91
- {"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{device[:model]}"}]},
92
- {"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{device[:version]}"}]},
93
- {"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{device[:locale]}"}]},
94
- {"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{device[:orientation]}"}]},
95
- {"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{outcome}"}]}
96
- ]
97
97
 
98
98
  # 원래 하던 행위
99
99
  # payload_string = params[:swit_webhook_payload]
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidTestlabScriptSwit
3
- VERSION = "0.1.73"
3
+ VERSION = "0.1.75"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-android_testlab_script_swit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.73
4
+ version: 0.1.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - 나비이쁜이