Project

General

Profile

Bug #8812 ยป 0001-RSS-Document-a-bunch-of-constants.patch

steveklabnik (Steve Klabnik), 08/23/2013 05:26 AM

View differences:

lib/rss/content.rb
1 1
require "rss/rss"
2 2

  
3 3
module RSS
4
  # The prefix for the Content XML namespace.
4 5
  CONTENT_PREFIX = 'content'
6
  # The URI of the Content specification.
5 7
  CONTENT_URI = "http://purl.org/rss/1.0/modules/content/"
6 8

  
7 9
  module ContentModel
lib/rss/dublincore.rb
1 1
require "rss/rss"
2 2

  
3 3
module RSS
4
  # The prefix for the Dublin Core XML namespace.
4 5
  DC_PREFIX = 'dc'
6
  # The URI of the Dublin Core specification.
5 7
  DC_URI = "http://purl.org/dc/elements/1.1/"
6 8

  
7 9
  module BaseDublinCoreModel
lib/rss/image.rb
3 3

  
4 4
module RSS
5 5

  
6
  # The prefix for the Image XML namespace.
6 7
  IMAGE_PREFIX = 'image'
8
  # The URI for the Image specification.
7 9
  IMAGE_URI = 'http://purl.org/rss/1.0/modules/image/'
8 10

  
9 11
  RDF.install_ns(IMAGE_PREFIX, IMAGE_URI)
10 12

  
13
  # This constant holds strings which contain the names of
14
  # image elements, with the appropriate prefix.
11 15
  IMAGE_ELEMENTS = []
12 16

  
13 17
  %w(item favicon).each do |name|
lib/rss/itunes.rb
1 1
require 'rss/2.0'
2 2

  
3 3
module RSS
4
  # The prefix for the iTunes XML namespace.
4 5
  ITUNES_PREFIX = 'itunes'
6
  # The URI of the iTunes specification.
5 7
  ITUNES_URI = 'http://www.itunes.com/dtds/podcast-1.0.dtd'
6 8

  
7 9
  Rss.install_ns(ITUNES_PREFIX, ITUNES_URI)
lib/rss/parser.rb
545 545
  end
546 546

  
547 547
  unless const_defined? :AVAILABLE_PARSER_LIBRARIES
548
    # The list of all available libraries for parsing.
548 549
    AVAILABLE_PARSER_LIBRARIES = [
549 550
      ["rss/xmlparser", :XMLParserParser],
550 551
      ["rss/xmlscanner", :XMLScanParser],
......
552 553
    ]
553 554
  end
554 555

  
556
  # The list of all available parsers, in constant form.
555 557
  AVAILABLE_PARSERS = []
556 558

  
557 559
  AVAILABLE_PARSER_LIBRARIES.each do |lib, parser|
lib/rss/slash.rb
1 1
require 'rss/1.0'
2 2

  
3 3
module RSS
4
  # The prefix for the Slash XML namespace.
4 5
  SLASH_PREFIX = 'slash'
6
  # The URI of the Slash specification.
5 7
  SLASH_URI = "http://purl.org/rss/1.0/modules/slash/"
6 8

  
7 9
  RDF.install_ns(SLASH_PREFIX, SLASH_URI)
lib/rss/syndication.rb
1 1
require "rss/1.0"
2 2

  
3 3
module RSS
4

  
4
  # The prefix for the Syndication XML namespace.
5 5
  SY_PREFIX = 'sy'
6
  # The URI of the Syndication specification.
6 7
  SY_URI = "http://purl.org/rss/1.0/modules/syndication/"
7 8

  
8 9
  RDF.install_ns(SY_PREFIX, SY_URI)
lib/rss/taxonomy.rb
2 2
require "rss/dublincore"
3 3

  
4 4
module RSS
5

  
5
  # The prefix for the Taxonomy XML namespace.
6 6
  TAXO_PREFIX = "taxo"
7
  # The URI for the specification of the Taxonomy XML namespace.
7 8
  TAXO_URI = "http://purl.org/rss/1.0/modules/taxonomy/"
8 9

  
9 10
  RDF.install_ns(TAXO_PREFIX, TAXO_URI)
10 11

  
12
  # The listing of all the taxonomy elements, with the appropriate namespace.
11 13
  TAXO_ELEMENTS = []
12 14

  
13 15
  %w(link).each do |name|