lib/voipfone_client.rb in voipfone_client-0.2.1 vs lib/voipfone_client.rb in voipfone_client-0.3.0

- old
+ new

@@ -3,12 +3,13 @@ require 'require_all' require_rel 'voipfone_client' module VoipfoneClient BASE_URL = "https://www.voipfone.co.uk" - API_GET_URL = "https://www.voipfone.co.uk/api/srv" - API_POST_URL = "https://www.voipfone.co.uk/api/upd" + API_GET_URL = "#{BASE_URL}/api/srv" + API_POST_URL = "#{BASE_URL}/api/upd" + TMP_FOLDER = File.join(File.dirname(__FILE__),"..","/tmp") class << self attr_accessor :configuration end @@ -21,10 +22,13 @@ # A configuration class which contains the attributes we want to set in the module method class Configuration attr_accessor :username, :password, :user_agent_string + # Configuration initializer, to set up default configuration options def initialize - + + # By default we set the user agent string to "VoipfoneClient/[version] http://github.com/errorstudio/voipfone_client" + @user_agent_string = "VoipfoneClient/#{VoipfoneClient::VERSION} (http://github.com/errorstudio/voipfone_client)" end end end