ruby-bugzilla 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1fa55983ed1c936358e6812edd7849fb0ca66e8b
4
- data.tar.gz: b48fe0e33838d85e14b5d7072dd4688a51b46f3d
2
+ SHA256:
3
+ metadata.gz: e1012b784652144a7cb0701aa0d2de92a6d056eb916772bec125abdcc56924d1
4
+ data.tar.gz: c10985bfcd700e37d478cd9b633ba46dde66b9fa88099ba9e7b7c10675b1c6c1
5
5
  SHA512:
6
- metadata.gz: f60fe976650ffa2b305e68071030abee1ebe089fffbb34b124c4de199239627ca4c059ee21b74090e3792a330ce26cde93dca2626bd855a660b45701a3dfe68d
7
- data.tar.gz: 86f033abd0a17141b4e0258768b087795ac4d9c61d0af004ff8ebe29857e5c6fac087074658de4a227150bcdb9aab562da3995140c5ad0b64fe9be2f0a9747b8
6
+ metadata.gz: 87b36a0f8fdcd34c9497de14dc0be00c9c76447a9dc78f3438628c6de86b726ea8b8b3dc8eefc4c9df41405b7d5828dc06249c643dea49734bad8a3cd467f3af
7
+ data.tar.gz: 85f7a6175632a9ed6c0603ec0107de0e907954a66c6709e558f68d7b3a93ada1424e183d88d20f85f231f859b04ae44876b75d3cad4b585f42d31bab496b2be2
data/bin/bzconsole CHANGED
@@ -393,7 +393,7 @@ module BzConsole
393
393
  parser.on('--platform=PLATFORMS', 'filter out the result by the platform') {|v| opts[:query][:platform] ||= []; opts[:query][:platform].push(*v.split(','))}
394
394
  parser.on('--priority=PRIORITY', 'filter out the result by the priority') {|v| opts[:query][:priority] ||= []; opts[:query][:priority].push(*v.split(','))}
395
395
  parser.on('-p', '--product=PRODUCTS', 'filter out the result by the specific products') {|v| opts[:query][:product] ||= []; opts[:query][:product].push(*v.split(','))}
396
- parser.on('--resolution=RESOLUSIONS', 'filter out the result by the resolusions') {|v| opts[:query][:resolution] ||= []; opts[:query][:resolusion].push(*v.split(','))}
396
+ parser.on('--resolution=RESOLUTIONS', 'filter out the result by the resolutions') {|v| opts[:query][:resolution] ||= []; opts[:query][:resolution].push(*v.split(','))}
397
397
  parser.on('--severity=SEVERITY', 'filter out the result by the severity') {|v| opts[:query][:severity] ||= []; opts[:query][:severity].push(*v.split(','))}
398
398
  parser.on('-s', '--status=STATUSES', 'filter out the result by the status') {|v| opts[:query][:status] ||= []; opts[:query][:status].push(*v.split(','))}
399
399
  parser.on('--summary=SUMMARY', 'filter out the result by the summary') {|v| opts[:query][:summary] ||= []; opts[:query][:summary] << v}
data/lib/bugzilla/user.rb CHANGED
@@ -43,14 +43,21 @@ Keeps the bugzilla session during doing something in the block.
43
43
  =end
44
44
 
45
45
  def session(user, password)
46
- r = check_version('4.4.3')
46
+ r = check_version('5.0.0')
47
47
 
48
48
  if r[0] then
49
- key = :token
50
- fname = File.join(ENV['HOME'], '.ruby-bugzilla-token.yml')
49
+ key = :api_key
50
+ fname = File.join(ENV['HOME'], '.ruby-bugzilla-api.yml')
51
51
  else
52
- key = :cookie
53
- fname = File.join(ENV['HOME'], '.ruby-bugzilla-cookie.yml')
52
+ r = check_version('4.4.3')
53
+
54
+ if r[0] then
55
+ key = :token
56
+ fname = File.join(ENV['HOME'], '.ruby-bugzilla-token.yml')
57
+ else
58
+ key = :cookie
59
+ fname = File.join(ENV['HOME'], '.ruby-bugzilla-cookie.yml')
60
+ end
54
61
  end
55
62
  host = @iface.instance_variable_get(:@xmlrpc).instance_variable_get(:@host)
56
63
  val = nil
@@ -62,7 +69,9 @@ Keeps the bugzilla session during doing something in the block.
62
69
  conf = {}
63
70
  end
64
71
  if !val.nil? then
65
- if key == :token then
72
+ if key == :api_key then
73
+ @iface.api_key = val
74
+ elsif key == :token then
66
75
  @iface.token = val
67
76
  else
68
77
  @iface.cookie = val
@@ -26,6 +26,6 @@
26
26
 
27
27
  module Bugzilla
28
28
 
29
- VERSION = "0.6.4"
29
+ VERSION = "0.6.5"
30
30
 
31
31
  end # module Bugzilla
@@ -55,6 +55,7 @@ module Bugzilla
55
55
  params['Bugzilla_login'] = user unless user.nil? || password.nil?
56
56
  params['Bugzilla_password'] = password unless user.nil? || password.nil?
57
57
  params['Bugzilla_token'] = @token unless @token.nil?
58
+ @xmlrpc.http_header_extra['Authorization'] = "Bearer #{@api_key}" unless @api_key.nil?
58
59
  @xmlrpc.call(cmd, params)
59
60
  end # def call
60
61
 
@@ -98,6 +99,26 @@ module Bugzilla
98
99
  @token = val
99
100
  end # def token=
100
101
 
102
+ =begin rdoc
103
+
104
+ ==== Bugzilla::XMLRPC#api_key
105
+
106
+ =end
107
+
108
+ def api_key
109
+ @api_key
110
+ end # def
111
+
112
+ =begin rdoc
113
+
114
+ ==== Bugzilla::XMLRPC#api_key=(val)
115
+
116
+ =end
117
+
118
+ def api_key=(val)
119
+ @api_key = val
120
+ end # def
121
+
101
122
  end # class XMLRPC
102
123
 
103
124
  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.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira TAGOH
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-25 00:00:00.000000000 Z
11
+ date: 2022-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -96,7 +96,7 @@ homepage: http://rubygems.org/gems/ruby-bugzilla
96
96
  licenses:
97
97
  - LGPL-3.0+
98
98
  metadata: {}
99
- post_install_message:
99
+ post_install_message:
100
100
  rdoc_options: []
101
101
  require_paths:
102
102
  - lib
@@ -111,9 +111,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: 1.3.6
113
113
  requirements: []
114
- rubyforge_project:
115
- rubygems_version: 2.4.8
116
- signing_key:
114
+ rubygems_version: 3.2.32
115
+ signing_key:
117
116
  specification_version: 4
118
117
  summary: Ruby binding for Bugzilla WebService APIs
119
118
  test_files: []