ruby-bugzilla 0.6.2 → 0.6.3

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: 2710781898819cfeea6352ec0ba2775caca72dc1
4
- data.tar.gz: 3231fdf9dc0377dd66e56c9ba706ab97c87f0bb9
3
+ metadata.gz: 0ef3ccad4538e7dae9f089f6e4208fcec84a9536
4
+ data.tar.gz: feb4000d008e4b0359d928598a0d7fa8f1db3c6f
5
5
  SHA512:
6
- metadata.gz: 9d0931073103fa0e76373154d407ca9c1cbf72d1be54fa526c40f3347c722de92487fac7e694ffbdf05af4bb9940df06a86b85175ea7ef02fe673e78cf23873b
7
- data.tar.gz: c0939d4ea610d5186d95d1a03afd30ff5be9b575917b4acf5c597936d52670a9ad08733ee5a1ef0cbcaf6467b6137a1e9106b072fdb0d47ecb2ab1dfdc1f5a5a
6
+ metadata.gz: 72b186d9ae4278215d1f14758d41e27a0411266ed1a9acd0fa8c9fdf6c04185ba95c702fe50e4a7f823bd115090c9d1643bdeebc2cb8063edbd16870e1ee5839
7
+ data.tar.gz: 18c25084d0272ebe696c1f9dd1a64669e2477a173d786c3301a9f3d4e596864924380150299087d852b8374d5519f201947f3e5091dd9b82fa2a3ffe25162503
data/bin/bzconsole CHANGED
@@ -333,8 +333,13 @@ module BzConsole
333
333
  end
334
334
 
335
335
  info = conf[prefix]
336
- login = info[:User].nil? ? ask("Bugzilla ID: ") : info[:User]
337
- pass = info[:Password].nil? ? ask("Bugzilla password: ") {|q| q.echo = false} : info[:Password]
336
+ if opts[:command][:anonymous] == true then
337
+ login = nil
338
+ pass = nil
339
+ else
340
+ login = info[:User].nil? ? ask("Bugzilla ID: ") : info[:User]
341
+ pass = info[:Password].nil? ? ask("Bugzilla password: ") {|q| q.echo = false} : info[:Password]
342
+ end
338
343
 
339
344
  xmlrpc,host = get_xmlrpc(conf[prefix],opts) do |h|
340
345
  @plugin.run(:pre, h, :getbug, opts)
@@ -446,8 +451,13 @@ module BzConsole
446
451
  host = uri.host
447
452
  port = uri.port
448
453
  path = uri.path.empty? ? nil : uri.path
449
- login = opts[:command][:anonymous] == true ? nil : info[:User]
450
- pass = opts[:command][:anonymous] == true ? nil : info[:Password]
454
+ if opts[:command][:anonymous] == true then
455
+ login = nil
456
+ pass = nil
457
+ else
458
+ login = info[:User].nil? ? ask("Bugzilla ID: ") : info[:User]
459
+ pass = info[:Password].nil? ? ask("Bugzilla password: ") {|q| q.echo = false} : info[:Password]
460
+ end
451
461
  proxy_host, proxy_port = get_proxy(info)
452
462
  timeout = opts[:timeout].nil? ? 60 : opts[:timeout]
453
463
 
@@ -525,8 +535,13 @@ module BzConsole
525
535
  host = uri.host
526
536
  port = uri.port
527
537
  path = uri.path.empty? ? nil : uri.path
528
- login = opts[:command][:anonymous] == true ? nil : info[:User]
529
- pass = opts[:command][:anonymous] == true ? nil : info[:Password]
538
+ if opts[:command][:anonymous] == true then
539
+ login = nil
540
+ pass = nil
541
+ else
542
+ login = info[:User].nil? ? ask("Bugzilla ID: ") : info[:User]
543
+ pass = info[:Password].nil? ? ask("Bugzilla password: ") {|q| q.echo = false} : info[:Password]
544
+ end
530
545
  proxy_host, proxy_port = get_proxy(info)
531
546
  timeout = opts[:timeout].nil? ? 60 : opts[:timeout]
532
547
 
