Sha256: 5b9597a4ffa8e4212086be0b4c220d2ca0d80e5a9bf9232858253752cbc09172
Contents?: true
Size: 1003 Bytes
Versions: 9
Compression:
Stored size: 1003 Bytes
Contents
require 'rubygems' require 'active_resource' module RedmineApi class Client < ActiveResource::Base; end class Issue < RedmineApi::Client; end class Users < RedmineApi::Client; end end module Stagecoach class Redmine class << self def users RedmineApi::Users.find(:all, :params => {:nometa => 1}) end def issue(issue_number) return RedmineApi::Issue.find(issue_number) end 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 # Open the issue in a browser. 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 end end end
Version data entries
9 entries across 9 versions & 1 rubygems