fastlane-plugin-android_testlab_script_swit 0.1.903 → 0.1.905

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: 7c24ffd72754718feaa353e17d8beeeaeb596e612f7a66b392671610fe013ffc
4
- data.tar.gz: 4c94fe5712584b6232274e22fa529dcd0da376af0c6e4b18d02cf49bd8d36139
3
+ metadata.gz: 3adb4c9f63019c7614662bfbbf576ff4dfa0a5b228ef8ce2b722053f952b869c
4
+ data.tar.gz: 13a37452f78eef2a50ee8a3167d0325486f23b3f1b12b677c46d9640330f0f84
5
5
  SHA512:
6
- metadata.gz: c57b187291ecfe96b8f80e87511b41dafb530201fd657bda12e4cfb1a99ba64da79a7ca42c4952ecc6902e921c86ebd665d43a35d968df8e4866a31a8590ee08
7
- data.tar.gz: 701b04e4d5fe0fa2f0085383063acb2901bda0b82d05949e3e18392e77d4e74fbd82c737b39d656662939d1d93545b2b6047950f611fb257644477e2dbb8ac23
6
+ metadata.gz: 0dfda8874a8c148b9e36a955c840b4db6803f8226579de9d45043afc183bddf31add7b06500ebf654821a3e7d1d9a51deca23a52df95a83c2d6bfee4dc2d3973
7
+ data.tar.gz: 28647d50a8555bf62519046ad6f89919553609f9129fd22e1df66367b4cc99c327544cb2aee0d6668497a36a981caf96ab91a3b81a338fe2eef9270b9dc4a8d9
@@ -12,8 +12,9 @@ module Fastlane
12
12
  def self.run(params)
13
13
  UI.message("********************************")
14
14
  UI.message("Start Action")
15
- UI.message(params[:gcloud_components_channel])
16
-
15
+ UI.message("********************************")
16
+ UI.message("GCloudChannel :: ", params[:gcloud_components_channel])
17
+ UI.message("********************************")
17
18
 
18
19
  # Result Bucket & Dir
19
20
  results_bucket = params[:firebase_test_lab_results_bucket] || "#{params[:project_id]}_test_results"
@@ -28,8 +29,11 @@ module Fastlane
28
29
  # RoboScriptOption
29
30
  robo_script_option = params[:robo_script_path].nil? ? "" : "--robo-script #{params[:robo_script_path]} "
30
31
 
31
- # Swit PayLoad
32
- new_payload = ""
32
+ # Swit Result PayLoad
33
+ swit_device_payload = ""
34
+
35
+ # Swit Send PayLoad
36
+ swit_webhook_payload = params[:swit_webhook_payload][0..-5] + ','
33
37
 
34
38
  # Run Firebase Test Lab
35
39
  Helper.run_tests(params[:gcloud_components_channel], "--type #{params[:type]} "\
@@ -60,26 +64,29 @@ module Fastlane
60
64
 
61
65
  # 'axis_value' 분리하기
62
66
  parts = axis_value.split('-')
67
+
68
+ parts.each_with_index do |part, index|
69
+ swit_device_payload += "{\"type\":\"rt_section\",\"indent\":1,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Device#{index + 1}\"}]},
70
+ {\"type\": \"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Part : #{parts[index]}\"}]},
71
+ {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Result : #{result[:outcome]}\"}]}"
63
72
 
64
- # 출력하기
65
- UI.message("Outcome: #{outcome}, Test Details: #{test_details}")
66
-
67
- # 결과 데이터 저장
68
- results << { parts: parts, outcome: outcome }
73
+ swit_device_payload += "," unless index == result[:parts].length - 1
74
+ end
75
+
69
76
  end
70
77
 
71
- results.each do |result|
72
- result[:parts].each_with_index do |part, index|
73
- new_payload += "{\"type\":\"rt_section\",\"indent\":1,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Device#{index + 1}\"}]},
74
- {\"type\": \"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"model : #{part[:model]}\"}]},
75
- {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"OS Version : #{part[:version]}\"}]},
76
- {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"locale : #{part[:locale]}\"}]},
77
- {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"orientation : #{part[:orientation]}\"}]},
78
- {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Result : #{result[:outcome]}\"}]}"
79
-
80
- new_payload += "," unless index == result[:parts].length - 1
81
- end
82
- end
78
+ # results.each do |result|
79
+ # result[:parts].each_with_index do |part, index|
80
+ # swit_device_payload += "{\"type\":\"rt_section\",\"indent\":1,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Device#{index + 1}\"}]},
81
+ # {\"type\": \"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"model : #{part[:model]}\"}]},
82
+ # {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"OS Version : #{part[:version]}\"}]},
83
+ # {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"locale : #{part[:locale]}\"}]},
84
+ # {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"orientation : #{part[:orientation]}\"}]},
85
+ # {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Result : #{result[:outcome]}\"}]}"
86
+ #
87
+ # swit_device_payload += "," unless index == result[:parts].length - 1
88
+ # end
89
+ # end
83
90
 
84
91
  # 결과좀 봅시다.
85
92
  UI.message(new_payload)
@@ -96,13 +103,10 @@ module Fastlane
96
103
  end
97
104
  end
98
105
 
99
- # Remove the closing square bracket from the original payload and add a comma
100
- swit_webhook_payload = params[:swit_webhook_payload][0..-5] + ','
101
-
102
- # Add the additional payload and close the square bracket
103
- swit_webhook_payload += new_payload + ']}]}'
106
+ # Swit PayLoad 병합
107
+ swit_webhook_payload += swit_device_payload + ']}]}'
104
108
 
105
- # Swit Message
109
+ # Swit WebHook
106
110
  HTTParty.post(params[:swit_webhook_url], body: { body_text: swit_webhook_payload }.to_json, headers: { 'Content-Type' => 'application/json' })
107
111
 
108
112
  UI.message("********************************")
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidTestlabScriptSwit
3
- VERSION = "0.1.903"
3
+ VERSION = "0.1.905"
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.903
4
+ version: 0.1.905
5
5
  platform: ruby
6
6
  authors:
7
7
  - 나비이쁜이