sitemap_generator 1.3.7 → 1.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +22 -1
- data/Gemfile.lock +67 -2
- data/Rakefile +6 -2
- data/Rakefile.working +146 -0
- data/VERSION +1 -1
- data/lib/sitemap_generator/builder/sitemap_file.rb +2 -3
- data/lib/sitemap_generator/builder/sitemap_index_file.rb +2 -2
- metadata +56 -13
data/Gemfile
CHANGED
@@ -1,3 +1,24 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
gem 'sitemap_generator', :path => '
|
3
|
+
gem 'sitemap_generator', :path => './'
|
4
|
+
|
5
|
+
gem 'rails', '2.3.8'
|
6
|
+
gem 'mocha', '0.9.10'
|
7
|
+
gem 'rake', '0.8.7'
|
8
|
+
gem 'rspec', '1.3.0', :require => 'spec'
|
9
|
+
gem 'rspec-rails', '~>1.3.2', :require => 'spec/rails'
|
10
|
+
|
11
|
+
# Simplify these dependencies
|
12
|
+
gem 'git', '1.2.5'
|
13
|
+
gem 'jeweler', '1.4.0'
|
14
|
+
gem 'github', '0.4.5'
|
15
|
+
gem 'gemcutter', '0.6.1'
|
16
|
+
|
17
|
+
# These seem to be dependencies of jeweler or one of the other gems
|
18
|
+
gem 'nokogiri', '1.4.4'
|
19
|
+
gem 'sqlite3-ruby', '1.3.1', :require => 'sqlite3'
|
20
|
+
|
21
|
+
group :test do
|
22
|
+
gem 'ruby-debug', '0.10.3'
|
23
|
+
gem 'ruby-debug-base', '0.10.3'
|
24
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,79 @@
|
|
1
1
|
PATH
|
2
|
-
remote:
|
2
|
+
remote: ./
|
3
3
|
specs:
|
4
|
-
sitemap_generator (1.3.
|
4
|
+
sitemap_generator (1.3.7)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: http://rubygems.org/
|
8
8
|
specs:
|
9
|
+
actionmailer (2.3.8)
|
10
|
+
actionpack (= 2.3.8)
|
11
|
+
actionpack (2.3.8)
|
12
|
+
activesupport (= 2.3.8)
|
13
|
+
rack (~> 1.1.0)
|
14
|
+
activerecord (2.3.8)
|
15
|
+
activesupport (= 2.3.8)
|
16
|
+
activeresource (2.3.8)
|
17
|
+
activesupport (= 2.3.8)
|
18
|
+
activesupport (2.3.8)
|
19
|
+
columnize (0.3.2)
|
20
|
+
gemcutter (0.6.1)
|
21
|
+
git (1.2.5)
|
22
|
+
github (0.4.5)
|
23
|
+
highline (~> 1.5.1)
|
24
|
+
json (>= 1.2.0)
|
25
|
+
text-format (>= 1.0.0)
|
26
|
+
highline (1.5.2)
|
27
|
+
jeweler (1.4.0)
|
28
|
+
gemcutter (>= 0.1.0)
|
29
|
+
git (>= 1.2.5)
|
30
|
+
rubyforge (>= 2.0.0)
|
31
|
+
json (1.4.6)
|
32
|
+
json_pure (1.4.6)
|
33
|
+
linecache (0.43)
|
34
|
+
mocha (0.9.10)
|
35
|
+
rake
|
36
|
+
nokogiri (1.4.4)
|
37
|
+
rack (1.1.0)
|
38
|
+
rails (2.3.8)
|
39
|
+
actionmailer (= 2.3.8)
|
40
|
+
actionpack (= 2.3.8)
|
41
|
+
activerecord (= 2.3.8)
|
42
|
+
activeresource (= 2.3.8)
|
43
|
+
activesupport (= 2.3.8)
|
44
|
+
rake (>= 0.8.3)
|
45
|
+
rake (0.8.7)
|
46
|
+
rspec (1.3.0)
|
47
|
+
rspec-rails (1.3.2)
|
48
|
+
rack (>= 1.0.0)
|
49
|
+
rspec (>= 1.3.0)
|
50
|
+
ruby-debug (0.10.3)
|
51
|
+
columnize (>= 0.1)
|
52
|
+
ruby-debug-base (~> 0.10.3.0)
|
53
|
+
ruby-debug-base (0.10.3)
|
54
|
+
linecache (>= 0.3)
|
55
|
+
rubyforge (2.0.4)
|
56
|
+
json_pure (>= 1.1.7)
|
57
|
+
sqlite3-ruby (1.3.1)
|
58
|
+
text-format (1.0.0)
|
59
|
+
text-hyphen (~> 1.0.0)
|
60
|
+
text-hyphen (1.0.0)
|
9
61
|
|
10
62
|
PLATFORMS
|
11
63
|
ruby
|
12
64
|
|
13
65
|
DEPENDENCIES
|
66
|
+
gemcutter (= 0.6.1)
|
67
|
+
git (= 1.2.5)
|
68
|
+
github (= 0.4.5)
|
69
|
+
jeweler (= 1.4.0)
|
70
|
+
mocha (= 0.9.10)
|
71
|
+
nokogiri (= 1.4.4)
|
72
|
+
rails (= 2.3.8)
|
73
|
+
rake (= 0.8.7)
|
74
|
+
rspec (= 1.3.0)
|
75
|
+
rspec-rails (~> 1.3.2)
|
76
|
+
ruby-debug (= 0.10.3)
|
77
|
+
ruby-debug-base (= 0.10.3)
|
14
78
|
sitemap_generator!
|
79
|
+
sqlite3-ruby (= 1.3.1)
|
data/Rakefile
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "bundler/setup"
|
1
3
|
require 'rake'
|
2
4
|
require 'rake/rdoctask'
|
3
|
-
require 'rubygems'
|
4
|
-
gem 'rspec', '1.3.0'
|
5
5
|
require 'spec/rake/spectask'
|
6
|
+
require 'sitemap_generator/tasks'
|
6
7
|
|
7
8
|
begin
|
8
9
|
require 'jeweler'
|
@@ -18,6 +19,9 @@ begin
|
|
18
19
|
gem.add_development_dependency "rspec"
|
19
20
|
gem.add_development_dependency "nokogiri"
|
20
21
|
gem.add_development_dependency "sqlite3-ruby"
|
22
|
+
gem.add_development_dependency "jeweler"
|
23
|
+
gem.add_development_dependency "github"
|
24
|
+
gem.add_development_dependency "git"
|
21
25
|
end
|
22
26
|
Jeweler::GemcutterTasks.new
|
23
27
|
rescue LoadError
|
data/Rakefile.working
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require 'rake'
|
3
|
+
require 'rake/rdoctask'
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
|
7
|
+
require 'github'
|
8
|
+
require 'git'
|
9
|
+
#require 'jeweler'
|
10
|
+
gem 'jeweler', '1.4.0'
|
11
|
+
gem 'rspec', '1.3.0'
|
12
|
+
#gem 'rspec-rails', '1.3.2'
|
13
|
+
require 'spec'
|
14
|
+
#require 'spec/rails'
|
15
|
+
require 'spec/rake/spectask'
|
16
|
+
require 'rake'
|
17
|
+
require 'rake/testtask'
|
18
|
+
require 'rake/rdoctask'
|
19
|
+
|
20
|
+
#require 'rails'
|
21
|
+
|
22
|
+
begin
|
23
|
+
require 'jeweler'
|
24
|
+
Jeweler::Tasks.new do |gem|
|
25
|
+
gem.name = "sitemap_generator"
|
26
|
+
gem.summary = %Q{Easily generate enterprise class Sitemaps for your Rails site using a familiar Rails Routes-like DSL}
|
27
|
+
gem.description = %Q{SitemapGenerator is a Rails gem that makes it easy to generate enterprise-class Sitemaps readable by all search engines. Generated Sitemaps adhere to the Sitemap protocol specification. When you generate new Sitemaps, SitemapGenerator can automatically ping the major search engines (including Google, Yahoo and Bing) to notify them. SitemapGenerator includes rake tasks to easily manage your sitemaps.}
|
28
|
+
gem.email = "kjvarga@gmail.com"
|
29
|
+
gem.homepage = "http://github.com/kjvarga/sitemap_generator"
|
30
|
+
gem.authors = ["Karl Varga", "Adam Salter"]
|
31
|
+
gem.files = FileList["[A-Z]*", "{bin,lib,rails,templates,tasks}/**/*"]
|
32
|
+
gem.test_files = []
|
33
|
+
gem.add_development_dependency "rspec"
|
34
|
+
gem.add_development_dependency "nokogiri"
|
35
|
+
gem.add_development_dependency "sqlite3-ruby"
|
36
|
+
gem.add_development_dependency "jeweler"
|
37
|
+
gem.add_development_dependency "github"
|
38
|
+
gem.add_development_dependency "git"
|
39
|
+
end
|
40
|
+
Jeweler::GemcutterTasks.new
|
41
|
+
rescue LoadError
|
42
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# Helper methods
|
47
|
+
#
|
48
|
+
module Helpers
|
49
|
+
extend self
|
50
|
+
|
51
|
+
# Return a full local path to path fragment <tt>path</tt>
|
52
|
+
def local_path(path)
|
53
|
+
File.join(File.dirname(__FILE__), path)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Copy all of the local files into <tt>path</tt> after completely cleaning it
|
57
|
+
def prepare_path(path)
|
58
|
+
rm_rf path
|
59
|
+
mkdir_p path
|
60
|
+
cp_r(FileList["[A-Z]*", "{bin,lib,rails,templates,tasks}"], path)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
#
|
65
|
+
# Tasks
|
66
|
+
#
|
67
|
+
task :default => :test
|
68
|
+
|
69
|
+
desc "Run specs"
|
70
|
+
namespace :test do
|
71
|
+
#desc "Test as a gem, plugin and Rails 3 gem"
|
72
|
+
#task :all => ['test:gem', 'test:plugin']
|
73
|
+
|
74
|
+
desc "Run specs on a gem install"
|
75
|
+
task :gem => ['test:prepare:gem', 'multi_spec']
|
76
|
+
desc "Run specs on a plugin install"
|
77
|
+
task :plugin => ['test:prepare:plugin', 'multi_spec']
|
78
|
+
desc "Run specs on a rails3 install"
|
79
|
+
task :rails3 => ['test:prepare:rails3', 'multi_spec']
|
80
|
+
|
81
|
+
task :multi_spec do
|
82
|
+
Rake::Task['spec'].invoke
|
83
|
+
Rake::Task['spec'].reenable
|
84
|
+
end
|
85
|
+
|
86
|
+
namespace :prepare do
|
87
|
+
desc "Prepare the gem install for testing"
|
88
|
+
task :gem do
|
89
|
+
ENV["SITEMAP_RAILS"] = 'gem'
|
90
|
+
rm_rf(Helpers.local_path('spec/mock_app_gem/public/sitemap*'))
|
91
|
+
end
|
92
|
+
|
93
|
+
desc "Prepare the plugin install for testing"
|
94
|
+
task :plugin do
|
95
|
+
ENV["SITEMAP_RAILS"] = 'plugin'
|
96
|
+
Helpers.prepare_path(Helpers.local_path('spec/mock_app_plugin/vendor/plugins/sitemap_generator-1.2.3'))
|
97
|
+
rm_rf(Helpers.local_path('spec/mock_app_plugin/public/sitemap*'))
|
98
|
+
end
|
99
|
+
|
100
|
+
desc "Prepare the rails3 install for testing"
|
101
|
+
task :rails3 do
|
102
|
+
ENV["SITEMAP_RAILS"] = 'rails3'
|
103
|
+
rm_rf(Helpers.local_path('spec/mock_rails3_gem/public/sitemap*'))
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
desc "Run tests as a gem install"
|
109
|
+
task :test => ['test:gem']
|
110
|
+
|
111
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
112
|
+
spec.libs << 'lib' << 'spec'
|
113
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
114
|
+
end
|
115
|
+
task :spec => :check_dependencies
|
116
|
+
|
117
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
118
|
+
spec.libs << 'lib' << 'spec'
|
119
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
120
|
+
spec.rcov = true
|
121
|
+
end
|
122
|
+
|
123
|
+
desc 'Generate documentation'
|
124
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
125
|
+
rdoc.rdoc_dir = 'rdoc'
|
126
|
+
rdoc.title = 'SitemapGenerator'
|
127
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
128
|
+
rdoc.rdoc_files.include('README.md')
|
129
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
130
|
+
end
|
131
|
+
|
132
|
+
namespace :release do
|
133
|
+
|
134
|
+
desc "Release a new patch version"
|
135
|
+
task :patch do
|
136
|
+
Rake::Task['version:bump:patch'].invoke
|
137
|
+
Rake::Task['release:current'].invoke
|
138
|
+
end
|
139
|
+
|
140
|
+
desc "Release the current version (e.g. after a version bump). This rebuilds the gemspec, pushes the updated code, tags it and releases to RubyGems"
|
141
|
+
task :current do
|
142
|
+
Rake::Task['github:release'].invoke
|
143
|
+
Rake::Task['git:release'].invoke
|
144
|
+
Rake::Task['gemcutter:release'].invoke
|
145
|
+
end
|
146
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.8
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'builder'
|
2
1
|
require 'zlib'
|
3
2
|
require 'action_view' # for number_to_human_size
|
4
3
|
require 'fileutils'
|
@@ -138,8 +137,8 @@ module SitemapGenerator
|
|
138
137
|
|
139
138
|
# Return a summary string
|
140
139
|
def summary
|
141
|
-
uncompressed_size = number_to_human_size(filesize)
|
142
|
-
compressed_size = number_to_human_size(File.size?(full_path))
|
140
|
+
uncompressed_size = number_to_human_size(filesize) rescue "#{filesize / 8} KB"
|
141
|
+
compressed_size = number_to_human_size(File.size?(full_path)) rescue "#{File.size?(full_path) / 8} KB"
|
143
142
|
"+ #{'%-21s' % self.sitemap_path} #{'%13s' % self.link_count} links / #{'%10s' % uncompressed_size} / #{'%10s' % compressed_size} gzipped"
|
144
143
|
end
|
145
144
|
|
@@ -38,8 +38,8 @@ module SitemapGenerator
|
|
38
38
|
|
39
39
|
# Return a summary string
|
40
40
|
def summary
|
41
|
-
uncompressed_size = number_to_human_size(filesize)
|
42
|
-
compressed_size = number_to_human_size(File.size?(full_path))
|
41
|
+
uncompressed_size = number_to_human_size(filesize) rescue "#{filesize / 8} KB"
|
42
|
+
compressed_size = number_to_human_size(File.size?(full_path)) rescue "#{File.size?(full_path) / 8} KB"
|
43
43
|
"+ #{'%-21s' % self.sitemap_path} #{'%10s' % self.link_count} sitemaps / #{'%10s' % uncompressed_size} / #{'%10s' % compressed_size} gzipped"
|
44
44
|
end
|
45
45
|
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: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 8
|
10
|
+
version: 1.3.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Karl Varga
|
@@ -16,13 +16,14 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2011-01-05 00:00:00 -08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
|
-
name: rspec
|
24
23
|
prerelease: false
|
25
|
-
|
24
|
+
type: :development
|
25
|
+
name: rspec
|
26
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
27
|
none: false
|
27
28
|
requirements:
|
28
29
|
- - ">="
|
@@ -31,12 +32,26 @@ dependencies:
|
|
31
32
|
segments:
|
32
33
|
- 0
|
33
34
|
version: "0"
|
34
|
-
|
35
|
-
version_requirements: *id001
|
35
|
+
requirement: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
+
prerelease: false
|
38
|
+
type: :development
|
37
39
|
name: nokogiri
|
40
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
requirement: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
38
51
|
prerelease: false
|
39
|
-
|
52
|
+
type: :development
|
53
|
+
name: sqlite3-ruby
|
54
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
40
55
|
none: false
|
41
56
|
requirements:
|
42
57
|
- - ">="
|
@@ -45,12 +60,26 @@ dependencies:
|
|
45
60
|
segments:
|
46
61
|
- 0
|
47
62
|
version: "0"
|
63
|
+
requirement: *id003
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
prerelease: false
|
48
66
|
type: :development
|
49
|
-
|
67
|
+
name: jeweler
|
68
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
requirement: *id004
|
50
78
|
- !ruby/object:Gem::Dependency
|
51
|
-
name: sqlite3-ruby
|
52
79
|
prerelease: false
|
53
|
-
|
80
|
+
type: :development
|
81
|
+
name: github
|
82
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
54
83
|
none: false
|
55
84
|
requirements:
|
56
85
|
- - ">="
|
@@ -59,8 +88,21 @@ dependencies:
|
|
59
88
|
segments:
|
60
89
|
- 0
|
61
90
|
version: "0"
|
91
|
+
requirement: *id005
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
prerelease: false
|
62
94
|
type: :development
|
63
|
-
|
95
|
+
name: git
|
96
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
hash: 3
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
version: "0"
|
105
|
+
requirement: *id006
|
64
106
|
description: SitemapGenerator is a Rails gem that makes it easy to generate enterprise-class Sitemaps readable by all search engines. Generated Sitemaps adhere to the Sitemap protocol specification. When you generate new Sitemaps, SitemapGenerator can automatically ping the major search engines (including Google, Yahoo and Bing) to notify them. SitemapGenerator includes rake tasks to easily manage your sitemaps.
|
65
107
|
email: kjvarga@gmail.com
|
66
108
|
executables: []
|
@@ -75,6 +117,7 @@ files:
|
|
75
117
|
- MIT-LICENSE
|
76
118
|
- README.md
|
77
119
|
- Rakefile
|
120
|
+
- Rakefile.working
|
78
121
|
- VERSION
|
79
122
|
- lib/sitemap_generator.rb
|
80
123
|
- lib/sitemap_generator/builder.rb
|