ds_test 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/cucumber.out +11 -5
- data/ds_test.gemspec +1 -1
- data/features/methods/RMbundleStatus.rb +1 -1
- data/features/methods/RMgroupRecordsCostsOrder.rb +21 -14
- data/features/step_definitions/RMgroupRecordsCostsOrder.rb +1 -1
- data/out.henry +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51888132e34386af0cb546206ab181e86d91abe8
|
4
|
+
data.tar.gz: 95af567d3785ea867cf12bff0aedc984402857df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5341165ea1b0838263aa836463ed529a8a70bc2dee2b5c49b80de95b6c38e2f71c3c58512f1aba97e2d99dd30a0da5e366f25c36c0e3b96822ef36413aa4cac
|
7
|
+
data.tar.gz: 4178263ba0cecc7c0097063e49a55c932e049d3f3c716cbcd82b14a076654ed25da531cbd4f82953c282b662ca9e58fded211e1b1d1a8d68928f627a4029682a
|
data/Gemfile.lock
CHANGED
data/cucumber.out
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
#language: es
|
2
|
-
[36m@
|
3
|
-
Característica: Consultar el servicio de
|
2
|
+
[36m@pam_failed_bookings[0m
|
3
|
+
Característica: Consultar el servicio de bookings fallidos de PAM para ver si existe alguno y generar una alarma para alertar de la situación.
|
4
4
|
|
5
|
-
Escenario: Invocar el servicio de
|
6
|
-
[32mDado que invoco al servicio de
|
7
|
-
|
5
|
+
Escenario: Invocar el servicio de bookings fallidos de PAM validando que existan o no entradas.[90m # features/PAMFailedBookings.feature:7[0m
|
6
|
+
[32mDado que invoco al servicio de bookings fallidos de PAM[90m # features/step_definitions/PAMFailedBookings_steps.rb:3[0m[0m
|
7
|
+
[32mEntonces checkeo si hay bookings fallidos[90m # features/step_definitions/PAMFailedBookings_steps.rb:7[0m[0m
|
8
|
+
[36mHay 2 reserva(s) fallidas en PAM[0m
|
9
|
+
[36m[127779208, 121865108][0m
|
10
|
+
|
11
|
+
1 scenario ([32m1 passed[0m)
|
12
|
+
2 steps ([32m2 passed[0m)
|
13
|
+
0m6.424s
|
data/ds_test.gemspec
CHANGED
@@ -4,7 +4,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "ds_test"
|
7
|
-
gem.version = "0.2.
|
7
|
+
gem.version = "0.2.2"
|
8
8
|
gem.authors = ["DS QA"]
|
9
9
|
gem.email = ["jdelrio@despegar.com,smendoza@despegar.com"]
|
10
10
|
gem.description = %q{Test de Media}
|
@@ -80,7 +80,7 @@ def alerta_bundles
|
|
80
80
|
|
81
81
|
mail = Mail.new do
|
82
82
|
from 'ds.test.alert@gmail.com'
|
83
|
-
to 'smendoza@despegar.com
|
83
|
+
to 'smendoza@despegar.com' #, ds-shopping@despegar.com, dssales-product@despegar.com, nicolas.sacheri@despegar.com, santiago.iribarne@despegar.com'
|
84
84
|
subject '[Alerta] Bundles con items sin disponibilidad - DS Automation'
|
85
85
|
|
86
86
|
html_part do
|
@@ -18,16 +18,19 @@ end
|
|
18
18
|
def checkear_orden
|
19
19
|
# Checkea la respuesta del servicio para ver si hay grupos con orden automático que contengan atividades de PAM donde las mismas no ganen el primer orden por Costos.
|
20
20
|
|
21
|
-
resultado =
|
21
|
+
resultado = true
|
22
|
+
|
22
23
|
|
23
|
-
costs = []
|
24
|
-
pam_costs = []
|
25
24
|
@report = []
|
26
25
|
|
27
26
|
if !@service.empty?
|
28
27
|
|
29
28
|
@service.each do | group |
|
30
29
|
|
30
|
+
gname = group['name']
|
31
|
+
costs = []
|
32
|
+
pam_costs = []
|
33
|
+
|
31
34
|
if group['trackingIds'].to_s.include?("PAM") && !group['useOrder']
|
32
35
|
|
33
36
|
group['trackingIds'].each do | id |
|
@@ -61,8 +64,9 @@ def checkear_orden
|
|
61
64
|
end
|
62
65
|
end
|
63
66
|
end
|
67
|
+
|
68
|
+
sleep 2
|
64
69
|
end
|
65
|
-
|
66
70
|
|
67
71
|
rambo_ref = '<A HREF="http://backoffice.despegar.com/ds-rambo/#!/group-records/edit/' + group['oid'] + '">Editar en RAMBO</A><br><br>'
|
68
72
|
|
@@ -71,9 +75,9 @@ def checkear_orden
|
|
71
75
|
@report << group['name'] + '<br>OID: ' + group['oid'] + '<br>Destino: ' + group['destination'] + '<br>Tracking IDs:' + group['trackingIds'] + '(Actividad/es de PAM sin disponibilidad)'
|
72
76
|
end
|
73
77
|
|
74
|
-
if !pam_costs.
|
78
|
+
if !pam_costs.min.nil? && !costs.min.nil?
|
75
79
|
|
76
|
-
if pam_costs.
|
80
|
+
if pam_costs.min > costs.min
|
77
81
|
|
78
82
|
@report << group['name'].to_s + '<br>OID: ' + group['oid'] + '<br>Destino: ' + group['destination'] + '<br>Tracking IDs:' + group['trackingIds'].to_s + '<br>' + rambo_ref
|
79
83
|
end
|
@@ -81,15 +85,17 @@ def checkear_orden
|
|
81
85
|
end
|
82
86
|
end
|
83
87
|
|
84
|
-
if
|
88
|
+
if @report.empty?
|
85
89
|
|
86
|
-
resultado =
|
90
|
+
resultado = false
|
87
91
|
end
|
88
|
-
|
89
|
-
resultado
|
90
92
|
end
|
91
93
|
|
92
|
-
|
94
|
+
resultado
|
95
|
+
|
96
|
+
@report_size = @report.size.to_s
|
97
|
+
|
98
|
+
puts "Hay #{@report_size} grupos de fichas donde no gana una actividad de PAM.".on_red
|
93
99
|
end
|
94
100
|
|
95
101
|
|
@@ -100,7 +106,7 @@ def alerta_group_records
|
|
100
106
|
|
101
107
|
body_template = "<br><h1># Servicio de alerta de Grupos de Fichas para mejora de costos PAM: #</h1><br><b>
|
102
108
|
* Fueron consultados #{@groups_size} Grupos de Fichas.<br>
|
103
|
-
* Aplicaron a este reporte: #{@report_size}
|
109
|
+
* Aplicaron a este reporte: #{@report_size} Grupos de Fichas.</b><br><br>
|
104
110
|
Los siguientes Grupos de Fichas contienen actividades de PAM que pierden competencia de costos con actividades de otro proveedor:<ul>"
|
105
111
|
|
106
112
|
@report.each do | item |
|
@@ -116,7 +122,7 @@ def alerta_group_records
|
|
116
122
|
|
117
123
|
mail = Mail.new do
|
118
124
|
from 'ds.test.alert@gmail.com'
|
119
|
-
to 'ds-pam@despegar.com, nmelano@
|
125
|
+
to 'santiago.iribarne@despegar.com, nicolas.sacheri@despegar.com, ds-pam@despegar.com, nmelano@despegar.com, pscoglio@despegar.com, asaffer@despegar.com, rramires@despegar.com, mviera@despegar.com, vrico@despegar.com'
|
120
126
|
subject '[Alerta] Grupos de Fichas con actividades PAM sin mejor costo - DS Automation'
|
121
127
|
|
122
128
|
html_part do
|
@@ -125,4 +131,5 @@ def alerta_group_records
|
|
125
131
|
end
|
126
132
|
end
|
127
133
|
mail.deliver!
|
128
|
-
end
|
134
|
+
end
|
135
|
+
|
data/out.henry
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"summary":{"total":1,"breakdownByStatusCode":{"OK":1,"ERROR":0,"WARNING":0}},"tasks":[[{"name":"
|
1
|
+
{"summary":{"total":1,"breakdownByStatusCode":{"OK":1,"ERROR":0,"WARNING":0}},"tasks":[[{"name":"pam_failed_bookings","code":"OK","message":"OK","returnedData":{"output":"#language: es\n\u001b[36m@pam_failed_bookings\u001b[0m\nCaracterística: Consultar el servicio de bookings fallidos de PAM para ver si existe alguno y generar una alarma para alertar de la situación.\n\n Escenario: Invocar el servicio de bookings fallidos de PAM validando que existan o no entradas.\u001b[90m # features/PAMFailedBookings.feature:7\u001b[0m\n \u001b[32mDado que invoco al servicio de bookings fallidos de PAM\u001b[90m # features/step_definitions/PAMFailedBookings_steps.rb:3\u001b[0m\u001b[0m\n \u001b[32mEntonces checkeo si hay bookings fallidos\u001b[90m # features/step_definitions/PAMFailedBookings_steps.rb:7\u001b[0m\u001b[0m\n \u001b[36mHay 2 reserva(s) fallidas en PAM\u001b[0m\n \u001b[36m[127779208, 121865108]\u001b[0m\n\n1 scenario (\u001b[32m1 passed\u001b[0m)\n2 steps (\u001b[32m2 passed\u001b[0m)\n0m6.424s\n","backtrace":null},"log":{},"worker":"smendoza-ThinkPad-Edge","parameters":{"env":"rc"}}]]}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ds_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DS QA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|