fastlane-plugin-android_testlab_script_swit 0.1.902 → 0.1.904

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: 82712f087c69dac8512098d15ba7d160b5ecc26b17fc34b99c010df78d240d9e
4
- data.tar.gz: 977921657a61d11746d5252b84122792111eaab122a9b67a767d27091148e53f
3
+ metadata.gz: 9a2582b2a34e80b4848b07e4f96d9209ad884c83303c7deee64a17d2cf28343b
4
+ data.tar.gz: a5855348551c3cdfa0dbae1d9a7fc92af974301ad0ba0b4aa88352c0bb4eaf2d
5
5
  SHA512:
6
- metadata.gz: 0165a44eb45c86af49f43fb607b545ce97123e120f1708ab8d4de0ca7cc3d0703318a160ab412db1a95fe8d5abef40f5efd0b20578e3c1c7fb220a902695d084
7
- data.tar.gz: 4f471a77ca2564591794f37f9f255598c27b85e6558f58f09d12069302d95efac4f46ed0e850119b4db0dba443fd46a16af71a48367b9a0e86cd5c3715ad6bf7
6
+ metadata.gz: df36431785eda5980be928b76008702a6531b3e04c361b074d2f795652954b43fdc48075a805d0cf33a84ca3818a805e3964ba975cb59ab5091021d01c919b69
7
+ data.tar.gz: 4beea81db53274aaddaf82cf275a5e656c7aa36cb409a5412fcfddb3b6adcc1c91bff10aec485d3fd0b17abc30f5c6a00e0f7bdee0fc69cb734c60f2f5752cdd
@@ -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]} "\
@@ -70,15 +74,14 @@ module Fastlane
70
74
 
71
75
  results.each do |result|
72
76
  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\":{\"tada:\"},{\"name\":{\"tada:\"}}},
79
- {\"type":" "result", "outcome": "#{result[:outcome]}"}"
80
-
81
- new_payload += "," unless index == result[:parts].length -1
77
+ swit_device_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 : #{result[:parts].join(', ')}\"}]},
79
+ {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"OS Version : #{part[:version]}\"}]},
80
+ {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"locale : #{part[:locale]}\"}]},
81
+ {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"orientation : #{part[:orientation]}\"}]},
82
+ {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Result : #{result[:outcome]}\"}]}"
83
+
84
+ swit_device_payload += "," unless index == result[:parts].length - 1
82
85
  end
83
86
  end
84
87
 
@@ -97,13 +100,10 @@ module Fastlane
97
100
  end
98
101
  end
99
102
 
100
- # Remove the closing square bracket from the original payload and add a comma
101
- swit_webhook_payload = params[:swit_webhook_payload][0..-5] + ','
102
-
103
- # Add the additional payload and close the square bracket
104
- swit_webhook_payload += new_payload + ']}]}'
103
+ # Swit PayLoad 병합
104
+ swit_webhook_payload += swit_device_payload + ']}]}'
105
105
 
106
- # Swit Message
106
+ # Swit WebHook
107
107
  HTTParty.post(params[:swit_webhook_url], body: { body_text: swit_webhook_payload }.to_json, headers: { 'Content-Type' => 'application/json' })
108
108
 
109
109
  UI.message("********************************")
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidTestlabScriptSwit
3
- VERSION = "0.1.902"
3
+ VERSION = "0.1.904"
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.902
4
+ version: 0.1.904
5
5
  platform: ruby
6
6
  authors:
7
7
  - 나비이쁜이