ruby-bugzilla 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,156 @@
1
+ # product.rb
2
+ # Copyright (C) 2010-2012 Red Hat, Inc.
3
+ #
4
+ # Authors:
5
+ # Akira TAGOH <tagoh@redhat.com>
6
+ #
7
+ # This program is free software; you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation; either version 2 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program; if not, write to the Free Software
19
+ # Foundation, Inc., 59 Temple Place - Suite 330,
20
+ # Boston, MA 02111-1307, USA.
21
+
22
+ require 'bugzilla/api_tmpl'
23
+
24
+ module Bugzilla
25
+
26
+ =begin rdoc
27
+
28
+ === Bugzilla::Product
29
+
30
+ Bugzilla::Product class is to access
31
+ the Bugzilla::WebService::Product API that allows you to
32
+ list the available Products and get information about them.
33
+
34
+ =end
35
+
36
+ class Product < APITemplate
37
+
38
+ =begin rdoc
39
+
40
+ ==== Bugzilla::Product#selectable_products
41
+
42
+ Returns the products that the user can search on as Hash
43
+ contains the product name as the Hash key and Array as the
44
+ value. Array contains the list of _id_, _name_,
45
+ _description_ and _internals_ according to API documentation
46
+ though, actually the component, the version and the target
47
+ milestone.
48
+
49
+ =end
50
+
51
+ def selectable_products
52
+ ids = get_selectable_products
53
+ get(ids)
54
+ end # def selectable_products
55
+
56
+ =begin rdoc
57
+
58
+ ==== Bugzilla::Product#enterable_products
59
+
60
+ Returns the products that the user can enter bugs against
61
+ as Hash contains the product name as the Hash key and Array
62
+ as the value. Array contains the list of _id_, _name_,
63
+ _description_ and _internals_ according to API documentation
64
+ though, actually the component, the version and the target
65
+ milestone.
66
+
67
+ =end
68
+
69
+ def enterable_products
70
+ ids = get_enterable_products
71
+ get(ids)
72
+ end # def enterable_products
73
+
74
+ =begin rdoc
75
+
76
+ ==== Bugzilla::Product#accessible_products
77
+
78
+ Returns the products that the user can search or enter bugs
79
+ against as Hash contains the product name as the Hash key
80
+ and Array as the value. Array contains the list of _id_,
81
+ _name_, _description_ and _internals_ according to API
82
+ documentation though, actually the component, the version
83
+ and the target milestone.
84
+
85
+ =end
86
+
87
+ def accessible_products
88
+ ids = get_accessible_products
89
+ get(ids)
90
+ end # def accessible_products
91
+
92
+ =begin rdoc
93
+
94
+ ==== Bugzilla::Product#get_selectable_products
95
+
96
+ Raw Bugzilla API to obtain the products that the user can
97
+ search on.
98
+
99
+ See http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Product.html
100
+
101
+ =end
102
+
103
+ =begin rdoc
104
+
105
+ ==== Bugzilla::Product#get_enterable_products
106
+
107
+ Raw Bugzilla API to obtain the products that the user can
108
+ enter bugs against.
109
+
110
+ See http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Product.html
111
+
112
+ =end
113
+
114
+ =begin rdoc
115
+
116
+ ==== Bugzilla::Product#get_accessible_products
117
+
118
+ Raw Bugzilla API to obtain the products that the user can
119
+ search or enter bugs against.
120
+
121
+ See http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Product.html
122
+
123
+ =end
124
+
125
+ protected
126
+
127
+ def _get_selectable_products(cmd, *args)
128
+ @iface.call(cmd)
129
+ end # def _get_selectable_products
130
+
131
+ def _get_enterable_products(cmd, *args)
132
+ @iface.call(cmd)
133
+ end # def _get_entrable_products
134
+
135
+ def _get_accessible_products(cmd, *args)
136
+ @iface.call(cmd)
137
+ end # def _get_accessible_products
138
+
139
+ def _get(cmd, ids, *args)
140
+ params = {}
141
+
142
+ if ids.kind_of?(Hash) then
143
+ raise ArgumentError, sprintf("Invalid parameter: %s", ids.inspect) unless ids.include?('ids')
144
+ params[:ids] = ids['ids']
145
+ elsif ids.kind_of?(Array) then
146
+ params[:ids] = ids
147
+ else
148
+ params[:ids] = [ids]
149
+ end
150
+
151
+ @iface.call(cmd, params)
152
+ end # def _get
153
+
154
+ end # class Product
155
+
156
+ end # module Bugzilla
@@ -4,20 +4,18 @@
4
4
  # Authors:
5
5
  # Akira TAGOH <tagoh@redhat.com>
6
6
  #
