Skip to content

Commit

Permalink
Rename ActiveCollab3 to ActiveCollab
Browse files Browse the repository at this point in the history
  • Loading branch information
kostajh committed Mar 10, 2014
1 parent dc18c30 commit 143f685
Showing 1 changed file with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from bugwarrior.config import die


class ActiveCollab3Client(object):
class ActiveCollabClient(object):
def __init__(self, url, key, user_id, projects):
self.url = url
self.key = key
Expand Down Expand Up @@ -90,7 +90,7 @@ def get_issue_generator(self, user_id, project_id, project_name):
yield subtask


class ActiveCollab3Issue(Issue):
class ActiveCollabIssue(Issue):
BODY = 'ac3body'
NAME = 'ac3name'
PERMALINK = 'ac3permalink'
Expand All @@ -104,39 +104,39 @@ class ActiveCollab3Issue(Issue):
UDAS = {
BODY: {
'type': 'string',
'label': 'ActiveCollab3 Body'
'label': 'ActiveCollab Body'
},
NAME: {
'type': 'string',
'label': 'ActiveCollab3 Name'
'label': 'ActiveCollab Name'
},
PERMALINK: {
'type': 'string',
'label': 'ActiveCollab3 Permalink'
'label': 'ActiveCollab Permalink'
},
TASK_ID: {
'type': 'string',
'label': 'ActiveCollab3 Task ID'
'label': 'ActiveCollab Task ID'
},
FOREIGN_ID: {
'type': 'string',
'label': 'ActiveCollab3 ID',
'label': 'ActiveCollab ID',
},
PROJECT_ID: {
'type': 'string',
'label': 'ActiveCollab3 Project ID'
'label': 'ActiveCollab Project ID'
},
TYPE: {
'type': 'string',
'label': 'ActiveCollab3 Task Type'
'label': 'ActiveCollab Task Type'
},
CREATED_ON: {
'type': 'date',
'label': 'ActiveCollab3 Created On'
'label': 'ActiveCollab Created On'
},
CREATED_BY_ID: {
'type': 'string',
'label': 'ActiveCollab3 Created By'
'label': 'ActiveCollab Created By'
},
}
UNIQUE_KEY = (PERMALINK, )
Expand Down Expand Up @@ -189,18 +189,18 @@ def get_default_description(self):
)


class ActiveCollab3Service(IssueService):
ISSUE_CLASS = ActiveCollab3Issue
CONFIG_PREFIX = 'activecollab3'
class ActiveCollabService(IssueService):
ISSUE_CLASS = ActiveCollabIssue
CONFIG_PREFIX = 'activecollab'

def __init__(self, *args, **kw):
super(ActiveCollab3Service, self).__init__(*args, **kw)
super(ActiveCollabService, self).__init__(*args, **kw)

self.url = self.config_get('url').rstrip('/')
self.key = self.config_get('key')
self.user_id = self.config_get('user_id')
self.projects = []
self.client = ActiveCollab3Client(
self.client = ActiveCollabClient(
self.url, self.key, self.user_id, self.projects
)

Expand All @@ -212,7 +212,7 @@ def __init__(self, *args, **kw):
@classmethod
def validate_config(cls, config, target):
for k in (
'activecollab3.url', 'activecollab3.key', 'activecollab3.user_id'
'activecollab.url', 'activecollab3.key', 'activecollab3.user_id'
):
if not config.has_option(target, k):
die("[%s] has no '%s'" % (target, k))
Expand Down

0 comments on commit 143f685

Please sign in to comment.