@@ -686,8 +701,13 @@ module BzConsole
686
701
  end
687
702
 
688
703
  info = conf[prefix]
689
- login = info[:User].nil? ? ask("Bugzilla ID: ") : info[:User]
690
- pass = info[:Password].nil? ? ask("Bugzilla password: ") {|q| q.echo = false} : info[:Password]
704
+ if opts[:command][:anonymous] == true then
705
+ login = nil
706
+ pass = nil
707
+ else
708
+ login = info[:User].nil? ? ask("Bugzilla ID: ") : info[:User]
709
+ pass = info[:Password].nil? ? ask("Bugzilla password: ") {|q| q.echo = false} : info[:Password]
710
+ end
691
711
 
692
712
 
693
713
  xmlrpc,host = get_xmlrpc(conf[prefix],opts)
@@ -865,8 +885,8 @@ module BzConsole
865
885
  host = uri.host
866
886
  port = uri.port
867
887
  path = uri.path.empty? ? nil : uri.path
868
- login = opts[:command][:anonymous] == true ? nil : info[:User]
869
- pass = opts[:command][:anonymous] == true ? nil : info[:Password]
888
+ login = info[:User].nil? ? ask("Bugzilla ID: ") : info[:User]
889
+ pass = info[:Password].nil? ? ask("Bugzilla password: ") {|q| q.echo = false} : info[:Password]
870
890
  proxy_host, proxy_port = get_proxy(info)
871
891
  timeout = opts[:timeout].nil? ? 60 : opts[:timeout]
872
892
 
@@ -979,8 +999,13 @@ module BzConsole
979
999
  end
980
1000
 
981
1001
  info = conf[prefix]
982
- login = info[:User].nil? ? ask("Bugzilla ID: ") : info[:User]
983
- pass = info[:Password].nil? ? ask("Bugzilla password: ") {|q| q.echo = false} : info[:Password]
1002
+ if opts[:command][:anonymous] == true then
1003
+ login = nil
1004
+ pass = nil
1005
+ else
1006
+ login = info[:User].nil? ? ask("Bugzilla ID: ") : info[:User]
1007
+ pass = info[:Password].nil? ? ask("Bugzilla password: ") {|q| q.echo = false} : info[:Password]
1008
+ end
984
1009
 
985
1010
  xmlrpc, host = get_xmlrpc(conf[prefix], opts)
986
1011
  user = Bugzilla::User.new(xmlrpc)
data/lib/bugzilla/bug.rb CHANGED
@@ -119,7 +119,19 @@ actually deprecated.
119
119
  result = comments(params)
120
120
 
121
121
  # not supporting comment_ids. so drop "comments".
122
- result['bugs']
122
+ ret = result['bugs']
123
+ # creation_time was added in Bugzilla 4.4. copy the 'time' value to creation_time if not available for compatibility.
124
+ unless check_version(4.4)[0] then
125
+ ret.each do |id, o|
126
+ o['comments'].each do |c|
127
+ unless c.include?('creation_time') then
128
+ c['creation_time'] = c['time']
129
+ end
130
+ end
131
+ end
132
+ end
133
+
134
+ ret
123
135
  end # def get_comments
124
136
 
125
137
  =begin rdoc
data/lib/bugzilla/user.rb CHANGED
@@ -67,7 +67,7 @@ Keeps the bugzilla session during doing something in the block.
67
67
  @iface.token = val
68
68
  else
69
69
  print "Using cookie\n"
70
- @iface.cookie = cookie
70
+ @iface.cookie = val
71
71
  end
72
72
  yield
73
73
  elsif user.nil? || password.nil? then
@@ -26,6 +26,6 @@
26
26
 
27
27
  module Bugzilla
28
28
 
29
- VERSION = "0.6.2"
29
+ VERSION = "0.6.3"
30
30
 
31
31
  end # module Bugzilla
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-bugzilla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira TAGOH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-12 00:00:00.000000000 Z
11
+ date: 2015-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: 1.3.6
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.4.5
115
+ rubygems_version: 2.4.8
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: Ruby binding for Bugzilla WebService APIs