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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ba6b4da8f925b2016b70a6e6d89a2645daedf80
4
- data.tar.gz: b0416dae0eb8183f2528f6b539558a586228ae1c
3
+ metadata.gz: b765739a76110bc790c601429b2b34d830cf643d
4
+ data.tar.gz: ce36d8e1015a6e9258dfb0017b5511d61a87ea33
5
5
  SHA512:
6
- metadata.gz: 33f1b7c3b7393913966b1343b3243ef75532178a694d7afa57ccebe966c1983ea6b9f4205fb5500ac72a2f653177aaf851e77fac943441a3d4c1c9de9a8f3e1a
7
- data.tar.gz: cfd00897290753bd5b6bfa059248c1bf8b4a7fbb03322d3284b9a20e8664c106855886052690b1ae2b72ab52beac669b51939c8d700225963b73322de9d3bd29
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
- # >> client.jira.get_issues_by_filter 24320
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,3 +1,3 @@
1
1
  module TicketAbstractorClient
2
- VERSION = '1.2.2'
2
+ VERSION = '1.3.0'
3
3
  end
@@ -1,26 +1,30 @@
1
1
  module TicketAbstractorClient
2
2
  def self.initialize_client(url, security_token = nil)
3
- @url = url
4
- @security_token = security_token
5
- @clients = {}
6
-
7
- self
3
+ Base.new url, security_token
8
4
  end
9
5
 
10
- def self.jira(endpoint = 'tp')
11
- @clients["jira_#{endpoint}".to_sym] ||= JiraClient.new(@url, @security_token, CGI.escape(endpoint.to_s))
12
- end
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
- def self.brouha
15
- @clients[:brouha] ||= BrouhaClient.new(@url, @security_token)
16
- end
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
- def self.itrc
19
- @clients[:itrc] ||= ItrcClient.new(@url, @security_token)
20
- end
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
- def self.ilogger
23
- @clients[:ilogger] ||= ILoggerClient.new(@url, @security_token)
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.2.2
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-07-25 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler