ticket_abstractor_client 1.2.2 → 1.3.0
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/README.md +9 -0
- data/lib/ticket_abstractor_client/jira_client.rb +4 -3
- data/lib/ticket_abstractor_client/version.rb +1 -1
- data/lib/ticket_abstractor_client.rb +20 -16
- 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: b765739a76110bc790c601429b2b34d830cf643d
|
4
|
+
data.tar.gz: ce36d8e1015a6e9258dfb0017b5511d61a87ea33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f6362e139e61fe8002f4c58f53f5eeef59babc39be4b7b004138a1c6ca0b64e44a01ff083a76cdfc085d6f67daa5a5edfa0728d9350f6c2cfb5830c21921f4d
|
7
|
+
data.tar.gz: 425f5b584194801390f5beaf8de8b748421857de5c7407f87538210351890c376f8b6e34c1f2d21fbb622f261d79d2d8cf30cec29a34748955cd6aa3d79926eb
|
data/README.md
CHANGED
@@ -43,6 +43,15 @@ Access clients:
|
|
43
43
|
|
44
44
|
### Jira
|
45
45
|
|
46
|
+
Get list of Jira endpoints:
|
47
|
+
|
48
|
+
client.jira.endpoints #=> { 'endpoint_name_1' => 'http://www.jira-endpoint.com', 'endpoint_name_2' => '... }
|
49
|
+
|
50
|
+
Get access to specific Jira instance:
|
51
|
+
|
52
|
+
client.jira.get_issue ... #=> default Jira instance (T&P)
|
53
|
+
client.jira('endpoint_name_1').get_issue ... #=> Jira at 'http://www.jira-endpoint.com'
|
54
|
+
|
46
55
|
Grab issue:
|
47
56
|
|
48
57
|
client.jira.get_issue 'IFS-123'
|
@@ -73,10 +73,11 @@ class TicketAbstractorClient::JiraClient < TicketAbstractorClient::Client
|
|
73
73
|
# filter id in jira
|
74
74
|
#
|
75
75
|
# == Example:
|
76
|
-
#
|
76
|
+
# # get the list of first 50 issues by filter 24320
|
77
|
+
# >> client.jira.get_issues_by_filter 24320, 1, 50
|
77
78
|
# => [{ 'id' => 'ID-1', ... }, { 'id' => 'ID-2', ... }]
|
78
|
-
def get_issues_by_filter(filter_id)
|
79
|
-
get_with_endpoint 'jira/get_issues_by_filter', filter_id: filter_id
|
79
|
+
def get_issues_by_filter(filter_id, page = 0, per_page = 50)
|
80
|
+
get_with_endpoint 'jira/get_issues_by_filter', filter_id: filter_id, page: page, per_page: per_page
|
80
81
|
end
|
81
82
|
|
82
83
|
def get_fields_by_project(project_key)
|
@@ -1,26 +1,30 @@
|
|
1
1
|
module TicketAbstractorClient
|
2
2
|
def self.initialize_client(url, security_token = nil)
|
3
|
-
|
4
|
-
@security_token = security_token
|
5
|
-
@clients = {}
|
6
|
-
|
7
|
-
self
|
3
|
+
Base.new url, security_token
|
8
4
|
end
|
9
5
|
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
class Base
|
7
|
+
def initialize(url, security_token = nil)
|
8
|
+
@url = url
|
9
|
+
@security_token = security_token
|
10
|
+
@clients = {}
|
11
|
+
end
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
def jira(endpoint = 'tp')
|
14
|
+
@clients["jira_#{endpoint}".to_sym] ||= JiraClient.new(@url, @security_token, CGI.escape(endpoint.to_s))
|
15
|
+
end
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
def brouha
|
18
|
+
@clients[:brouha] ||= BrouhaClient.new(@url, @security_token)
|
19
|
+
end
|
20
|
+
|
21
|
+
def itrc
|
22
|
+
@clients[:itrc] ||= ItrcClient.new(@url, @security_token)
|
23
|
+
end
|
21
24
|
|
22
|
-
|
23
|
-
|
25
|
+
def ilogger
|
26
|
+
@clients[:ilogger] ||= ILoggerClient.new(@url, @security_token)
|
27
|
+
end
|
24
28
|
end
|
25
29
|
end
|
26
30
|
|
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.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rsamoilov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|