lib/smsc.rb in smsc-0.0.2 vs lib/smsc.rb in smsc-0.0.3

- old
+ new

@@ -1,5 +1,6 @@ +require 'digest/md5' require 'httparty' require "smsc/sender" require "smsc/version" @@ -7,15 +8,14 @@ class Sms attr_reader :login, :password, :charset def initialize(login, password, charset = 'utf-8') @login = login - @password = password + @password = Digest::MD5.hexdigest(password.to_s) @charset = charset end def message(message, phones) - message = message phones = phones.join(",") Smsc::Sender.post('https://smsc.ru/sys/send.php', :query => { :login => login, :psw => password, :phones => phones, :mes => message, :charset => charset }) end end end