imperituroard 0.3.9 → 0.4.0

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
  SHA1:
3
- metadata.gz: 541de7d03bfd56a1dcb6d5bcdc4b5be30984ab52
4
- data.tar.gz: cea1b867c6a8c5692bbcaceaed72c00be1b5a448
3
+ metadata.gz: c7eb357022815af9e5557c552c527afd05085598
4
+ data.tar.gz: 11e918ff4c33d5ccb533cde41ef9dc33aaec0b83
5
5
  SHA512:
6
- metadata.gz: 5da3dac0cd2ea28ac338b7d9d6931988f00f58d871a39cfba3c81544928da902984723241d4d4b1cb9ec881775f0120145386cf8ad7f4d83428494d2d3da9bdc
7
- data.tar.gz: 3f50dd6c0252afd409be4081c225fbacf5d8ee37c8a5528bfb8f30f143ed40753fa349b9f78f0e17c8b82223d4ec59a1296de2091ad792ad04139dfb9233c1b4
6
+ metadata.gz: 18d971089a904d1cb2fc40d7c702c9cb293f39562119f98dbc3726151fe72ab372fd69c5142d90124e7377d2524061c3047b0d9ba9b2ce58fb4a615ceade659f
7
+ data.tar.gz: 4d825c9af6d2d884840dd609abe8e47f9948e698f3ff5f691afce088a773fd5a713f6740e966a9cb1febfdb776726e604b67bd1573750d97c773af8707b690bf
data/lib/imperituroard.rb CHANGED
@@ -800,9 +800,9 @@ end
800
800
 
801
801
  class Mhub_2
802
802
 
803
- attr_accessor :sk_url, :sk_login, :sk_password, :mhub_connector, :internal_func, :dabrab_connecter
803
+ attr_accessor :sk_url, :sk_login, :sk_password, :mhub_connector, :internal_func, :dabrab_connecter, :static_callback
804
804
 
805
- def initialize(sk_url_simple, sk_login, sk_password, telegram_api_url, telegram_chat_id, sk_url_broadcast)
805
+ def initialize(sk_url_simple, sk_login, sk_password, telegram_api_url, telegram_chat_id, sk_url_broadcast, static_callback)
806
806
  @sk_url = sk_url_simple
807
807
  @sk_login = sk_login
808
808
  @sk_password = sk_password
@@ -811,6 +811,7 @@ class Mhub_2
811
811
  @internal_func = InternalFunc.new
812
812
  @dabrab_connecter = Dabrab.new
813
813
  @add_functions_connector = AdditionalFunc.new(telegram_api_url, telegram_chat_id)
814
+ @static_callback = static_callback
814
815
  end
815
816
 
816
817
 
@@ -870,6 +871,8 @@ class Mhub_2
870
871
  elsif !null_statement.include?(params["viber"]) && null_statement.include?(params["sms"])
871
872
  hub_resp = mhub_connector.sk_send_viber_list(msisdn2, params["notifyUrl"], params["viber"]["text"])
872
873
  elsif !null_statement.include?(params["viber"]) && !null_statement.include?(params["sms"])
874
+ p "vibersms"
875
+ p msisdn2
873
876
  hub_resp = mhub_connector.sk_send_viber_sms_list(msisdn2, params["notifyUrl"], params["sms"]["text"], params["viber"]["text"], "TEST")
874
877
  else
875
878
  output_params = {"code": 502, "result": "Invalid input data st2", "body": {"answer": {}, "sender": {"ip_src": ip_src, "ip_real": ip_real, "ip_vip": ip_vip}}}
@@ -282,16 +282,19 @@ class Sksk_1
282
282
  end
283
283
 
284
284
 
285
- def sk_send_viber_sms_list(msisdn_list, callback_url, text, alphaname)
285
+ def sk_send_viber_sms_list(msisdn_list, callback_url, sms_text, viber_text, alphaname)
286
+ p "stat"
286
287
 
287
- input_params = {:msisdn_list => msisdn_list, :callback_url => callback_url, :text => text, :alphaname => alphaname}
288
+ input_params = {:msisdn_list => msisdn_list, :callback_url => callback_url, :sms_text => sms_text, :viber_text => viber_text, :alphaname => alphaname}
288
289
  output_params = {}
289
290
  request_message = {}
290
291
 
291
292
  begin
293
+ p "hhhh"
292
294
  uri = URI(sk_url_broadcast)
293
295
  #8 - client id
294
296
 
297
+
295
298
  https = Net::HTTP.new(uri.host, uri.port)
296
299
  https.use_ssl = true
297
300
  https.verify_mode = OpenSSL::SSL::VERIFY_NONE
@@ -311,11 +314,11 @@ class Sksk_1
311
314
  "channel_options": {
312
315
  "sms": {
313
316
  "alpha_name": alphaname,
314
- "text": text,
317
+ "text": sms_text,
315
318
  "ttl": 60
316
319
  },
317
320
  "viber": {
318
- "text": text,
321
+ "text": viber_text,
319
322
  "ttl": 60
320
323
  }
321
324
  }
@@ -1,3 +1,3 @@
1
1
  module Imperituroard
2
- VERSION = "0.3.9"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imperituroard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dzmitry Buynovskiy