Module: TaskMapper::Provider::Rally
- Includes:
- Base
- Defined in:
- lib/provider/rally.rb,
lib/provider/project.rb,
lib/provider/comment.rb,
lib/provider/ticket.rb
Overview
This is the Rally Provider for taskmapper
Defined Under Namespace
Classes: Comment, Project, Ticket
Class Method Summary collapse
-
.new(auth = {}) ⇒ Object
This is for cases when you want to instantiate using TaskMapper::Provider::Rally.new(auth).
- .rally ⇒ Object
- .rally=(rally_instance) ⇒ Object
Instance Method Summary collapse
-
#authorize(auth = {}) ⇒ Object
Providers must define an authorize method.
-
#valid? ⇒ Boolean
declare needed overloaded methods here.
Class Method Details
.new(auth = {}) ⇒ Object
This is for cases when you want to instantiate using TaskMapper::Provider::Rally.new(auth)
7 8 9 |
# File 'lib/provider/rally.rb', line 7 def self.new(auth = {}) TaskMapper.new(:rally, auth) end |
.rally ⇒ Object
40 41 42 |
# File 'lib/provider/rally.rb', line 40 def self.rally @rally end |
.rally=(rally_instance) ⇒ Object
36 37 38 |
# File 'lib/provider/rally.rb', line 36 def self.rally=(rally_instance) @rally = rally_instance end |
Instance Method Details
#authorize(auth = {}) ⇒ Object
Providers must define an authorize method. This is used to initialize and set authentication parameters to access the API
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/provider/rally.rb', line 13 def (auth = {}) @authentication ||= TaskMapper::Authenticator.new(auth) auth = @authentication if ((auth.url.nil? || auth.url.empty?) and (auth.username.nil? || auth.username.empty?) and (auth.password.nil? || auth.password.empty?)) raise "Please you should provide a Rally url, username and password" end TaskMapper::Provider::Rally.rally = RallyRestAPI.new(:username => auth.username, :password => auth.password, :base_url => auth.url) end |
#valid? ⇒ Boolean
declare needed overloaded methods here
27 28 29 30 31 32 33 34 |
# File 'lib/provider/rally.rb', line 27 def valid? begin TaskMapper::Provider::Rally.rally.find_all(:project).first true rescue false end end |