Commit 83ade4a0339c24f9fc75826855c58d924051281f
Exists in
master
and in
1 other branch
Merge pull request #592 from arthurnn/remove_taskmapper
Remove Taskmapper
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 | 49 | # Bitbucket Issues |
| 50 | 50 | gem 'bitbucket_rest_api', :require => false |
| 51 | 51 | |
| 52 | -# Unfuddle | |
| 53 | -gem "taskmapper" | |
| 54 | -gem "taskmapper-unfuddle" | |
| 55 | - | |
| 56 | 52 | # Jira |
| 57 | 53 | gem 'jira-ruby', :require => 'jira' |
| 58 | 54 | ... | ... |
Gemfile.lock
| ... | ... | @@ -331,13 +331,6 @@ GEM |
| 331 | 331 | actionpack (~> 3.0) |
| 332 | 332 | activemodel (~> 3.0) |
| 333 | 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 | 334 | term-ansicolor (1.2.2) |
| 342 | 335 | tins (~> 0.8) |
| 343 | 336 | therubyracer (0.12.0) |
| ... | ... | @@ -433,8 +426,6 @@ DEPENDENCIES |
| 433 | 426 | ruby-fogbugz |
| 434 | 427 | rushover |
| 435 | 428 | strong_parameters |
| 436 | - taskmapper | |
| 437 | - taskmapper-unfuddle | |
| 438 | 429 | therubyracer |
| 439 | 430 | timecop |
| 440 | 431 | turbo-sprockets-rails3 | ... | ... |
app/models/issue_trackers/unfuddle_tracker.rb
| ... | ... | @@ -36,8 +36,8 @@ class IssueTrackers::UnfuddleTracker < IssueTracker |
| 36 | 36 | end |
| 37 | 37 | |
| 38 | 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 | 41 | begin |
| 42 | 42 | issue_options = {:project_id => project_id, |
| 43 | 43 | :summary => issue_title(problem), |
| ... | ... | @@ -48,9 +48,9 @@ class IssueTrackers::UnfuddleTracker < IssueTracker |
| 48 | 48 | |
| 49 | 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 | 52 | problem.update_attributes( |
| 53 | - :issue_link => File.join("#{url}/tickets/#{issue['id']}"), | |
| 53 | + :issue_link => File.join("#{url}/tickets/#{issue.id}"), | |
| 54 | 54 | :issue_type => Label |
| 55 | 55 | ) |
| 56 | 56 | rescue ActiveResource::UnauthorizedAccess | ... | ... |
| ... | ... | @@ -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 | ... | ... |