lib/smess/outputs/global_mouth.rb in smess-1.0.10 vs lib/smess/outputs/global_mouth.rb in smess-2.0

- old
+ new

@@ -8,21 +8,20 @@ generate_mac_hash request.url = "#{url}?#{params.to_query}" http_get request end - private - - def username - ENV["SMESS_GLOBAL_MOUTH_USER"].dup # paranoid safeguard + attr_accessor :username, :password, :sender_id + def validate_config + @username = config.fetch(:username) + @password = config.fetch(:password) + @sender_id = config.fetch(:sender_id) end - def password - ENV["SMESS_GLOBAL_MOUTH_PASS"] - end + private - def sender_id - ENV["SMESS_GLOBAL_MOUTH_SENDER_ID"] + def username + @username.dup # paranoid safeguard end def url "https://mcm.globalmouth.com:8443/api/mcm" end \ No newline at end of file