sitemap_generator 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +3 -0
- data/Gemfile.lock +14 -0
- data/VERSION +1 -1
- data/lib/sitemap_generator/builder/sitemap_file.rb +2 -1
- data/lib/sitemap_generator/utilities.rb +2 -0
- data/tasks/sitemap_generator_tasks.rake +16 -6
- metadata +6 -4
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.6
|
@@ -15,6 +15,7 @@ module SitemapGenerator
|
|
15
15
|
#
|
16
16
|
class SitemapFile
|
17
17
|
include ActionView::Helpers::NumberHelper
|
18
|
+
include ActionView::Helpers::TextHelper # Rails 2.2.2 fails with missing 'pluralize' otherwise
|
18
19
|
attr_accessor :sitemap_path, :public_path, :filesize, :link_count, :hostname
|
19
20
|
|
20
21
|
# <tt>public_path</tt> full path of the directory to write sitemaps in.
|
@@ -150,4 +151,4 @@ module SitemapGenerator
|
|
150
151
|
end
|
151
152
|
end
|
152
153
|
end
|
153
|
-
end
|
154
|
+
end
|
@@ -1,8 +1,20 @@
|
|
1
|
+
# Require sitemap_generator at runtime. If we don't do this the ActionView helpers are included
|
2
|
+
# before the Rails environment can be loaded by other Rake tasks, which causes problems
|
3
|
+
# for those tasks when rendering using ActionView.
|
1
4
|
namespace :sitemap do
|
2
|
-
# Require sitemap_generator
|
3
|
-
#
|
4
|
-
# for those tasks when rendering using ActionView.
|
5
|
+
# Require sitemap_generator only. When installed as a plugin, the require will fail, so in
|
6
|
+
# this case, we have to load the full environment first.
|
5
7
|
task :require do
|
8
|
+
begin
|
9
|
+
require 'sitemap_generator'
|
10
|
+
rescue LoadError
|
11
|
+
Rake::Task['sitemap:require_environment'].invoke
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# Require sitemap_generator after loading the Rails environment. We still need the require
|
16
|
+
# in case we are installed as a gem and are setup to not automatically be required.
|
17
|
+
task :require_environment => :environment do
|
6
18
|
require 'sitemap_generator'
|
7
19
|
end
|
8
20
|
|
@@ -24,9 +36,7 @@ namespace :sitemap do
|
|
24
36
|
desc "Create Sitemap XML files (don't ping search engines)"
|
25
37
|
task 'refresh:no_ping' => ['sitemap:create']
|
26
38
|
|
27
|
-
|
28
|
-
# automatically be required. If the library has already been required, this is harmless.
|
29
|
-
task :create => [:environment, 'sitemap:require'] do
|
39
|
+
task :create => ['sitemap:require_environment'] do
|
30
40
|
SitemapGenerator::Sitemap.verbose = verbose
|
31
41
|
SitemapGenerator::Sitemap.create
|
32
42
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sitemap_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 6
|
10
|
+
version: 1.3.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Karl Varga
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-12-
|
19
|
+
date: 2010-12-12 00:00:00 -08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -70,6 +70,8 @@ extensions: []
|
|
70
70
|
extra_rdoc_files:
|
71
71
|
- README.md
|
72
72
|
files:
|
73
|
+
- Gemfile
|
74
|
+
- Gemfile.lock
|
73
75
|
- MIT-LICENSE
|
74
76
|
- README.md
|
75
77
|
- Rakefile
|