bugsink-cli 0.1.1 → 0.1.2
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/lib/bugsink/cli.rb +35 -10
- data/lib/bugsink/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 332213d0fe5dd0cffa80562ed080efcf15df8efb3a33d9efd6916bd5f3b86558
|
|
4
|
+
data.tar.gz: 752a775192b2bf8d719a1ac18b4916a8f619159b1dda6df6702a7e27adc8302a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8be23b51ee505b803159e7aae993b91f091c21124980202f4a2e833f485b5faa3201ff41a7d3d74b499be1ddd7ef09de06c1a986238cf61a872869bae7a3bf1e
|
|
7
|
+
data.tar.gz: 5fcc6bcf7b826c2779879c4f9634393934d803c85951d9671e04d466aadbc31b35acab7bf800673135815d7977d92a6ed156cf3f40a42c4ff95cadc71e889724
|
data/lib/bugsink/cli.rb
CHANGED
|
@@ -91,8 +91,11 @@ module Bugsink
|
|
|
91
91
|
output_list(response.data, format: @options[:format])
|
|
92
92
|
when 'get'
|
|
93
93
|
uuid = args[0]
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
unless uuid
|
|
95
|
+
error('Team UUID required')
|
|
96
|
+
exit 1
|
|
97
|
+
end
|
|
98
|
+
parse_format_options!(args[1..] || [])
|
|
96
99
|
team = @client.team_get(uuid)
|
|
97
100
|
output_single(team, format: @options[:format])
|
|
98
101
|
when 'create'
|
|
@@ -128,8 +131,11 @@ module Bugsink
|
|
|
128
131
|
output_list(response.data, format: @options[:format])
|
|
129
132
|
when 'get'
|
|
130
133
|
id = args[0]
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
unless id
|
|
135
|
+
error('Project ID required')
|
|
136
|
+
exit 1
|
|
137
|
+
end
|
|
138
|
+
parse_format_options!(args[1..] || [])
|
|
133
139
|
project = @client.project_get(id.to_i)
|
|
134
140
|
output_single(project, format: @options[:format])
|
|
135
141
|
when 'create'
|
|
@@ -178,8 +184,11 @@ module Bugsink
|
|
|
178
184
|
output_list(response.data, format: @options[:format])
|
|
179
185
|
when 'get'
|
|
180
186
|
uuid = args[0]
|
|
181
|
-
|
|
182
|
-
|
|
187
|
+
unless uuid
|
|
188
|
+
error('Issue UUID required')
|
|
189
|
+
exit 1
|
|
190
|
+
end
|
|
191
|
+
parse_format_options!(args[1..] || [])
|
|
183
192
|
issue = @client.issue_get(uuid)
|
|
184
193
|
output_single(issue, format: @options[:format])
|
|
185
194
|
else
|
|
@@ -201,8 +210,11 @@ module Bugsink
|
|
|
201
210
|
output_list(response.data, format: @options[:format])
|
|
202
211
|
when 'get'
|
|
203
212
|
uuid = args[0]
|
|
204
|
-
|
|
205
|
-
|
|
213
|
+
unless uuid
|
|
214
|
+
error('Event UUID required')
|
|
215
|
+
exit 1
|
|
216
|
+
end
|
|
217
|
+
parse_format_options!(args[1..] || [])
|
|
206
218
|
event = @client.event_get(uuid)
|
|
207
219
|
output_single(event, format: @options[:format])
|
|
208
220
|
when 'stacktrace'
|
|
@@ -226,8 +238,11 @@ module Bugsink
|
|
|
226
238
|
output_list(response.data, format: @options[:format])
|
|
227
239
|
when 'get'
|
|
228
240
|
uuid = args[0]
|
|
229
|
-
|
|
230
|
-
|
|
241
|
+
unless uuid
|
|
242
|
+
error('Release UUID required')
|
|
243
|
+
exit 1
|
|
244
|
+
end
|
|
245
|
+
parse_format_options!(args[1..] || [])
|
|
231
246
|
release = @client.release_get(uuid)
|
|
232
247
|
output_single(release, format: @options[:format])
|
|
233
248
|
when 'create'
|
|
@@ -246,6 +261,8 @@ module Bugsink
|
|
|
246
261
|
end
|
|
247
262
|
|
|
248
263
|
def parse_format_options!(args)
|
|
264
|
+
return if args.nil? || args.empty?
|
|
265
|
+
|
|
249
266
|
OptionParser.new do |opts|
|
|
250
267
|
opts.on('--json', 'Output as JSON') { @options[:format] = 'json' }
|
|
251
268
|
opts.on('--quiet', 'Minimal output') { @options[:format] = 'quiet' }
|
|
@@ -253,6 +270,8 @@ module Bugsink
|
|
|
253
270
|
end
|
|
254
271
|
|
|
255
272
|
def parse_project_options!(args)
|
|
273
|
+
return if args.nil? || args.empty?
|
|
274
|
+
|
|
256
275
|
OptionParser.new do |opts|
|
|
257
276
|
opts.on('--team=UUID', 'Filter by team UUID') { |v| @options[:team] = v }
|
|
258
277
|
opts.on('--json', 'Output as JSON') { @options[:format] = 'json' }
|
|
@@ -261,6 +280,8 @@ module Bugsink
|
|
|
261
280
|
end
|
|
262
281
|
|
|
263
282
|
def parse_issue_options!(args)
|
|
283
|
+
return if args.nil? || args.empty?
|
|
284
|
+
|
|
264
285
|
OptionParser.new do |opts|
|
|
265
286
|
opts.on('--project=ID', 'Project ID') { |v| @options[:project_id] = v.to_i }
|
|
266
287
|
opts.on('--sort=FIELD', 'Sort field') { |v| @options[:sort] = v }
|
|
@@ -271,6 +292,8 @@ module Bugsink
|
|
|
271
292
|
end
|
|
272
293
|
|
|
273
294
|
def parse_event_options!(args)
|
|
295
|
+
return if args.nil? || args.empty?
|
|
296
|
+
|
|
274
297
|
OptionParser.new do |opts|
|
|
275
298
|
opts.on('--issue=UUID', 'Issue UUID (required)') { |v| @options[:issue] = v }
|
|
276
299
|
opts.on('--order=ORDER', 'Sort order (asc|desc)') { |v| @options[:order] = v }
|
|
@@ -280,6 +303,8 @@ module Bugsink
|
|
|
280
303
|
end
|
|
281
304
|
|
|
282
305
|
def parse_release_options!(args)
|
|
306
|
+
return if args.nil? || args.empty?
|
|
307
|
+
|
|
283
308
|
OptionParser.new do |opts|
|
|
284
309
|
opts.on('--project=ID', 'Project ID') { |v| @options[:project_id] = v.to_i }
|
|
285
310
|
opts.on('--json', 'Output as JSON') { @options[:format] = 'json' }
|
data/lib/bugsink/version.rb
CHANGED