Module: LeanKitKanban::Config
- Defined in:
- lib/leankitkanban/config.rb
Defined Under Namespace
Classes: NoAccount, NoCredentials
Constant Summary collapse
- LKK_DOMAIN =
"leankitkanban.com"
- API_SUFFIX =
"/Kanban/API"
Class Attribute Summary collapse
-
.account ⇒ Object
Returns the value of attribute account.
-
.email ⇒ Object
Returns the value of attribute email.
-
.password ⇒ Object
Returns the value of attribute password.
Class Method Summary collapse
Class Attribute Details
permalink .account ⇒ Object
Returns the value of attribute account.
7 8 9 |
# File 'lib/leankitkanban/config.rb', line 7 def account @account end |
permalink .email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'lib/leankitkanban/config.rb', line 7 def email @email end |
permalink .password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'lib/leankitkanban/config.rb', line 7 def password @password end |
Class Method Details
permalink .basic_auth_hash ⇒ Object
[View source]
22 23 24 25 |
# File 'lib/leankitkanban/config.rb', line 22 def basic_auth_hash validate {:basic_auth => {:username => email, :password => password}} end |
permalink .uri ⇒ Object
[View source]
17 18 19 20 |
# File 'lib/leankitkanban/config.rb', line 17 def uri validate "http://#{account}.#{LKK_DOMAIN}#{API_SUFFIX}" end |
permalink .validate ⇒ Object
12 13 14 15 |
# File 'lib/leankitkanban/config.rb', line 12 def validate raise NoCredentials if email.nil? || password.nil? raise NoAccount if account.nil? end |