imperituroard 1.1.7 → 1.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/runConfigurations/autovpn.xml +21 -0
- data/.idea/runConfigurations/dabrab_proced.xml +21 -0
- data/.idea/runConfigurations/test9_dab.xml +21 -0
- data/imperituroard.gemspec +1 -1
- data/lib/.DS_Store +0 -0
- data/lib/imperituroard.rb +57 -5
- data/lib/imperituroard/.DS_Store +0 -0
- data/lib/imperituroard/add_functions/logger/any_functions.rb +4 -2
- data/lib/imperituroard/platforms/iwag/get_iwag_data.rb +90 -0
- data/lib/imperituroard/platforms/iwag/iwag_database_worker.rb +24 -0
- data/lib/imperituroard/platforms/iwag/iwag_telnet_connector.rb +112 -0
- data/lib/imperituroard/platforms/staros/staros_automation.rb +1 -1
- data/lib/imperituroard/projects/autovpn.rb +27 -0
- data/lib/imperituroard/projects/{vpn/ezuev_fun → autovpn}/functions_ezuev.rb +0 -0
- data/lib/imperituroard/projects/autovpn/mongo_vpn.rb +56 -0
- data/lib/imperituroard/projects/iot.rb +1 -1
- data/lib/imperituroard/projects/iot/hua_oceanconnect_adapter.rb +25 -21
- data/lib/imperituroard/projects/iot/internal_functions.rb +5 -4
- data/lib/imperituroard/projects/mhub.rb +68 -14
- data/lib/imperituroard/projects/mhub/gms.rb +96 -0
- data/lib/imperituroard/projects/mhub/sk.rb +26 -18
- data/lib/imperituroard/projects/mhub/subs/dabrab/dabrab_platform.rb +5 -4
- data/lib/imperituroard/projects/mhub/subs/dabrab/dabrab_proced.rb +162 -100
- data/lib/imperituroard/projects/mhub/subs/evrotorg/gms_connector.rb +69 -0
- data/lib/imperituroard/projects/ukaz60.rb +4 -2
- data/lib/imperituroard/projects/ukaz60/belgim.rb +1 -1
- data/lib/imperituroard/projects/ukaz60/fortigate.rb +1 -1
- data/lib/imperituroard/projects/ukaz60/staros.rb +5 -5
- data/lib/imperituroard/projects/ukaz60/ukaz60_add_func.rb +50 -4
- data/lib/imperituroard/projects/wttx/updatepostcps.rb +7 -7
- data/lib/imperituroard/version.rb +1 -1
- metadata +17 -7
@@ -3,11 +3,12 @@ require 'imperituroard/projects/iot/internal_functions'
|
|
3
3
|
|
4
4
|
class Crm_2
|
5
5
|
|
6
|
-
attr_accessor :crm_callback_url, :crm_login, :crm_password, :internal_func, :telegram_connector
|
6
|
+
attr_accessor :crm_callback_url, :crm_login, :crm_password, :internal_func, :telegram_connector, :log_level
|
7
7
|
|
8
|
-
def initialize(crm_callback_url, crm_login, crm_password, telegram_api_url, telegram_chat_id)
|
8
|
+
def initialize(crm_callback_url, crm_login, crm_password, telegram_api_url, telegram_chat_id, log_level)
|
9
9
|
@crm_callback_url = crm_callback_url
|
10
10
|
@crm_login = crm_login
|
11
|
+
@log_level = log_level
|
11
12
|
@crm_password = crm_password
|
12
13
|
@internal_func = InternalFunc.new
|
13
14
|
@telegram_connector = Telegram_2.new(telegram_api_url, telegram_chat_id)
|
@@ -44,7 +45,7 @@ class Crm_2
|
|
44
45
|
:body => {:request_message => crm_payload,
|
45
46
|
:res_code => res.code,
|
46
47
|
:res_body => JSON.parse(res.body.to_s)}}
|
47
|
-
p res.body
|
48
|
+
#p res.body
|
48
49
|
end
|
49
50
|
thr_crm_status_2.join
|
50
51
|
|
@@ -52,7 +53,7 @@ class Crm_2
|
|
52
53
|
output_params = {:code => 500, :result => "Crm_2.crm_status_2: Something wrong", :body => {:request_message => request_message}}
|
53
54
|
telegram_connector.telegram_message(output_params)
|
54
55
|
end
|
55
|
-
internal_func.printer_texter({:input => input_params, :output => output_params, :procedure => "Crm_2.crm_status_2"},
|
56
|
+
internal_func.printer_texter({:input => input_params, :output => output_params, :procedure => "Crm_2.crm_status_2"}, log_level)
|
56
57
|
output_params
|
57
58
|
|
58
59
|
end
|
@@ -30,9 +30,9 @@ class Dabrab
|
|
30
30
|
image_dat = stri.scan(regexp_image1)
|
31
31
|
|
32
32
|
|
33
|
-
p button_url_dat
|
34
|
-
p button_text_dat
|
35
|
-
p image_dat
|
33
|
+
#p button_url_dat
|
34
|
+
#p button_text_dat
|
35
|
+
#p image_dat
|
36
36
|
|
37
37
|
begin
|
38
38
|
if button_url_dat != [] && button_url_dat != nil && button_url_dat != ""
|
@@ -90,19 +90,20 @@ class Dabrab
|
|
90
90
|
scheme = 0
|
91
91
|
end
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
93
|
+
case scheme
|
94
|
+
when 0
|
95
|
+
sk_format = {"text": text, "ttl": 60}
|
96
|
+
when 1
|
97
|
+
sk_format = {"text": text, "ttl": 60, "caption": button_text, "action": button_url}
|
98
|
+
when 2
|
99
|
+
sk_format = {"text": text, "ttl": 60, "caption": button_text, "action": button_url, "img": image}
|
100
|
+
when 3
|
101
|
+
sk_format = {"img": image, "ttl": 60}
|
102
|
+
else
|
103
|
+
nil
|
103
104
|
end
|
104
105
|
|
105
|
-
p sk_format
|
106
|
+
#p sk_format
|
106
107
|
|
107
108
|
output_answer ={:code => 200, :result => "Success", :body => {:to_sk_format => sk_format, :button_url => button_url, :image => image, :button_text => button_text, :text => text, :scheme => scheme, :scheme_dic => scheme_dic[scheme]}}
|
108
109
|
rescue
|
@@ -125,11 +126,12 @@ class Dabrab
|
|
125
126
|
#"extra_id": extra_id
|
126
127
|
})
|
127
128
|
rescue
|
128
|
-
|
129
|
+
nil
|
130
|
+
#p "failed: #{g.to_s}"
|
129
131
|
end
|
130
132
|
|
131
133
|
end
|
132
|
-
p converted_msisdn_list
|
134
|
+
#p converted_msisdn_list
|
133
135
|
converted_msisdn_list
|
134
136
|
|
135
137
|
end
|
@@ -155,8 +157,8 @@ class Dabrab
|
|
155
157
|
]
|
156
158
|
}
|
157
159
|
|
158
|
-
p "send_responce_formatter(hub_answer)"
|
159
|
-
p hub_answer
|
160
|
+
#p "send_responce_formatter(hub_answer)"
|
161
|
+
#p hub_answer
|
160
162
|
|
161
163
|
for a in hub_answer[:body][:res_body]["messages"]
|
162
164
|
status1 = {}
|
@@ -181,101 +183,161 @@ class Dabrab
|
|
181
183
|
messages_sect.append(status1)
|
182
184
|
end
|
183
185
|
|
184
|
-
p messages_sect
|
186
|
+
#p messages_sect
|
185
187
|
|
186
188
|
mess_to_recip = {"bulkId": "00000000-0000-0000-0000-000000000000", "messages": messages_sect}
|
187
189
|
{:code => 200, :result => "Data processed", :body => {:mess_to_recip => mess_to_recip}}
|
188
190
|
end
|
189
191
|
|
190
192
|
|
191
|
-
def delivery_report_transform(
|
193
|
+
def delivery_report_transform(hub_report_in)
|
194
|
+
|
192
195
|
#{"number"=>"375297116638", "time"=>1588673492000, "status"=>2, "substatus"=>23, "msg_status"=>23033, "message_id"=>"486649ba-a573-4ee9-8f58-018ed20ca6fd", "extra_id"=>"444/0/ServiceModel/ScGetReports.svc/GetReports", "sent_via"=>"viber", "controller"=>"reports", "action"=>"delivery", "report"=>{"number"=>"375297116638", "time"=>1588673492000, "status"=>2, "substatus"=>23, "msg_status"=>23033, "message_id"=>"486649ba-a573-4ee9-8f58-018ed20ca6fd", "extra_id"=>"444/0/ServiceModel/ScGetReports.svc/GetReports", "sent_via"=>"viber"}}
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
196
|
+
#p hub_report
|
197
|
+
#p "hub_report"
|
198
|
+
report_to_recip = []
|
199
|
+
|
200
|
+
data_for_status = {
|
201
|
+
23011 => {:status_id => 5, :status_grid => 3, :status_grname => "DELIVERED", :status_name => "DELIVERED_TO_HANDSET", :status_descr => "Message delivered by SMS",
|
202
|
+
:error_id => 0, :error_grid => 0, :error_grname => "Ok", :error_name => "NO_ERROR", :error_descr => "No Error", :error_permanent => false
|
203
|
+
},
|
204
|
+
23033 => {:status_id => 5, :status_grid => 3, :status_grname => "DELIVERED", :status_name => "DELIVERED_TO_HANDSET", :status_descr => "Message delivered by Viber",
|
205
|
+
:error_id => 0, :error_grid => 0, :error_grname => "Ok", :error_name => "NO_ERROR", :error_descr => "No Error", :error_permanent => false
|
206
|
+
},
|
207
|
+
35015 => {:status_id => 15, :status_grid => 4, :status_grname => "EXPIRED", :status_name => "EXPIRED_EXPIRED", :status_descr => "SMS Message TTL EXPIRED",
|
208
|
+
:error_id => 6, :error_grid => 1, :error_grname => "HANDSET_ERRORS", :error_name => "EC_ABSENT_SUBSCRIBER_SM", :error_descr => "Subscriber is absent", :error_permanent => false
|
209
|
+
}, #message SMS expired
|
210
|
+
36463 => {:status_id => 15, :status_grid => 4, :status_grname => "EXPIRED", :status_name => "EXPIRED_EXPIRED", :status_descr => "Viber Message TTL EXPIRED",
|
211
|
+
:error_id => 6, :error_grid => 1, :error_grname => "HANDSET_ERRORS", :error_name => "EC_ABSENT_SUBSCRIBER_SM", :error_descr => "Subscriber is absent.", :error_permanent => false
|
212
|
+
}, #message Viber expired
|
213
|
+
36010 => {:status_id => 4, :status_grid => 2, :status_grname => "UNDELIVERABLE", :status_name => "UNDELIVERABLE_REJECTED_OPERATOR", :status_descr => "SMS. Subscriber not exists",
|
214
|
+
:error_id => 6, :error_grid => 1, :error_grname => "HANDSET_ERRORS", :error_name => "EC_UNKNOWN_SUBSCRIBER", :error_descr => "Subscriber not found.", :error_permanent => true
|
215
|
+
}, #SMS subscriber not exists
|
216
|
+
36131 => {:status_id => 4, :status_grid => 2, :status_grname => "UNDELIVERABLE", :status_name => "UNDELIVERABLE_REJECTED_OPERATOR", :status_descr => "SMS. Unknown subscriber",
|
217
|
+
:error_id => 6, :error_grid => 1, :error_grname => "HANDSET_ERRORS", :error_name => "EC_UNKNOWN_SUBSCRIBER", :error_descr => "Subscriber not found.", :error_permanent => true
|
218
|
+
}, #SMS unknown subscriber
|
219
|
+
36505 => {:status_id => 4, :status_grid => 2, :status_grname => "UNDELIVERABLE", :status_name => "UNDELIVERABLE_REJECTED_OPERATOR", :status_descr => "Viber. Subscriber not exists",
|
220
|
+
:error_id => 6, :error_grid => 1, :error_grname => "HANDSET_ERRORS", :error_name => "EC_UNKNOWN_SUBSCRIBER", :error_descr => "Subscriber not found.", :error_permanent => true
|
221
|
+
} #Viber subscriber not exists
|
222
|
+
}
|
223
|
+
|
224
|
+
if hub_report_in.key?("msg_status")
|
225
|
+
hub_report = hub_report_in
|
226
|
+
|
227
|
+
if data_for_status[hub_report["msg_status"]] != nil && data_for_status[hub_report["msg_status"]] != {} && data_for_status[hub_report["msg_status"]] != [] && data_for_status[hub_report["msg_status"]] != ""
|
228
|
+
|
229
|
+
report_to_recip.push({
|
230
|
+
|
231
|
+
"bulkId": "00000000-0000-0000-0000-000000000000",
|
232
|
+
"messageId": hub_report["report"]["message_id"],
|
233
|
+
"to": hub_report["report"]["number"],
|
234
|
+
# "sentAt": "2020-05-05T20:00:00.000+0000",
|
235
|
+
# "doneAt": "2020-05-05T20:00:00.000+0000",
|
236
|
+
"status": {
|
237
|
+
"groupId": data_for_status[hub_report["msg_status"]][:status_grid],
|
238
|
+
"groupName": data_for_status[hub_report["msg_status"]][:status_grname],
|
239
|
+
"id": data_for_status[hub_report["msg_status"]][:status_id],
|
240
|
+
"name": data_for_status[hub_report["msg_status"]][:status_name],
|
241
|
+
"description": data_for_status[hub_report["msg_status"]][:status_descr]
|
242
|
+
},
|
243
|
+
"error": {
|
244
|
+
"groupId": data_for_status[hub_report["msg_status"]][:error_grid],
|
245
|
+
"groupName": data_for_status[hub_report["msg_status"]][:error_grname],
|
246
|
+
"id": data_for_status[hub_report["msg_status"]][:error_id],
|
247
|
+
"name": data_for_status[hub_report["msg_status"]][:error_name],
|
248
|
+
"description": data_for_status[hub_report["msg_status"]][:error_descr],
|
249
|
+
"permanent": data_for_status[hub_report["msg_status"]][:error_permanent]
|
250
|
+
}
|
251
|
+
})
|
218
252
|
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
253
|
+
|
254
|
+
else
|
255
|
+
|
256
|
+
report_to_recip.push({
|
257
|
+
|
258
|
+
"bulkId": "00000000-0000-0000-0000-000000000000",
|
259
|
+
"messageId": hub_report["report"]["message_id"],
|
260
|
+
"to": hub_report["report"]["number"],
|
261
|
+
# "sentAt": "2020-05-05T20:00:00.000+0000",
|
262
|
+
# "doneAt": "2020-05-05T20:00:00.000+0000",
|
263
|
+
"status": {
|
264
|
+
"groupId": 2,
|
265
|
+
"groupName": "UNDELIVERABLE_NOT_DELIVERED",
|
266
|
+
"id": 9,
|
267
|
+
"name": "UNDELIVERED",
|
268
|
+
"description": "Unknown error"
|
269
|
+
},
|
270
|
+
"error": {
|
271
|
+
"groupId": 1,
|
272
|
+
"groupName": "HANDSET_ERRORS",
|
273
|
+
"id": 32,
|
274
|
+
"name": "EC_SM_DELIVERY_FAILURE",
|
275
|
+
"description": "Unknown error",
|
276
|
+
"permanent": false
|
277
|
+
}
|
278
|
+
})
|
279
|
+
|
280
|
+
end
|
247
281
|
|
248
282
|
else
|
249
283
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
284
|
+
hub_report_in["_json"].each {|hub_report2|
|
285
|
+
|
286
|
+
if data_for_status[hub_report["msg_status"]] != nil && data_for_status[hub_report["msg_status"]] != {} && data_for_status[hub_report["msg_status"]] != [] && data_for_status[hub_report["msg_status"]] != ""
|
287
|
+
report_to_recip.push({
|
288
|
+
|
289
|
+
"bulkId": "00000000-0000-0000-0000-000000000000",
|
290
|
+
"messageId": hub_report2["message_id"],
|
291
|
+
"to": hub_report2["number"],
|
292
|
+
# "sentAt": "2020-05-05T20:00:00.000+0000",
|
293
|
+
# "doneAt": "2020-05-05T20:00:00.000+0000",
|
294
|
+
"status": {
|
295
|
+
"groupId": data_for_status[hub_report2["msg_status"]][:status_grid],
|
296
|
+
"groupName": data_for_status[hub_report2["msg_status"]][:status_grname],
|
297
|
+
"id": data_for_status[hub_report2["msg_status"]][:status_id],
|
298
|
+
"name": data_for_status[hub_report2["msg_status"]][:status_name],
|
299
|
+
"description": data_for_status[hub_report2["msg_status"]][:status_descr]
|
300
|
+
},
|
301
|
+
"error": {
|
302
|
+
"groupId": data_for_status[hub_report2["msg_status"]][:error_grid],
|
303
|
+
"groupName": data_for_status[hub_report2["msg_status"]][:error_grname],
|
304
|
+
"id": data_for_status[hub_report2["msg_status"]][:error_id],
|
305
|
+
"name": data_for_status[hub_report2["msg_status"]][:error_name],
|
306
|
+
"description": data_for_status[hub_report2["msg_status"]][:error_descr],
|
307
|
+
"permanent": data_for_status[hub_report2["msg_status"]][:error_permanent]
|
308
|
+
}
|
309
|
+
})
|
310
|
+
|
311
|
+
|
312
|
+
else
|
313
|
+
report_to_recip.push({
|
314
|
+
|
315
|
+
"bulkId": "00000000-0000-0000-0000-000000000000",
|
316
|
+
"messageId": hub_report2["message_id"],
|
317
|
+
"to": hub_report2["number"],
|
318
|
+
# "sentAt": "2020-05-05T20:00:00.000+0000",
|
319
|
+
# "doneAt": "2020-05-05T20:00:00.000+0000",
|
320
|
+
"status": {
|
321
|
+
"groupId": 2,
|
322
|
+
"groupName": "UNDELIVERABLE_NOT_DELIVERED",
|
323
|
+
"id": 9,
|
324
|
+
"name": "UNDELIVERED",
|
325
|
+
"description": "Unknown error"
|
326
|
+
},
|
327
|
+
"error": {
|
328
|
+
"groupId": 1,
|
329
|
+
"groupName": "HANDSET_ERRORS",
|
330
|
+
"id": 32,
|
331
|
+
"name": "EC_SM_DELIVERY_FAILURE",
|
332
|
+
"description": "Unknown error",
|
333
|
+
"permanent": false
|
334
|
+
}
|
335
|
+
})
|
336
|
+
end
|
276
337
|
}
|
277
338
|
end
|
278
|
-
|
339
|
+
|
340
|
+
{:code => 200, :result => "Data processed", :body => {:report_to_recip => {"results": report_to_recip}}}
|
279
341
|
end
|
280
342
|
|
281
343
|
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'net/https'
|
2
|
+
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
require 'uri'
|
6
|
+
require 'net/http'
|
7
|
+
require 'rubygems'
|
8
|
+
require 'nokogiri'
|
9
|
+
require 'rails'
|
10
|
+
|
11
|
+
require 'imperituroard/projects/iot/internal_functions'
|
12
|
+
|
13
|
+
|
14
|
+
class Gms_2
|
15
|
+
|
16
|
+
attr_accessor :gms_login, :gms_password, :telegram_connector, :internal_func
|
17
|
+
|
18
|
+
def initialize(gms_login, gms_password, telegram_api_url, telegram_chat_id)
|
19
|
+
@gms_login = gms_login
|
20
|
+
@gms_password = gms_password
|
21
|
+
@internal_func = InternalFunc.new
|
22
|
+
@telegram_connector = Telegram_2.new(telegram_api_url, telegram_chat_id)
|
23
|
+
end
|
24
|
+
|
25
|
+
def get_advanced_by_external(external_id)
|
26
|
+
|
27
|
+
input_params = {:external_id => external_id}
|
28
|
+
output_params = {}
|
29
|
+
thr1_get_advanced_by_external = Thread.new do
|
30
|
+
begin
|
31
|
+
uri = URI("https://dr-v2.hyber.im/2160/api/dr/external/" + external_id + "/advanced")
|
32
|
+
https = Net::HTTP.new(uri.host, uri.port)
|
33
|
+
https.use_ssl = true
|
34
|
+
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
35
|
+
req = Net::HTTP::Get.new(uri.path, initheader = {:"Content-Type" => 'application/json'})
|
36
|
+
req.basic_auth gms_login, gms_password
|
37
|
+
req["Content-Type"] = "application/json"
|
38
|
+
res = https.request(req)
|
39
|
+
|
40
|
+
p res.code
|
41
|
+
p res.body
|
42
|
+
if res.code == "200"
|
43
|
+
output_params = {:code => 200,
|
44
|
+
:result => "Gms_2.get_advanced_by_external: Request processed",
|
45
|
+
:body => {:request_message => input_params,
|
46
|
+
:res_code => res.code,
|
47
|
+
:res_body => JSON.parse(res.body.to_s)}}
|
48
|
+
else
|
49
|
+
output_params = {:code => res.code.to_i,
|
50
|
+
:result => "Gms_2.get_advanced_by_external: Request processed",
|
51
|
+
:body => {:request_message => input_params,
|
52
|
+
:res_code => res.code,
|
53
|
+
:res_body => res.body.to_s}}
|
54
|
+
end
|
55
|
+
rescue
|
56
|
+
output_params = {:code => 500, :result => "Gms_2.get_advanced_by_external: Something wrong", :body => {:request_message => input_params}}
|
57
|
+
end
|
58
|
+
end
|
59
|
+
thr1_get_advanced_by_external.join
|
60
|
+
|
61
|
+
internal_func.printer_texter({:input => input_params, :output => output_params, :procedure => "Gms_2.get_advanced_by_external"}, "debug")
|
62
|
+
output_params
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
end
|
@@ -60,7 +60,7 @@ class Ukaz60All_2
|
|
60
60
|
else
|
61
61
|
forti_answer = {:code => update_fortigate_ansible[:code], :result => update_fortigate_ansible[:result]}
|
62
62
|
end
|
63
|
-
|
63
|
+
forti_connector.clean_tmp_folders
|
64
64
|
else
|
65
65
|
forti_answer = {:code => 401, :result => "Failed for uploading data to ansible server"}
|
66
66
|
end
|
@@ -85,6 +85,8 @@ class Ukaz60All_2
|
|
85
85
|
#compare data with belgim
|
86
86
|
answ = ukaz60_add_func.staros_compare_http(staros_blocks_current, get_belgim_data)
|
87
87
|
|
88
|
+
p answ
|
89
|
+
|
88
90
|
if answ[:code] == 200
|
89
91
|
#output_starprocess = {:code => 200, :result => "Staros processed", :data => {:block_me => answ[:body][:for_block][:notblocked_stat], :unblock_me =>answ[:body][:for_unblock][:for_unblock_stat]}}
|
90
92
|
output_starprocess = ukaz60_add_func.format_star_processed_answ(answ)[:body][:to_message]
|
@@ -110,7 +112,7 @@ class Ukaz60All_2
|
|
110
112
|
|
111
113
|
begin
|
112
114
|
get_belgim_data = belgim_connector.belgim_ukaz60_get
|
113
|
-
p get_belgim_data
|
115
|
+
#p get_belgim_data
|
114
116
|
|
115
117
|
if get_belgim_data[:code] == 200
|
116
118
|
|
@@ -55,7 +55,7 @@ class Belgim_2
|
|
55
55
|
curl_belgie_command = "curl -d \"name=#{belgim_login}&pass=#{belgim_password}\" -H \"Content-Type: application/x-www-form-urlencoded\" -X POST #{belgim_url} --insecure"
|
56
56
|
#return_from_belgim = `curl -d "name=#{belgim_login}&pass=#{belgim_password}" -H "Content-Type: application/x-www-form-urlencoded" -X POST #{belgim_url} --insecure`
|
57
57
|
return_from_belgim = `#{curl_belgie_command}`
|
58
|
-
p curl_belgie_command
|
58
|
+
#p curl_belgie_command
|
59
59
|
|
60
60
|
return_from_belgim = return_from_belgim.gsub!("\n", "")
|
61
61
|
|