7
- # This program is free software; you can redistribute it and/or modify
8
- # it under the terms of the GNU General Public License as published by
9
- # the Free Software Foundation; either version 2 of the License, or
10
- # (at your option) any later version.
7
+ # This library is free software: you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation, either
10
+ # version 3 of the License, or (at your option) any later version.
11
11
  #
12
- # This program is distributed in the hope that it will be useful,
12
+ # This library is distributed in the hope that it will be useful,
13
13
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
15
  # GNU General Public License for more details.
16
16
  #
17
17
  # You should have received a copy of the GNU General Public License
18
- # along with this program; if not, write to the Free Software
19
- # Foundation, Inc., 59 Temple Place - Suite 330,
20
- # Boston, MA 02111-1307, USA.
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
19
 
22
20
 
23
21
  module Bugzilla
@@ -0,0 +1,50 @@
1
+ # skeleton.rb
2
+ # Copyright (C) 2010-2012 Red Hat, Inc.
3
+ #
4
+ # Authors:
5
+ # Akira TAGOH <tagoh@redhat.com>
6
+ #
7
+ # This program is free software; you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation; either version 2 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program; if not, write to the Free Software
19
+ # Foundation, Inc., 59 Temple Place - Suite 330,
20
+ # Boston, MA 02111-1307, USA.
21
+
22
+
23
+ module Bugzilla
24
+
25
+ =begin rdoc
26
+
27
+ === Bugzilla::Skeleton
28
+
29
+ =end
30
+
31
+ class Skeleton
32
+
33
+ def initialize(iface)
34
+ @iface = iface
35
+ end # def initialize
36
+
37
+ def method_missing(symbol, *args)
38
+ m = "_#{symbol}"
39
+ klass = self.class.to_s.sub(/\ABugzilla::/, '')
40
+ fm = "#{klass}.#{symbol}"
41
+ if self.respond_to?(m) then
42
+ __send__(m, fm, *args)
43
+ else
44
+ raise NoMethodError, sprintf("No such Bugzilla APIs: %s.%s", klass, symbol)
45
+ end
46
+ end # def method_missing
47
+
48
+ end # class Skeleton
49
+
50
+ end # module Bugzilla
data/lib/bugzilla/user.rb CHANGED
@@ -4,21 +4,20 @@
4
4
  # Authors:
5
5
  # Akira TAGOH <tagoh@redhat.com>
6
6
  #
7
- # This program is free software; you can redistribute it and/or modify
8
- # it under the terms of the GNU General Public License as published by
9
- # the Free Software Foundation; either version 2 of the License, or
10
- # (at your option) any later version.
7
+ # This library is free software: you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation, either
10
+ # version 3 of the License, or (at your option) any later version.
11
11
  #
12
- # This program is distributed in the hope that it will be useful,
12
+ # This library is distributed in the hope that it will be useful,
13
13
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
15
  # GNU General Public License for more details.
16
16
  #
17
17
  # You should have received a copy of the GNU General Public License
18
- # along with this program; if not, write to the Free Software
19
- # Foundation, Inc., 59 Temple Place - Suite 330,
20
- # Boston, MA 02111-1307, USA.
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
19
 
20
+ require 'yaml'
22
21
  require 'bugzilla/api_tmpl'
23
22
 
24
23
  module Bugzilla
@@ -74,6 +73,8 @@ Keeps the bugzilla session during doing something in the block.
74
73
 
75
74
  Raw Bugzilla API to log into Bugzilla.
76
75
 
76
+ See http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/User.html
77
+
77
78
  =end
78
79
 
79
80
  =begin rdoc
@@ -82,6 +83,8 @@ Raw Bugzilla API to log into Bugzilla.
82
83
 
83
84
  Raw Bugzilla API to log out the user.
84
85
 
86
+ See http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/User.html
87
+
85
88
  =end
86
89
 
87
90
  protected
@@ -104,6 +107,10 @@ Raw Bugzilla API to log out the user.
104
107
  # FIXME
105
108
  end # def _create
106
109
 
110
+ def __update(cmd, *args)
111
+ # FIXME
112
+ end # def _update
113
+
107
114
  def __get(cmd, *args)
108
115
  requires_version(cmd, 3.4)
109
116
  # FIXME
@@ -4,20 +4,18 @@
4
4
  # Authors:
5
5
  # Akira TAGOH <tagoh@redhat.com>
6
6
  #
7
- # This program is free software; you can redistribute it and/or modify
8
- # it under the terms of the GNU General Public License as published by
9
- # the Free Software Foundation; either version 2 of the License, or
10
- # (at your option) any later version.
7
+ # This library is free software: you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation, either
10
+ # version 3 of the License, or (at your option) any later version.
11
11
  #
