~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to lib/rdoc/generator/xml/rdf.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2010-07-31 17:08:39 UTC
  • mfrom: (1.1.4 upstream) (8.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100731170839-j034dmpdqt1cc4p6
Tags: 1.9.2~svn28788-1
* New release based on upstream snapshot from the 1.9.2 branch,
  after 1.9.2 RC2. That branch is (supposed to be) binary-compatible
  with the 1.9.1 branch.
  + Builds fine on i386. Closes: #580852.
* Upgrade to Standards-Version: 3.9.1. No changes needed.
* Updated generated incs.
* Patches that still need work:
  + Unclear status, need more investigation:
   090729_fix_Makefile_deps.dpatch
   090803_exclude_rdoc.dpatch
   203_adjust_base_of_search_path.dpatch
   902_define_YAML_in_yaml_stringio.rb.dpatch
   919_common.mk_tweaks.dpatch
   931_libruby_suffix.dpatch
   940_test_thread_mutex_sync_shorter.dpatch
  + Maybe not needed anymore, keeping but not applying.
   102_skip_test_copy_stream.dpatch (test doesn't block anymore?)
   104_skip_btest_io.dpatch (test doesn't block anymore?)
   201_gem_prelude.dpatch (we don't use that rubygems anyway?)
   202_gem_default_dir.dpatch (we don't use that rubygems anyway?)
   940_test_file_exhaustive_fails_as_root.dpatch
   940_test_priority_fails.dpatch
   100518_load_libc_libm.dpatch
* Add disable-tests.diff: disable some tests that cause failures on FreeBSD.
  Closes: #590002, #543805, #542927.
* However, many new failures on FreeBSD. Since that version is still an
  improvement, add the check that makes test suite failures non-fatal on
  FreeBSD again. That still needs to be investigated.
* Re-add 903_skip_base_ruby_check.dpatch
* Add build-dependency on ruby1.8 and drop all pre-generated files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
require 'rdoc/generator/xml'
2
 
 
3
 
module RDoc::Generator::XML::RDF
4
 
 
5
 
  CONTENTS_RDF = <<-EOF
6
 
<% if defined? classes and classes["description"] then %>
7
 
    <description rd:parseType="Literal">
8
 
<%= classes["description"] %>
9
 
    </description>
10
 
<% end %>
11
 
 
12
 
<% if defined? files and files["requires"] then %>
13
 
<% files["requires"].each do |requires| %>
14
 
         <rd:required-file rd:name="<%= requires["name"] %>" />
15
 
<% end # files["requires"] %>
16
 
<% end %>
17
 
 
18
 
<% if defined? classes and classes["includes"] then %>
19
 
      <IncludedModuleList>
20
 
<% classes["includes"].each do |includes| %>
21
 
        <included-module rd:name="<%= includes["name"] %>"  />
22
 
<% end # includes["includes"] %>
23
 
      </IncludedModuleList>
24
 
<% end %>
25
 
 
26
 
<% if defined? classes and classes["sections"] then %>
27
 
<% classes["sections"].each do |sections| %>
28
 
<% if sections["attributes"] then %>
29
 
<% sections["attributes"].each do |attributes| %>
30
 
        <contents>
31
 
        <Attribute rd:name="<%= attributes["name"] %>">
32
 
<% if attributes["rw"] then %>
33
 
          <attribute-rw><%= attributes["rw"] %></attribute-rw>
34
 
<% end %>
35
 
          <description rdf:parseType="Literal"><%= attributes["a_desc"] %></description>
36
 
        </Attribute>
37
 
        </contents>
38
 
<% end # sections["attributes"] %>
39
 
<% end %>
40
 
 
41
 
<% if sections["method_list"] then %>
42
 
<% sections["method_list"].each do |method_list| %>
43
 
<% if method_list["methods"] then %>
44
 
<% method_list["methods"].each do |methods| %>
45
 
        <contents>
46
 
        <Method rd:name="<%= methods["name"] %>" rd:visibility="<%= methods["type"] %>"
47
 
                rd:category="<%= methods["category"] %>" rd:id="<%= methods["aref"] %>">
48
 
          <parameters><%= methods["params"] %></parameters>
49
 
<% if methods["m_desc"] then %>
50
 
          <description rdf:parseType="Literal">
51
 
<%= methods["m_desc"] %>
52
 
          </description>
53
 
<% end %>
54
 
<% if methods["sourcecode"] then %>
55
 
          <source-code-listing rdf:parseType="Literal">
56
 
<%= methods["sourcecode"] %>
57
 
          </source-code-listing>
58
 
<% end %>
59
 
        </Method>
60
 
       </contents>
61
 
<% end # method_list["methods"] %>
62
 
<% end %>
63
 
<% end # sections["method_list"] %>
64
 
<% end %>
65
 
     <!-- end method list -->
66
 
<% end # classes["sections"] %>
67
 
<% end %>
68
 
  EOF
69
 
 
70
 
########################################################################
71
 
 
72
 
  ONE_PAGE = %{<?xml version="1.0" encoding="utf-8"?>
73
 
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
74
 
        xmlns="http://pragprog.com/rdoc/rdoc.rdf#"
75
 
        xmlns:rd="http://pragprog.com/rdoc/rdoc.rdf#">
76
 
 
77
 
<!-- RDoc -->
78
 
<% values["files"].each do |files| %>
79
 
  <rd:File rd:name="<%= files["short_name"] %>" rd:id="<%= files["href"] %>">
80
 
      <path><%= files["full_path"] %></path>
81
 
      <dtm-modified><%= files["dtm_modified"] %></dtm-modified>
82
 
} + CONTENTS_RDF + %{
83
 
  </rd:File>
84
 
<% end # values["files"] %>
85
 
<% values["classes"].each do |classes| %>
86
 
  <<%= values["classmod"] %> rd:name="<%= classes["full_name"] %>" rd:id="<%= classes["full_name"] %>">
87
 
    <classmod-info>
88
 
<% if classes["infiles"] then %>
89
 
      <InFiles>
90
 
<% classes["infiles"].each do |infiles| %>
91
 
        <infile>
92
 
          <File rd:name="<%= infiles["full_path"] %>"
93
 
<% if infiles["full_path_url"] then %>
94
 
                rdf:about="<%= infiles["full_path_url"] %>"
95
 
<% end %>
96
 
           />
97
 
         </infile>
98
 
<% end # classes["infiles"] %>
99
 
      </InFiles>
100
 
<% end %>
101
 
<% if classes["parent"] then %>
102
 
     <superclass><%= href classes["par_url"], classes["parent"] %></superclass>
103
 
<% end %>
104
 
    </classmod-info>
105
 
} + CONTENTS_RDF + %{
106
 
  </<%= classes["classmod"] %>>
107
 
<% end # values["classes"] %>
108
 
<!-- /RDoc -->
109
 
</rdf:RDF>
110
 
}
111
 
 
112
 
end
113