ticket_abstractor_client 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ticket_abstractor_client/jira_client.rb +20 -10
- data/lib/ticket_abstractor_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d4b100643edb6d3a0bcd8bd883bc5cfaa3d8413
|
4
|
+
data.tar.gz: aae575bb97a42a538e67dce8244b7842b3767f70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d8c6a07b15be73578c46378e63a265a0d76e1f0bccd3e44618d17865c1d124068e99129aa65d65e08eec79bccb0f5c0d835860f9ec98d84740baf8ba90ce915
|
7
|
+
data.tar.gz: 401ffcf66cebe83cfcdbd23967343c8717a426e05ea8353a96294fcd8fccf239b08e35ec05263796f88c9811864c65a9babdb065e26d026e3a9ac38d194b3cc6
|
@@ -5,6 +5,16 @@ class TicketAbstractorClient::JiraClient < TicketAbstractorClient::Client
|
|
5
5
|
@jira_endpoint = endpoint
|
6
6
|
end
|
7
7
|
|
8
|
+
def get_with_endpoint(url, args = {}, params = {})
|
9
|
+
params.merge! jira_endpoint: @jira_endpoint
|
10
|
+
get url, args, params
|
11
|
+
end
|
12
|
+
|
13
|
+
def post_with_endpoint(url, args = {}, params = {})
|
14
|
+
params.merge! jira_endpoint: @jira_endpoint
|
15
|
+
post url, args, params
|
16
|
+
end
|
17
|
+
|
8
18
|
##
|
9
19
|
# Get jira issue by issue id
|
10
20
|
#
|
@@ -16,7 +26,7 @@ class TicketAbstractorClient::JiraClient < TicketAbstractorClient::Client
|
|
16
26
|
# >> client.jira.get_issue 'IFS-123'
|
17
27
|
# => { 'id' => 'IFS-123', 'description' => '...', ... }
|
18
28
|
def get_issue(issue_key)
|
19
|
-
|
29
|
+
get_with_endpoint "ticket/jira/#{issue_key}"
|
20
30
|
end
|
21
31
|
|
22
32
|
##
|
@@ -34,15 +44,15 @@ class TicketAbstractorClient::JiraClient < TicketAbstractorClient::Client
|
|
34
44
|
end
|
35
45
|
|
36
46
|
def get_issues_by_query(query)
|
37
|
-
|
47
|
+
get_with_endpoint "jira_v1/get_issues_by_query", query: query
|
38
48
|
end
|
39
49
|
|
40
50
|
def get_users_by_query(query)
|
41
|
-
|
51
|
+
get_with_endpoint 'jira_v1/get_users_by_query', query: query
|
42
52
|
end
|
43
53
|
|
44
54
|
def get_issues_statuses_by_search_query(issues_id)
|
45
|
-
|
55
|
+
get_with_endpoint 'jira/get_issues_statuses_by_search_query', issues_id: issues_id
|
46
56
|
end
|
47
57
|
|
48
58
|
##
|
@@ -56,26 +66,26 @@ class TicketAbstractorClient::JiraClient < TicketAbstractorClient::Client
|
|
56
66
|
# >> client.jira.get_issues_by_filter 24320
|
57
67
|
# => [{ 'id' => 'ID-1', ... }, { 'id' => 'ID-2', ... }]
|
58
68
|
def get_issues_by_filter(filter_id)
|
59
|
-
|
69
|
+
get_with_endpoint 'jira/get_issues_by_filter', filter_id: filter_id
|
60
70
|
end
|
61
71
|
|
62
72
|
def get_fields_by_project(project_key)
|
63
|
-
|
73
|
+
get_with_endpoint 'jira/get_fields_by_project', project_key: project_key
|
64
74
|
end
|
65
75
|
|
66
76
|
def create_issue(opts = {}, *attachments)
|
67
|
-
|
77
|
+
post_with_endpoint('jira/create_issue', { opts: opts }, attachments: attachments)
|
68
78
|
end
|
69
79
|
|
70
80
|
def create_tvx_issue(opts = {})
|
71
|
-
|
81
|
+
post_with_endpoint 'ticket/jira', opts
|
72
82
|
end
|
73
83
|
|
74
84
|
def update_issue(opts = {}, *attachments)
|
75
|
-
|
85
|
+
post_with_endpoint('jira/update_issue', { opts: opts }, attachments: attachments)
|
76
86
|
end
|
77
87
|
|
78
88
|
def add_comment(issue_key, comment)
|
79
|
-
|
89
|
+
post_with_endpoint 'jira/add_comment', issue_key: issue_key, comment: comment
|
80
90
|
end
|
81
91
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ticket_abstractor_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rsamoilov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|