12
- # This program is distributed in the hope that it will be useful,
12
+ # This library is distributed in the hope that it will be useful,
13
13
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
15
  # GNU General Public License for more details.
16
16
  #
17
17
  # You should have received a copy of the GNU General Public License
18
- # along with this program; if not, write to the Free Software
19
- # Foundation, Inc., 59 Temple Place - Suite 330,
20
- # Boston, MA 02111-1307, USA.
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
19
 
22
20
 
23
21
  =begin rdoc
@@ -28,6 +26,6 @@
28
26
 
29
27
  module Bugzilla
30
28
 
31
- VERSION = "0.4.1"
29
+ VERSION = "0.5.0"
32
30
 
33
31
  end # module Bugzilla
@@ -0,0 +1,33 @@
1
+ # version.rb
2
+ # Copyright (C) 2010-2012 Red Hat, Inc.
3
+ #
4
+ # Authors:
5
+ # Akira TAGOH <tagoh@redhat.com>
6
+ #
7
+ # This program is free software; you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation; either version 2 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program; if not, write to the Free Software
19
+ # Foundation, Inc., 59 Temple Place - Suite 330,
20
+ # Boston, MA 02111-1307, USA.
21
+
22
+
23
+ =begin rdoc
24
+
25
+ == Bugzilla
26
+
27
+ =end
28
+
29
+ module Bugzilla
30
+
31
+ VERSION = "0.4.1"
32
+
33
+ end # module Bugzilla
@@ -4,20 +4,18 @@
4
4
  # Authors:
5
5
  # Akira TAGOH <tagoh@redhat.com>
6
6
  #
7
- # This program is free software; you can redistribute it and/or modify
8
- # it under the terms of the GNU General Public License as published by
9
- # the Free Software Foundation; either version 2 of the License, or
10
- # (at your option) any later version.
7
+ # This library is free software: you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation, either
10
+ # version 3 of the License, or (at your option) any later version.
11
11
  #
12
- # This program is distributed in the hope that it will be useful,
12
+ # This library is distributed in the hope that it will be useful,
13
13
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
15
  # GNU General Public License for more details.
16
16
  #
17
17
  # You should have received a copy of the GNU General Public License
18
- # along with this program; if not, write to the Free Software
19
- # Foundation, Inc., 59 Temple Place - Suite 330,
20
- # Boston, MA 02111-1307, USA.
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
19
 
22
20
  require 'xmlrpc/client'
23
21
 
@@ -0,0 +1,81 @@
1
+ # xmlrpc.rb
2
+ # Copyright (C) 2010-2012 Red Hat, Inc.
3
+ #
4
+ # Authors:
5
+ # Akira TAGOH <tagoh@redhat.com>
6
+ #
7
+ # This program is free software; you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation; either version 2 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program; if not, write to the Free Software
19
+ # Foundation, Inc., 59 Temple Place - Suite 330,
20
+ # Boston, MA 02111-1307, USA.
21
+
22
+ require 'xmlrpc/client'
23
+
24
+ module Bugzilla
25
+
26
+ =begin rdoc
27
+
28
+ === Bugzilla::XMLRPC
29
+
30
+ =end
31
+
32
+ class XMLRPC
33
+
34
+ =begin rdoc
35
+
36
+ ==== Bugzilla::XMLRPC#new(host, port = 443, path = '/xmlrpc.cgi', proxy_host = nil, proxy_port = nil)
37
+
38
+ =end
39
+
40
+ def initialize(host, port = 443, path = '/xmlrpc.cgi', proxy_host = nil, proxy_port = nil, timeout = 60)
41
+ path ||= '/xmlrpc.cgi'
42
+ use_ssl = port == 443 ? true : false
43
+ @xmlrpc = ::XMLRPC::Client.new(host, path, port, proxy_host, proxy_port, nil, nil, use_ssl, timeout)
44
+ end # def initialize
45
+
46
+ =begin rdoc
47
+
48
+ ==== Bugzilla::XMLRPC#call(cmd, params, user = nil, password = nil)
49
+
50
+ =end
51
+
52
+ def call(cmd, params = {}, user = nil, password = nil)
53
+ params = {} if params.nil?
54
+ params['Bugzilla_login'] = user unless user.nil? || password.nil?
55
+ params['Bugzilla_password'] = password unless user.nil? || password.nil?
56
+ @xmlrpc.call(cmd, params)
57
+ end # def call
58
+
59
+ =begin rdoc
60
+
61
+ ==== Bugzilla::XMLRPC#cookie
62
+
63
+ =end
64
+
65
+ def cookie
66
+ @xmlrpc.cookie
67
+ end # def cookie
68
+
69
+ =begin rdoc
70
+
71
+ ==== Bugzilla::XMLRPC#cookie=(val)
72
+
73
+ =end
74
+
75
+ def cookie=(val)
76
+ @xmlrpc.cookie = val
77
+ end # def cookie
78
+
79
+ end # class XMLRPC
80
+
81
+ end # module Bugzilla
data/lib/bugzilla.rb ADDED
@@ -0,0 +1,24 @@
1
+ # bugzilla.rb
2
+ # Copyright (C) 2010-2012 Red Hat, Inc.
3
+ #
4
+ # Authors:
5
+ # Akira TAGOH <tagoh@redhat.com>
6
+ #
7
+ # This library is free software: you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation, either
10
+ # version 3 of the License, or (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ require 'bugzilla/bug'
21
+ require 'bugzilla/plugin'
22
+ require 'bugzilla/product'
23
+ require 'bugzilla/user'
24
+ require 'bugzilla/xmlrpc'
data/lib/bugzilla.rb~ ADDED
@@ -0,0 +1,24 @@
1
+ # bugzilla.rb
2
+ # Copyright (C) 2010-2012 Akira TAGOH
3
+ #
4
+ # Authors:
5
+ # Akira TAGOH <tagoh@redhat.com>
6
+ #
7
+ # This library is free software: you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation, either
10
+ # version 3 of the License, or (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ require 'bugzilla/bug'
21
+ require 'bugzilla/plugin'
22
+ require 'bugzilla/product'
23
+ require 'bugzilla/user'
24
+ require 'bugzilla/xmlrpc'
@@ -4,20 +4,18 @@
4
4
  # Authors:
