vimaly 1.0.2 → 1.1.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/.ruby-version +1 -1
- data/CHANGELOG.md +4 -0
- data/lib/vimaly/client.rb +9 -1
- data/lib/vimaly/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42d7553c8960f23093c3fd2deafc378f7970fc0b62d35ceafc94b42a0473c970
|
|
4
|
+
data.tar.gz: a8ddca4b4d5421ad916b69d11e9d69e1fb48fe0b1bdca933ff70162a56d170f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0dd8df6c3e2fe09a36ff2be2f48ed21a2d8a7338cf69e4c17b407c5a51af0828bb5ec1c072bc1886a853b6fa8e4c551e3fa708b9f11cc6c60a984e90bcf2dd98
|
|
7
|
+
data.tar.gz: a593b96cd95a00e11712080109af2d9e35668ee2cdaeafc833f8703eb8647a374ded79ff97413c9af9b286d7b7df0fa4e2111ca6897a4d0a3cd4fb6a7b0219f0
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.6.
|
|
1
|
+
2.6.5
|
data/CHANGELOG.md
CHANGED
data/lib/vimaly/client.rb
CHANGED
|
@@ -54,6 +54,15 @@ module Vimaly
|
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
def search_tickets(query_string, state: 'active')
|
|
58
|
+
ticket_type_map = Hash[ticket_types.map { |t| [t.id, t] }]
|
|
59
|
+
bin_map = Hash[bins.map { |b| [b.id, b] }]
|
|
60
|
+
|
|
61
|
+
get("/ticket-search?text=#{query_string}&state=#{state}").map do |ticket_data|
|
|
62
|
+
Ticket.from_vimaly(ticket_data, ticket_type_map, bin_map, custom_fields)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
57
66
|
def add_attachment(ticket_id, file_name, file_content, request_options={})
|
|
58
67
|
response = post("/tickets/#{ticket_id}/attachments?name=#{CGI.escape(file_name)}", file_content, request_options)
|
|
59
68
|
case response.status
|
|
@@ -113,7 +122,6 @@ module Vimaly
|
|
|
113
122
|
get("/tickets?bin_id=#{bin_id}").map do |ticket_data|
|
|
114
123
|
Ticket.from_vimaly(ticket_data, ticket_type_map, bin_map, custom_fields)
|
|
115
124
|
end
|
|
116
|
-
|
|
117
125
|
end
|
|
118
126
|
|
|
119
127
|
def matching_tickets_in_named_bin(bin_name, title_matcher)
|
data/lib/vimaly/version.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: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thorsten Boettger
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-03-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -166,7 +166,7 @@ homepage: https://github.com/sharesight/vimaly
|
|
|
166
166
|
licenses:
|
|
167
167
|
- MIT
|
|
168
168
|
metadata: {}
|
|
169
|
-
post_install_message:
|
|
169
|
+
post_install_message:
|
|
170
170
|
rdoc_options: []
|
|
171
171
|
require_paths:
|
|
172
172
|
- lib
|
|
@@ -181,8 +181,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
181
181
|
- !ruby/object:Gem::Version
|
|
182
182
|
version: '0'
|
|
183
183
|
requirements: []
|
|
184
|
-
rubygems_version: 3.0.
|
|
185
|
-
signing_key:
|
|
184
|
+
rubygems_version: 3.0.6
|
|
185
|
+
signing_key:
|
|
186
186
|
specification_version: 4
|
|
187
187
|
summary: Wrapper for the Vimaly API
|
|
188
188
|
test_files: []
|