Commit 92c9b5c1d631de3c2442afc88fdcdb8dfee41554
1 parent
ef9dfa7c
Exists in
master
and in
1 other branch
Remove Taskmapper
Unfuddle issue tracker was the only one using Taskmapper, Instead we can use a simple ActiveResource implementation for it
Showing
4 changed files
with
16 additions
and
16 deletions
Show diff stats
Gemfile
@@ -49,10 +49,6 @@ gem 'gitlab', :git => 'https://github.com/NARKOZ/gitlab.git' | @@ -49,10 +49,6 @@ gem 'gitlab', :git => 'https://github.com/NARKOZ/gitlab.git' | ||
49 | # Bitbucket Issues | 49 | # Bitbucket Issues |
50 | gem 'bitbucket_rest_api', :require => false | 50 | gem 'bitbucket_rest_api', :require => false |
51 | 51 | ||
52 | -# Unfuddle | ||
53 | -gem "taskmapper" | ||
54 | -gem "taskmapper-unfuddle" | ||
55 | - | ||
56 | # Jira | 52 | # Jira |
57 | gem 'jira-ruby', :require => 'jira' | 53 | gem 'jira-ruby', :require => 'jira' |
58 | 54 |
Gemfile.lock
@@ -331,13 +331,6 @@ GEM | @@ -331,13 +331,6 @@ GEM | ||
331 | actionpack (~> 3.0) | 331 | actionpack (~> 3.0) |
332 | activemodel (~> 3.0) | 332 | activemodel (~> 3.0) |
333 | railties (~> 3.0) | 333 | railties (~> 3.0) |
334 | - taskmapper (1.0.1) | ||
335 | - activeresource (~> 3.0) | ||
336 | - activesupport (~> 3.0) | ||
337 | - hashie (~> 2.0) | ||
338 | - taskmapper-unfuddle (0.8.0) | ||
339 | - addressable | ||
340 | - taskmapper | ||
341 | term-ansicolor (1.2.2) | 334 | term-ansicolor (1.2.2) |
342 | tins (~> 0.8) | 335 | tins (~> 0.8) |
343 | therubyracer (0.12.0) | 336 | therubyracer (0.12.0) |
@@ -433,8 +426,6 @@ DEPENDENCIES | @@ -433,8 +426,6 @@ DEPENDENCIES | ||
433 | ruby-fogbugz | 426 | ruby-fogbugz |
434 | rushover | 427 | rushover |
435 | strong_parameters | 428 | strong_parameters |
436 | - taskmapper | ||
437 | - taskmapper-unfuddle | ||
438 | therubyracer | 429 | therubyracer |
439 | timecop | 430 | timecop |
440 | turbo-sprockets-rails3 | 431 | turbo-sprockets-rails3 |
app/models/issue_trackers/unfuddle_tracker.rb
@@ -36,8 +36,8 @@ class IssueTrackers::UnfuddleTracker < IssueTracker | @@ -36,8 +36,8 @@ class IssueTrackers::UnfuddleTracker < IssueTracker | ||
36 | end | 36 | end |
37 | 37 | ||
38 | def create_issue(problem, reported_by = nil) | 38 | def create_issue(problem, reported_by = nil) |
39 | - unfuddle = TaskMapper.new(:unfuddle, :username => username, :password => password, :account => account) | ||
40 | 39 | ||
40 | + Unfuddle.config(account, username, password) | ||
41 | begin | 41 | begin |
42 | issue_options = {:project_id => project_id, | 42 | issue_options = {:project_id => project_id, |
43 | :summary => issue_title(problem), | 43 | :summary => issue_title(problem), |
@@ -48,9 +48,9 @@ class IssueTrackers::UnfuddleTracker < IssueTracker | @@ -48,9 +48,9 @@ class IssueTrackers::UnfuddleTracker < IssueTracker | ||
48 | 48 | ||
49 | issue_options[:milestone_id] = milestone_id if milestone_id.present? | 49 | issue_options[:milestone_id] = milestone_id if milestone_id.present? |
50 | 50 | ||
51 | - issue = unfuddle.project(project_id.to_i).ticket!(issue_options) | 51 | + issue = Unfuddle::Ticket.create(issue_options) |
52 | problem.update_attributes( | 52 | problem.update_attributes( |
53 | - :issue_link => File.join("#{url}/tickets/#{issue['id']}"), | 53 | + :issue_link => File.join("#{url}/tickets/#{issue.id}"), |
54 | :issue_type => Label | 54 | :issue_type => Label |
55 | ) | 55 | ) |
56 | rescue ActiveResource::UnauthorizedAccess | 56 | rescue ActiveResource::UnauthorizedAccess |
@@ -0,0 +1,13 @@ | @@ -0,0 +1,13 @@ | ||
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 |