5
5
  # Akira TAGOH <tagoh@redhat.com>
6
6
  #
7
- # This library is free software; you can redistribute it and/or
7
+ # This library is free software: you can redistribute it and/or
8
8
  # modify it under the terms of the GNU Lesser General Public
9
- # License as published by the Free Software Foundation; either
10
- # version 2 of the License, or (at your option) any later version.
9
+ # License as published by the Free Software Foundation, either
10
+ # version 3 of the License, or (at your option) any later version.
11
11
  #
12
12
  # This library is distributed in the hope that it will be useful,
13
13
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- # Lesser General Public License for more details.
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
16
  #
17
- # You should have received a copy of the GNU Lesser General Public
18
- # License along with this library; if not, write to the
19
- # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
- # Boston, MA 02111-1307, USA.
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
19
 
22
20
  require 'rubygems'
23
21
 
@@ -44,7 +44,7 @@ module Bugzilla
44
44
  parser.separator ""
45
45
  parser.separator "RH Bugzilla specific options:"
46
46
  parser.on('--cc=EMAILS', 'filter out the result by Cc in bugs') {|v| opts[:query][:cc] ||= []; opts[:query][:cc].push(*v.split(','))}
47
- parser.on('--version=VERSION', 'filter out the result by the version in bugs') {|v| opts[:query][:version] ||= []; opts[:query][:version].push(*v.split(','))}
47
+ parser.on('--filterversion=VERSION', 'filter out the result by the version in bugs') {|v| opts[:query][:version] ||= []; opts[:query][:version].push(*v.split(','))}
48
48
  end # def parserhook
49
49
 
50
50
  def prehook(*args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-bugzilla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-13 00:00:00.000000000 Z
12
+ date: 2012-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -100,6 +100,7 @@ executables:
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
+ - lib/bugzilla.rb~
103
104
  - lib/bugzilla/version.rb
104
105
  - lib/bugzilla/bugzilla.rb~
105
106
  - lib/bugzilla/product.rb
@@ -108,13 +109,21 @@ files:
108
109
  - lib/bugzilla/xmlrpc.rb
109
110
  - lib/bugzilla/skelton.rb~
110
111
  - lib/bugzilla/api_tmpl.rb~
112
+ - lib/bugzilla/xmlrpc.rb~
113
+ - lib/bugzilla/skeleton.rb~
111
114
  - lib/bugzilla/bug.rb~
115
+ - lib/bugzilla/group.rb
112
116
  - lib/bugzilla/plugin.rb
117
+ - lib/bugzilla/version.rb~
118
+ - lib/bugzilla/product.rb~
113
119
  - lib/bugzilla/bugzilla.rb
120
+ - lib/bugzilla/group.rb~
114
121
  - lib/bugzilla/user.rb~
122
+ - lib/bugzilla/classification.rb
115
123
  - lib/bugzilla/bug.rb
116
124
  - lib/bugzilla/plugin.rb~
117
125
  - lib/bugzilla/api_tmpl.rb
126
+ - lib/bugzilla.rb
118
127
  - lib/ruby-bugzilla/rhbugzilla.rb~
119
128
  - lib/ruby-bugzilla/rhbugzilla.rb
120
129
  - README.rdoc