xml-sitemap 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
data/lib/xml-sitemap/index.rb
CHANGED
@@ -25,7 +25,7 @@ module XmlSitemap
|
|
25
25
|
def render
|
26
26
|
xml = Builder::XmlMarkup.new(:indent => 2)
|
27
27
|
xml.instruct!(:xml, :version => '1.0', :encoding => 'UTF-8')
|
28
|
-
xml.
|
28
|
+
xml.sitemapindex(XmlSitemap::INDEX_SCHEMA_OPTIONS) { |s|
|
29
29
|
@maps.each do |item|
|
30
30
|
s.sitemap do |m|
|
31
31
|
m.loc item[:loc]
|
data/lib/xml-sitemap/item.rb
CHANGED
@@ -21,7 +21,8 @@ module XmlSitemap
|
|
21
21
|
if @validate_time && @updated.kind_of?(String) && !(@updated =~ ISO8601_REGEX)
|
22
22
|
raise ArgumentError, "String provided to :updated did not match ISO8601 standard!"
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
|
+
@changefreq = @changefreq.to_sym
|
25
26
|
unless XmlSitemap::PERIODS.include?(@changefreq)
|
26
27
|
raise ArgumentError, "Invalid :period value '#{@changefreq}'"
|
27
28
|
end
|
data/lib/xml-sitemap/options.rb
CHANGED
@@ -17,6 +17,8 @@ module XmlSitemap
|
|
17
17
|
}.freeze
|
18
18
|
|
19
19
|
INDEX_SCHEMA_OPTIONS = {
|
20
|
+
'xsi:schemaLocation' => "http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd",
|
21
|
+
'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
|
20
22
|
'xmlns' => "http://www.sitemaps.org/schemas/sitemap/0.9"
|
21
23
|
}.freeze
|
22
24
|
end
|
data/lib/xml-sitemap/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<
|
3
|
-
</
|
2
|
+
<sitemapindex xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
3
|
+
</sitemapindex>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<
|
2
|
+
<sitemapindex xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
3
3
|
<sitemap>
|
4
4
|
<loc>http://foobar.com/first-0.xml</loc>
|
5
5
|
<lastmod>2011-06-01T00:00:01Z</lastmod>
|
@@ -16,4 +16,4 @@
|
|
16
16
|
<loc>http://foobar.com/third-0.xml</loc>
|
17
17
|
<lastmod>2011-06-01T00:00:01Z</lastmod>
|
18
18
|
</sitemap>
|
19
|
-
</
|
19
|
+
</sitemapindex>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<
|
2
|
+
<sitemapindex xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
3
3
|
<sitemap>
|
4
4
|
<loc>http://foobar.com/sitemap-0.xml</loc>
|
5
5
|
<lastmod>2011-06-01T00:00:01Z</lastmod>
|
@@ -8,4 +8,4 @@
|
|
8
8
|
<loc>http://foobar.com/sitemap-1.xml</loc>
|
9
9
|
<lastmod>2011-06-01T00:00:01Z</lastmod>
|
10
10
|
</sitemap>
|
11
|
-
</
|
11
|
+
</sitemapindex>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xml-sitemap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-09-
|
12
|
+
date: 2011-09-24 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153030780 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0.8'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153030780
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &2153029200 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '2.6'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2153029200
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: simplecov
|
38
|
-
requirement: &
|
38
|
+
requirement: &2153028680 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0.4'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2153028680
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: nokogiri
|
49
|
-
requirement: &
|
49
|
+
requirement: &2153028180 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.5.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2153028180
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: builder
|
60
|
-
requirement: &
|
60
|
+
requirement: &2153027140 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '2.0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2153027140
|
69
69
|
description: Provides a wrapper to generate XML sitemaps and sitemap indexes.
|
70
70
|
email:
|
71
71
|
- dan.sosedoff@gmail.com
|