-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Used for communicating with Pivotal Tracker.
- Loading branch information
Showing
9 changed files
with
642 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'pivotal_tracker' | ||
|
||
module Pv | ||
class BugTracker | ||
def initialize with_username, and_password | ||
PivotalTracker::Client.use_ssl = true | ||
@token = PivotalTracker::Client.token(with_username, and_password) | ||
end | ||
|
||
def connected? | ||
@token != nil | ||
end | ||
|
||
def stories for_project_id, and_full_name | ||
project = PivotalTracker::Project.all.select { |p| p.id == for_project_id }.first | ||
project.stories.all(owned_by: and_full_name) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require 'spec_helper' | ||
require 'pv/bug_tracker' | ||
|
||
module Pv | ||
describe BugTracker do | ||
subject do | ||
VCR.use_cassette :pivotal_client_connection do | ||
Pv::BugTracker.new("john@doe.com", "password") | ||
end | ||
end | ||
|
||
it "connects to pivotal tracker" do | ||
subject.should be_connected | ||
end | ||
|
||
it "gathers the list of stories this user has to accomplish" do | ||
VCR.use_cassette :pivotal_project_stories_search do | ||
subject.stories(461255, "Tom Scott").should_not be_empty | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.