Class: JiraClient::Configuration
- Inherits:
-
Object
- Object
- JiraClient::Configuration
- Defined in:
- lib/jira_client/configuration.rb
Instance Attribute Summary collapse
-
#api_path ⇒ Object
Returns the value of attribute api_path.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#certificate ⇒ Object
Returns the value of attribute certificate.
-
#certificate_passphrase ⇒ Object
Returns the value of attribute certificate_passphrase.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #full_url ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/jira_client/configuration.rb', line 5 def initialize @base_url = nil @port = nil @proxy = nil @api_path = "/rest/api/2" @username = nil @password = nil @certificate = nil @certificate_passphrase = nil end |
Instance Attribute Details
#api_path ⇒ Object
Returns the value of attribute api_path.
3 4 5 |
# File 'lib/jira_client/configuration.rb', line 3 def api_path @api_path end |
#base_url ⇒ Object
Returns the value of attribute base_url.
3 4 5 |
# File 'lib/jira_client/configuration.rb', line 3 def base_url @base_url end |
#certificate ⇒ Object
Returns the value of attribute certificate.
3 4 5 |
# File 'lib/jira_client/configuration.rb', line 3 def certificate @certificate end |
#certificate_passphrase ⇒ Object
Returns the value of attribute certificate_passphrase.
3 4 5 |
# File 'lib/jira_client/configuration.rb', line 3 def certificate_passphrase @certificate_passphrase end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/jira_client/configuration.rb', line 3 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
3 4 5 |
# File 'lib/jira_client/configuration.rb', line 3 def port @port end |
#proxy ⇒ Object
Returns the value of attribute proxy.
3 4 5 |
# File 'lib/jira_client/configuration.rb', line 3 def proxy @proxy end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/jira_client/configuration.rb', line 3 def username @username end |
Instance Method Details
#full_url ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/jira_client/configuration.rb', line 16 def full_url if @base_url.nil? or @api_path.nil? raise JiraClient::Error::ConfigurationError, "Invalid configuration. Run JiraClient.configure." end result = @base_url.gsub(/\/\z/, '') result += ":#{@port}" unless @port.nil? result += @api_path result end |