ruby-bugzilla 0.6.4 → 0.6.5
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 +5 -5
- data/bin/bzconsole +1 -1
- data/lib/bugzilla/user.rb +15 -6
- data/lib/bugzilla/version.rb +1 -1
- data/lib/bugzilla/xmlrpc.rb +21 -0
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e1012b784652144a7cb0701aa0d2de92a6d056eb916772bec125abdcc56924d1
|
4
|
+
data.tar.gz: c10985bfcd700e37d478cd9b633ba46dde66b9fa88099ba9e7b7c10675b1c6c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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=
|
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('
|
46
|
+
r = check_version('5.0.0')
|
47
47
|
|
48
48
|
if r[0] then
|
49
|
-
key = :
|
50
|
-
fname = File.join(ENV['HOME'], '.ruby-bugzilla-
|
49
|
+
key = :api_key
|
50
|
+
fname = File.join(ENV['HOME'], '.ruby-bugzilla-api.yml')
|
51
51
|
else
|
52
|
-
|
53
|
-
|
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
|
-
|
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
|
data/lib/bugzilla/version.rb
CHANGED
data/lib/bugzilla/xmlrpc.rb
CHANGED
@@ -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
|
+
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:
|
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
|
-
|
115
|
-
|
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: []
|