Class: Stagecoach::Redmine
- Inherits:
-
Object
- Object
- Stagecoach::Redmine
- Defined in:
- lib/stagecoach/redmine.rb
Class Method Summary collapse
- .issue(issue_number) ⇒ Object
- .issue_url(issue) ⇒ Object
- .users ⇒ Object
-
.view_issue(issue) ⇒ Object
Open the issue in a browser.
Class Method Details
.issue(issue_number) ⇒ Object
18 19 20 |
# File 'lib/stagecoach/redmine.rb', line 18 def issue(issue_number) return RedmineApi::Issue.find(issue_number) end |
.issue_url(issue) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/stagecoach/redmine.rb', line 22 def issue_url(issue) # originally this was: # # RedmineApi::Client.site + "/issues/" + issue.id # # but this caused URI merge errors on some setups. "#{RedmineApi::Client.site}issues/#{issue.id}" end |
.users ⇒ Object
14 15 16 |
# File 'lib/stagecoach/redmine.rb', line 14 def users RedmineApi::Users.find(:all, :params => {:nometa => 1}) end |
.view_issue(issue) ⇒ Object
Open the issue in a browser.
32 33 34 35 36 37 |
# File 'lib/stagecoach/redmine.rb', line 32 def view_issue(issue) issue_url = Redmine.issue_url(issue) print "Open issue in browser? [Y]es or anything else to exit: " `open #{issue_url.to_s}` if gets.chomp == "Y" puts "Staging completed! Exiting..." end |