xml-sitemap 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xml-sitemap.rb +3 -3
- metadata +3 -3
data/lib/xml-sitemap.rb
CHANGED
@@ -10,8 +10,8 @@ module XmlSitemap
|
|
10
10
|
def initialize(opts={})
|
11
11
|
@path = opts[:url] if opts.key?(:url)
|
12
12
|
@updated = opts[:updated] || Time.now
|
13
|
-
@priority = opts[:priority] || 0
|
14
|
-
@changefreq = opts[:period] || :
|
13
|
+
@priority = opts[:priority] || 1.0
|
14
|
+
@changefreq = opts[:period] || :weekly
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -46,7 +46,7 @@ module XmlSitemap
|
|
46
46
|
@items.each do |item|
|
47
47
|
output << '<url>'
|
48
48
|
output << "<loc>http://#{@domain}#{item.path.to_s}</loc>"
|
49
|
-
output << "<lastmod>#{item.updated.
|
49
|
+
output << "<lastmod>#{item.updated.utc.strftime("%Y-%m-%dT%H:%M:%S-0000")}</lastmod>"
|
50
50
|
output << "<changefreq>#{item.changefreq.to_s}</changefreq>"
|
51
51
|
output << "<priority>#{item.priority.to_s}</priority>"
|
52
52
|
output << '</url>'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xml-sitemap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dan Sosedoff
|