fastlane-plugin-android_testlab_script_swit 0.1.76 → 0.1.78
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 947ef3fa152318036e2d95276ceeff7eddb1b6a75f5b9003524b187e85392133
|
4
|
+
data.tar.gz: 5f35b245ab32dbca1617abf028ae4a709e5a082d6f317bf79cd2d7b568f46151
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26c0cc5dc160a22e5b6e69e3dce5b93dca874e18f2d50b57113899762d663e1676dccad9bed981736f0c66fac86e5766c3c7d094135a28b81b20b2d69d44ef6e
|
7
|
+
data.tar.gz: 8329a39781a09097a01bf4f9500c50f9d40ca4bc7fa3bef0f178c54bf404cbfc2db0ae2aef6525eb8d3e14bbf70ac1550fde4050e5e28833a5b2207ccd4170a6
|
data/lib/fastlane/plugin/android_testlab_script_swit/actions/android_testlab_script_swit_action.rb
CHANGED
@@ -71,6 +71,15 @@ module Fastlane
|
|
71
71
|
# {"type":"rt_section","indent":2,"elements":[{"type\":\"rt_text\",\"content":{"orientation : #{device[:orientation]}"}}},
|
72
72
|
# {"type":"rt_section","indent":2,"elements":[{"type":"rt_text","content":{"Result : #{outcome}"}}},
|
73
73
|
# }
|
74
|
+
# end
|
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}\"}]}]"
|
74
83
|
# end
|
75
84
|
|
76
85
|
params[:devices].each_with_index do |device, index|
|
@@ -78,8 +87,7 @@ module Fastlane
|
|
78
87
|
{\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"model : #{device[:model]}\"}]},
|
79
88
|
{\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"OS Version : #{device[:version]}\"}]},
|
80
89
|
{\"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}\"}]}]"
|
90
|
+
{\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"orientation : #{device[:orientation]}\"}]}"
|
83
91
|
end
|
84
92
|
|
85
93
|
# Fetch results
|
@@ -99,13 +107,13 @@ module Fastlane
|
|
99
107
|
# payload_string = params[:swit_webhook_payload]
|
100
108
|
|
101
109
|
# 앞뒤 지우기
|
102
|
-
|
110
|
+
new_payload_string = new_payload.to_json
|
103
111
|
|
104
|
-
#
|
105
|
-
|
112
|
+
# Remove the closing square bracket from the original payload and add a comma
|
113
|
+
swit_webhook_payload = params[:swit_webhook_payload][0..-3] + ','
|
106
114
|
|
107
115
|
# Add the additional payload and close the square bracket
|
108
|
-
|
116
|
+
swit_webhook_payload += new_payload_string + ']}]}'
|
109
117
|
|
110
118
|
# Swit Message
|
111
119
|
HTTParty.post(params[:swit_webhook_url], body: { body_text: params[:swit_webhook_payload] }.to_json, headers: { 'Content-Type' => 'application/json' })
|