sitemap_builder 0.2.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +9 -10
- data/VERSION +1 -1
- data/lib/sitemap_builder/sitemap.rb +7 -4
- data/lib/sitemap_builder/sitemap_index.rb +1 -1
- data/sitemap_builder.gemspec +8 -13
- metadata +21 -40
data/Rakefile
CHANGED
@@ -2,7 +2,6 @@ require 'rubygems'
|
|
2
2
|
require 'bundler/setup'
|
3
3
|
require 'rake'
|
4
4
|
require 'rake/testtask'
|
5
|
-
require 'rake/rdoctask'
|
6
5
|
|
7
6
|
desc 'Default: run unit tests.'
|
8
7
|
task :default => :test
|
@@ -15,14 +14,14 @@ Rake::TestTask.new(:test) do |t|
|
|
15
14
|
t.verbose = true
|
16
15
|
end
|
17
16
|
|
18
|
-
desc 'Generate documentation for the sitemap_builder plugin.'
|
19
|
-
Rake::RDocTask.new(:rdoc) do |rdoc|
|
20
|
-
rdoc.rdoc_dir = 'rdoc'
|
21
|
-
rdoc.title = 'SitemapBuilder'
|
22
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
23
|
-
rdoc.rdoc_files.include('README')
|
24
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
25
|
-
end
|
17
|
+
#desc 'Generate documentation for the sitemap_builder plugin.'
|
18
|
+
#Rake::RDocTask.new(:rdoc) do |rdoc|
|
19
|
+
# rdoc.rdoc_dir = 'rdoc'
|
20
|
+
# rdoc.title = 'SitemapBuilder'
|
21
|
+
# rdoc.options << '--line-numbers' << '--inline-source'
|
22
|
+
# rdoc.rdoc_files.include('README')
|
23
|
+
# rdoc.rdoc_files.include('lib/**/*.rb')
|
24
|
+
#end
|
26
25
|
|
27
26
|
require 'jeweler'
|
28
27
|
Jeweler::Tasks.new do |gem|
|
@@ -32,4 +31,4 @@ Jeweler::Tasks.new do |gem|
|
|
32
31
|
gem.email = "franck.dagostini@gmail.com"
|
33
32
|
gem.homepage = "http://github.com/franck/sitemap_builder"
|
34
33
|
gem.authors = ["Franck D'agostini"]
|
35
|
-
end
|
34
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1.1.0
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'builder'
|
2
|
+
|
1
3
|
module SitemapBuilder
|
2
4
|
class Sitemap
|
3
5
|
attr_accessor :links, :default_host
|
@@ -14,7 +16,7 @@ module SitemapBuilder
|
|
14
16
|
@default_host = options[:default_host]
|
15
17
|
@filename = options[:filename]
|
16
18
|
@sitemap_folder = options[:sitemap_folder]
|
17
|
-
|
19
|
+
@ping_search_engines = options[:ping_search_engines]
|
18
20
|
@links = []
|
19
21
|
|
20
22
|
deleting_previous_sitemap(fullpath)
|
@@ -76,7 +78,8 @@ module SitemapBuilder
|
|
76
78
|
end
|
77
79
|
|
78
80
|
def save_file(xml)
|
79
|
-
|
81
|
+
puts "SAVING FILE : #{File.join(Rails.root, fullpath)}" if @debug
|
82
|
+
File.open(File.join(Rails.root, fullpath), "w+") do |f|
|
80
83
|
f.write(xml)
|
81
84
|
end
|
82
85
|
end
|
@@ -94,13 +97,13 @@ module SitemapBuilder
|
|
94
97
|
end
|
95
98
|
|
96
99
|
def deleting_previous_sitemap(sitemap)
|
97
|
-
sitemap_files = Dir[File.join(
|
100
|
+
sitemap_files = Dir[File.join(Rails.root, sitemap)]
|
98
101
|
FileUtils.rm sitemap_files, :verbose => true
|
99
102
|
end
|
100
103
|
|
101
104
|
def create_sitemap_folder(sitemap_folder)
|
102
105
|
return if sitemap_folder.blank?
|
103
|
-
path =
|
106
|
+
path = File.join(Rails.root, "/public/", sitemap_folder)
|
104
107
|
unless File.exists?(path) && File.directory?(path)
|
105
108
|
FileUtils.mkdir path, :mode => 0755, :verbose => true
|
106
109
|
end
|
data/sitemap_builder.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "
|
7
|
+
s.name = "sitemap_builder"
|
8
|
+
s.version = "1.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Franck D'agostini"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = "2014-10-16"
|
13
|
+
s.description = "Rails plugins to build sitemap.xml"
|
14
|
+
s.email = "franck.dagostini@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README"
|
17
17
|
]
|
@@ -35,17 +35,12 @@ Gem::Specification.new do |s|
|
|
35
35
|
"test/test_helper.rb",
|
36
36
|
"uninstall.rb"
|
37
37
|
]
|
38
|
-
s.homepage =
|
38
|
+
s.homepage = "http://github.com/franck/sitemap_builder"
|
39
39
|
s.require_paths = ["lib"]
|
40
|
-
s.rubygems_version =
|
41
|
-
s.summary =
|
42
|
-
s.test_files = [
|
43
|
-
"test/sitemap_builder_test.rb",
|
44
|
-
"test/test_helper.rb"
|
45
|
-
]
|
40
|
+
s.rubygems_version = "1.8.25"
|
41
|
+
s.summary = "Rails plugins to build sitemap.xml"
|
46
42
|
|
47
43
|
if s.respond_to? :specification_version then
|
48
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
49
44
|
s.specification_version = 3
|
50
45
|
|
51
46
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
metadata
CHANGED
@@ -1,32 +1,23 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sitemap_builder
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 2
|
8
|
-
- 1
|
9
|
-
version: 0.2.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Franck D'agostini
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
date: 2011-02-17 00:00:00 +01:00
|
18
|
-
default_executable:
|
12
|
+
date: 2014-10-16 00:00:00.000000000 Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description: Rails plugins to build sitemap.xml
|
22
15
|
email: franck.dagostini@gmail.com
|
23
16
|
executables: []
|
24
|
-
|
25
17
|
extensions: []
|
26
|
-
|
27
|
-
extra_rdoc_files:
|
18
|
+
extra_rdoc_files:
|
28
19
|
- README
|
29
|
-
files:
|
20
|
+
files:
|
30
21
|
- MIT-LICENSE
|
31
22
|
- README
|
32
23
|
- Rakefile
|
@@ -45,38 +36,28 @@ files:
|
|
45
36
|
- test/sitemap_builder_test.rb
|
46
37
|
- test/test_helper.rb
|
47
38
|
- uninstall.rb
|
48
|
-
has_rdoc: true
|
49
39
|
homepage: http://github.com/franck/sitemap_builder
|
50
40
|
licenses: []
|
51
|
-
|
52
41
|
post_install_message:
|
53
42
|
rdoc_options: []
|
54
|
-
|
55
|
-
require_paths:
|
43
|
+
require_paths:
|
56
44
|
- lib
|
57
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
46
|
none: false
|
59
|
-
requirements:
|
60
|
-
- -
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
|
63
|
-
|
64
|
-
version: "0"
|
65
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ! '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
52
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
- 0
|
72
|
-
version: "0"
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
73
57
|
requirements: []
|
74
|
-
|
75
58
|
rubyforge_project:
|
76
|
-
rubygems_version: 1.
|
59
|
+
rubygems_version: 1.8.25
|
77
60
|
signing_key:
|
78
61
|
specification_version: 3
|
79
62
|
summary: Rails plugins to build sitemap.xml
|
80
|
-
test_files:
|
81
|
-
- test/sitemap_builder_test.rb
|
82
|
-
- test/test_helper.rb
|
63
|
+
test_files: []
|