ticket_abstractor_client 1.12.0 → 1.13.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d0dbd0ba83af9e4ed48a13a8a824cb7cf14d816
|
4
|
+
data.tar.gz: 63f0f970905787372ebd2939198cb17adac1f39c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f55806671a930c5031bfe12b766e5cbfdb1566f5379a4839b9b3d8d4c2bdeb5fbc00aab66add0505cc9c06430e8dfb2296c9277284f57930bc312b90186b3813
|
7
|
+
data.tar.gz: 856c2c09de70bc4eec5fbebf703c014ded56a74627539af15da406720c00662c785f5e0bceae08bd0e032e98e153ccb4ae995a51046b27597f40603999b89fea
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class TicketAbstractorClient::Client
|
2
2
|
def initialize(base_url, security_token = nil)
|
3
|
-
@base_url =
|
3
|
+
@base_url = base_url
|
4
4
|
@security_token = security_token
|
5
5
|
end
|
6
6
|
|
@@ -8,7 +8,11 @@ class TicketAbstractorClient::Client
|
|
8
8
|
params.merge! args: args.to_json, security_token: @security_token
|
9
9
|
response = RestClient.get("#{@base_url}/#{url}", params: params)
|
10
10
|
|
11
|
-
|
11
|
+
if response.headers[:file_request]
|
12
|
+
response
|
13
|
+
else
|
14
|
+
JSON.parse response
|
15
|
+
end
|
12
16
|
end
|
13
17
|
|
14
18
|
def post(url, args = {}, params = {})
|
@@ -17,10 +21,4 @@ class TicketAbstractorClient::Client
|
|
17
21
|
|
18
22
|
JSON.parse response
|
19
23
|
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def resolve_host(host)
|
24
|
-
EM::Synchrony.sync(EM::DNS::Resolver.resolve(host)).first
|
25
|
-
end
|
26
24
|
end
|
@@ -108,6 +108,13 @@ class TicketAbstractorClient::JiraClient < TicketAbstractorClient::Client
|
|
108
108
|
get_with_endpoint 'jira/get_all_fields'
|
109
109
|
end
|
110
110
|
|
111
|
+
def download_attachment(attachment_id, attachment_name)
|
112
|
+
get_with_endpoint(
|
113
|
+
'jira/download_attachment',
|
114
|
+
{ attachment_id: attachment_id, attachment_name: attachment_name }
|
115
|
+
)
|
116
|
+
end
|
117
|
+
|
111
118
|
def create_issue(opts = {}, *attachments)
|
112
119
|
post_with_endpoint 'jira/create_issue', { opts: opts }, attachments: attachments
|
113
120
|
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.
|
4
|
+
version: 1.13.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-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|