Commit ccadc6a2ed5f737a9c1e8320afcc6594aac9f394
1 parent
1b2db458
Exists in
master
and in
1 other branch
add unfuddle issue tracker as a gem
Showing
6 changed files
with
4 additions
and
41 deletions
Show diff stats
Gemfile
Gemfile.lock
| ... | ... | @@ -123,6 +123,8 @@ GEM |
| 123 | 123 | errbit_redmine_plugin (0.2.0) |
| 124 | 124 | errbit_plugin (~> 0) |
| 125 | 125 | oruen_redmine_client (~> 0) |
| 126 | + errbit_unfuddle_plugin (0.1.0) | |
| 127 | + errbit_plugin (~> 0.4, >= 0.4.0) | |
| 126 | 128 | erubis (2.7.0) |
| 127 | 129 | execjs (2.0.2) |
| 128 | 130 | fabrication (2.9.0) |
| ... | ... | @@ -414,6 +416,7 @@ DEPENDENCIES |
| 414 | 416 | errbit_pivotal_plugin |
| 415 | 417 | errbit_plugin |
| 416 | 418 | errbit_redmine_plugin |
| 419 | + errbit_unfuddle_plugin | |
| 417 | 420 | execjs |
| 418 | 421 | fabrication |
| 419 | 422 | flowdock | ... | ... |
config/initializers/issue_trackers.rb
| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | -# Require all issue tracker apis in lib/issue_tracker_apis | |
| 2 | -Dir.glob(Rails.root.join('lib/issue_trackers/apis/*.rb')).each {|t| require t } | |
| 3 | -# Require issue tracker error classes | |
| 4 | -require Rails.root.join('lib/issue_trackers/errors') | |
| 5 | - | |
| 6 | -# Include nested issue tracker models | |
| 7 | -include IssueTrackers |
lib/issue_trackers/apis/mingle.rb
| ... | ... | @@ -1,17 +0,0 @@ |
| 1 | -require 'active_resource' | |
| 2 | - | |
| 3 | -module Mingle | |
| 4 | - class Card < ActiveResource::Base | |
| 5 | - # site template ~> "https://username:password@mingle.example.com/api/v1/projects/:project_id/" | |
| 6 | - self.format = :xml | |
| 7 | - end | |
| 8 | - def self.set_site(site) | |
| 9 | - # ActiveResource seems to clone and freeze the @site variable | |
| 10 | - # after the first use. It seems that the only way to change @site | |
| 11 | - # is to drop the subclass, and then reload it. | |
| 12 | - Mingle.send(:remove_const, :Card) | |
| 13 | - load File.join(Rails.root,'lib','issue_trackers', 'apis','mingle.rb') | |
| 14 | - Mingle::Card.site = site | |
| 15 | - end | |
| 16 | -end | |
| 17 | - |
lib/issue_trackers/apis/unfuddle.rb
| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | -require 'active_resource' | |
| 2 | - | |
| 3 | -module Unfuddle | |
| 4 | - class Ticket < ActiveResource::Base | |
| 5 | - self.format = :xml | |
| 6 | - end | |
| 7 | - | |
| 8 | - def self.config(account, username, password) | |
| 9 | - Unfuddle::Ticket.site = "https://#{account}.unfuddle.com/api/v1/projects/:project_id" | |
| 10 | - Unfuddle::Ticket.user = username | |
| 11 | - Unfuddle::Ticket.password = password | |
| 12 | - end | |
| 13 | -end |
lib/issue_trackers/errors.rb