mongo-jira 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/bin/jira +26 -14
- data/lib/mongo/jira/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Njk4MTc4MjY3YWU4ZGUzN2UwODQ5MzM1OWNjZTZlNWY0N2Q2YWRjMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjdiNzkwNTMyYmNmNjk5MjE3MzY0YmY1MGUwZWYyNmEyNjYzZmI5OQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDY3ZTQxYTMyYzk2YWU4MTUyOWZhZWE2MzM2MDIwNmFkNjM2MmIwNzVjNWE1
|
10
|
+
YWIwZjc4NzEyZTU0MDJlNzk2Mzc1M2MyNzdjMWVjNjIxMTUzMzQyYWEwYjhm
|
11
|
+
MjM1NmYzNWFmYjIyMTZiMDFjODAzODkzY2JlYTJhNzVmNzIyNjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTFmZmQ4YWU2YjczM2E2MGRlMTg0Yzc5ZTUwMGE0MDk1Y2M3MmVmMDVlMTI4
|
14
|
+
NzgwOTRiNTlhZmU2OWM3OTExMDNkYjEyZTIyYWRmY2E3NzA5NWEzM2U5MGUz
|
15
|
+
NTkwZjUwZjRlYjNiOGEwMDIxZDZkNTI1ZmZhOWNlOGQ5NWVmYjg=
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/bin/jira
CHANGED
@@ -21,7 +21,7 @@ tengen = HighLine::ColorScheme.new do |cs|
|
|
21
21
|
cs[:p2] = [:red]
|
22
22
|
cs[:p3] = [:cyan]
|
23
23
|
cs[:p4] = [:green]
|
24
|
-
cs[:
|
24
|
+
cs[:p5] = [:green]
|
25
25
|
end
|
26
26
|
HighLine.color_scheme = tengen
|
27
27
|
|
@@ -55,7 +55,7 @@ END
|
|
55
55
|
global_option('-c', '--creds FILE', 'Load config data for your commands to use') { |file| $config = file }
|
56
56
|
global_option('-V', 'increment verbosity level, i.e. -VV for higher debug level') { $level += 1}
|
57
57
|
|
58
|
-
default_command :
|
58
|
+
default_command :show
|
59
59
|
|
60
60
|
command :init do |c|
|
61
61
|
c.syntax = 'jira init [options]'
|
@@ -339,8 +339,14 @@ def prompt(name, default=nil)
|
|
339
339
|
ask("#{name} (<%= color(\"#{default}\", RED) %>) ? ", lambda { |v| v.blank? ? default : v })
|
340
340
|
end
|
341
341
|
|
342
|
+
class Object
|
343
|
+
def try(name,*args)
|
344
|
+
self.send(name,args) rescue nil
|
345
|
+
end
|
346
|
+
end unless self.respond_to?(:try)
|
347
|
+
|
342
348
|
def header(ticket)
|
343
|
-
[ticket.key.ljust(15) ,ticket.summary , fix_versions(ticket), priority(ticket)].compact
|
349
|
+
[ticket.key.ljust(15) ,ticket.summary , fix_versions(ticket), priority(ticket),company(ticket)].compact
|
344
350
|
end
|
345
351
|
|
346
352
|
def comment(comment)
|
@@ -360,6 +366,11 @@ def comment(comment)
|
|
360
366
|
[hdr , DateTime.parse(comment['updated']).strftime('%D %T'), dev_only].compact
|
361
367
|
end
|
362
368
|
|
369
|
+
FIELD = 'customfield_10030'
|
370
|
+
def company(ticket)
|
371
|
+
ticket.attrs['fields'][FIELD]["name"] if ticket.attrs['fields'] && ticket.attrs['fields'][FIELD]
|
372
|
+
end
|
373
|
+
|
363
374
|
def fix_versions(ticket)
|
364
375
|
if ticket.try(:fixVersions)
|
365
376
|
trace "fixVersions #{JSON.pretty_generate(ticket.fixVersions)}"
|
@@ -383,19 +394,20 @@ def fix_versions(ticket)
|
|
383
394
|
end
|
384
395
|
|
385
396
|
def priority(ticket)
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
397
|
+
c = ':error'
|
398
|
+
if ticket.respond_to?(:priority)
|
399
|
+
trace "priority #{JSON.pretty_generate(ticket.priority.attrs)}"
|
400
|
+
c = case ticket.priority.attrs['name']
|
401
|
+
when /p1$/i ; ':p1'
|
402
|
+
when /p2$/i ; ':p2'
|
403
|
+
when /p3$/i ; ':p3'
|
404
|
+
when /p4$/i ; ':p4'
|
405
|
+
when /p5$/i ; ':p5'
|
406
|
+
else
|
407
|
+
':error'
|
408
|
+
end
|
396
409
|
end
|
397
410
|
"<%= color(\"#{ticket.priority.attrs['name']}\", #{c}) %>"
|
398
|
-
end
|
399
411
|
end
|
400
412
|
|
401
413
|
class DummyProgressBar
|
data/lib/mongo/jira/version.rb
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|