vimaly 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -3
- data/lib/vimaly/client.rb +10 -10
- data/lib/vimaly/exceptions.rb +3 -0
- data/lib/vimaly/version.rb +1 -1
- data/lib/vimaly.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9096c5aaa8c67a33674de730a6f59333237ab1de
|
4
|
+
data.tar.gz: 8b93b163163beb27266c42f7cf4f5f5d9229186c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aef40b111d7794708b3ad2fd96c6822faf1617e9ed965479a7afeccf16818f05452b36d8e2a0f8a22be9e2c717e4e961dfb146e0d52b78cfc0393bad41f8bfbb
|
7
|
+
data.tar.gz: 4606c1b59c0160dde277990657a6ca07efd05634e0fb81ef0230db556dfe48abb8b66ced8b7d6038d24b018b13cce96976e8825421720cb7bd89f40474a8d5c5
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
## 0.
|
3
|
+
## 0.2.2
|
4
4
|
|
5
|
-
*
|
5
|
+
* handle Bad Gateway 502 errors
|
6
|
+
|
7
|
+
## 0.2.1
|
8
|
+
|
9
|
+
* Fix creation of duplicated tickets (due to caching)
|
6
10
|
|
7
11
|
## 0.2.0
|
8
12
|
|
9
13
|
* Support the ability to retrieve all tickets for a bin, and to run a matcher through this
|
10
14
|
* Support custom fields on ticket
|
11
15
|
* Add an integration test (site configured)
|
12
|
-
|
data/lib/vimaly/client.rb
CHANGED
@@ -30,8 +30,8 @@ module Vimaly
|
|
30
30
|
ticket_to_json = ticket.to_json(custom_field_name_map)
|
31
31
|
response = post("/tickets/#{next_ticket_id}", ticket_to_json)
|
32
32
|
case response.status
|
33
|
-
|
34
|
-
|
33
|
+
when 200..299
|
34
|
+
true
|
35
35
|
else
|
36
36
|
log_warn "status: #{response.status}"
|
37
37
|
log_warn " #{response.inspect}"
|
@@ -40,16 +40,16 @@ module Vimaly
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def update_ticket(id, other_fields)
|
43
|
-
|
43
|
+
ticket = Ticket.new(other_fields)
|
44
44
|
|
45
45
|
response = put("/tickets/#{id}", ticket.to_json(custom_field_name_map, true))
|
46
46
|
case response.status
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
when 200..299
|
48
|
+
true
|
49
|
+
else
|
50
|
+
log_warn "status: #{response.status}"
|
51
|
+
log_warn " #{response.inspect}"
|
52
|
+
false
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -143,7 +143,7 @@ module Vimaly
|
|
143
143
|
request.headers.update({ accept: 'application/json', content_type: 'application/json' })
|
144
144
|
end
|
145
145
|
unless response.success?
|
146
|
-
raise("Vimaly #{api_path} call failed with response #{response.status}")
|
146
|
+
raise Vimaly::ConnectionError.new("Vimaly #{api_path} call failed with response #{response.status}")
|
147
147
|
end
|
148
148
|
JSON.parse(response.body)
|
149
149
|
end
|
data/lib/vimaly/version.rb
CHANGED
data/lib/vimaly.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vimaly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thorsten Boettger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- lib/vimaly.rb
|
157
157
|
- lib/vimaly/bin.rb
|
158
158
|
- lib/vimaly/client.rb
|
159
|
+
- lib/vimaly/exceptions.rb
|
159
160
|
- lib/vimaly/ticket.rb
|
160
161
|
- lib/vimaly/ticket_type.rb
|
161
162
|
- lib/vimaly/version.rb
|
@@ -180,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
181
|
version: '0'
|
181
182
|
requirements: []
|
182
183
|
rubyforge_project:
|
183
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.6.8
|
184
185
|
signing_key:
|
185
186
|
specification_version: 4
|
186
187
|
summary: Wrapper for the Vimaly API
|