sitemap-generator 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +14 -6
- data/README.md +5 -9
- data/lib/sitemap/command.rb +1 -1
- data/lib/sitemap/commands/sitemap.rb +1 -2
- data/lib/sitemap/filters/filters.rb +1 -1
- data/lib/sitemap/version.rb +1 -1
- data/sitemap-generator.gemspec +2 -1
- data/spec/filter_spec.rb +1 -1
- data/spec/generator_spec.rb +0 -2
- data/spec/transform_spec.rb +3 -4
- metadata +21 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2bbf800e373633072d496eb1c385c42495707c3
|
4
|
+
data.tar.gz: aa94ca4ab1331f61248a75e591d48af399d19531
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 623e484c5b0a676072b59a43bced6893202ba0eb07966145678a862284e37944b685b0ff03028129a3f3bd3c4f85dec43e67d257f4076ebf1f44816fac787fab
|
7
|
+
data.tar.gz: 22034f516b800382e938ed58520738714d0519db9ee833d6288eeb8b07cb0e1d2ac7aabfbe41457d4c5440ed98ff2eafe7866055de497795abd950872022488c
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,22 +1,29 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sitemap-
|
4
|
+
sitemap-generator (0.0.3)
|
5
5
|
clamp
|
6
6
|
json
|
7
7
|
log4r
|
8
|
-
nokogiri
|
8
|
+
nokogiri (= 1.5.11)
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
13
|
clamp (0.6.3)
|
14
|
+
diff-lcs (1.2.5)
|
14
15
|
json (1.8.1)
|
15
16
|
log4r (1.1.10)
|
16
|
-
|
17
|
-
nokogiri (1.6.2.1)
|
18
|
-
mini_portile (= 0.6.0)
|
17
|
+
nokogiri (1.5.11)
|
19
18
|
rake (10.3.2)
|
19
|
+
rspec (2.14.1)
|
20
|
+
rspec-core (~> 2.14.0)
|
21
|
+
rspec-expectations (~> 2.14.0)
|
22
|
+
rspec-mocks (~> 2.14.0)
|
23
|
+
rspec-core (2.14.8)
|
24
|
+
rspec-expectations (2.14.5)
|
25
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
26
|
+
rspec-mocks (2.14.6)
|
20
27
|
|
21
28
|
PLATFORMS
|
22
29
|
ruby
|
@@ -24,4 +31,5 @@ PLATFORMS
|
|
24
31
|
DEPENDENCIES
|
25
32
|
bundler (~> 1.3)
|
26
33
|
rake
|
27
|
-
|
34
|
+
rspec
|
35
|
+
sitemap-generator!
|
data/README.md
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
# Sitemap Generator
|
2
|
+
|
2
3
|
A simple command-line Sitemap generator tool. Useful for quickly auditing a website.
|
3
4
|
|
5
|
+
Distributed as a Ruby Gem [https://rubygems.org/gems/sitemap-generator], it is not intended to be a Search Engine sitemap or integrated CMS/Rails/etc. - there are plenty of other gems that do that well.
|
6
|
+
|
7
|
+
[![Gem Version](https://badge.fury.io/rb/sitemap-generator.svg)](http://badge.fury.io/rb/sitemap-generator)
|
8
|
+
[![Build Status](https://travis-ci.org/mefellows/sitemap-generator.svg)](https://travis-ci.org/mefellows/sitemap-generator)
|
4
9
|
## Getting started
|
5
10
|
|
6
11
|
gem install sitemap-generator
|
7
12
|
|
8
|
-
*Getting started with code*
|
9
|
-
|
10
|
-
If you want to get your hands dirty in code:
|
11
|
-
|
12
|
-
git clone https://github.com/mefellows/sitemap-generator
|
13
|
-
cd sitemap-generator
|
14
|
-
bundle install
|
15
|
-
bin/sitemap
|
16
|
-
|
17
13
|
## Examples
|
18
14
|
|
19
15
|
### Generate a standard CSV Sitemap file
|
data/lib/sitemap/command.rb
CHANGED
@@ -67,7 +67,7 @@ module Sitemap
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
# If
|
70
|
+
# If fragments enabled, remove URIFragmentFilter transformer
|
71
71
|
if fragments?
|
72
72
|
filters = filters.select do |t|
|
73
73
|
next true unless t.instance_of? Filters::URIFragmentFilter
|
@@ -103,7 +103,7 @@ class SitemapGenerator
|
|
103
103
|
end
|
104
104
|
|
105
105
|
#
|
106
|
-
# Public: Fetch a document the Internet.
|
106
|
+
# Public: Fetch a document from the Internet.
|
107
107
|
#
|
108
108
|
def fetch(uri, domain = nil, limit = 10)
|
109
109
|
uri = Filters::Util.make_URI(uri)
|
@@ -112,7 +112,6 @@ class SitemapGenerator
|
|
112
112
|
end
|
113
113
|
domain = Filters::Util.make_URI(domain)
|
114
114
|
|
115
|
-
# You should choose a better exception.
|
116
115
|
raise ArgumentError, 'too many HTTP redirects' if limit == 0
|
117
116
|
|
118
117
|
response = Net::HTTP.get_response(uri)
|
data/lib/sitemap/version.rb
CHANGED
data/sitemap-generator.gemspec
CHANGED
@@ -20,8 +20,9 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
22
|
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
23
24
|
spec.add_runtime_dependency "clamp"
|
24
25
|
spec.add_runtime_dependency "json"
|
25
26
|
spec.add_runtime_dependency "log4r"
|
26
|
-
spec.add_runtime_dependency "nokogiri"
|
27
|
+
spec.add_runtime_dependency "nokogiri", "1.5.11"
|
27
28
|
end
|
data/spec/filter_spec.rb
CHANGED
data/spec/generator_spec.rb
CHANGED
@@ -11,8 +11,6 @@ describe SitemapGenerator do
|
|
11
11
|
filters = Filters::Util.get_all_filters
|
12
12
|
transformers = Transformers::Util.get_all_transformers
|
13
13
|
|
14
|
-
# onegeek.com.au source as at 23/05/2014
|
15
|
-
|
16
14
|
# Note no trailing slash -> need to find why lack of trailing slash is an issue
|
17
15
|
link = URI::parse("http://www.onegeek.com.au")
|
18
16
|
index = generator.create_index(link, link, filters, transformers, nil, 1)
|
data/spec/transform_spec.rb
CHANGED
@@ -39,9 +39,8 @@ describe Transformers::Util do
|
|
39
39
|
i = Transformers::Util.apply_transformers(index, transformers)
|
40
40
|
|
41
41
|
expect(i.length).to eq 25
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
expect(i[7].to_s).to eq 'http://foo.com/foo'
|
42
|
+
i.each do |k,v|
|
43
|
+
expect(k.to_s.match('\?')).to eq nil
|
44
|
+
end
|
46
45
|
end
|
47
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sitemap-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mefellows
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: clamp
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +98,16 @@ dependencies:
|
|
84
98
|
name: nokogiri
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - '
|
101
|
+
- - '='
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
103
|
+
version: 1.5.11
|
90
104
|
type: :runtime
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - '
|
108
|
+
- - '='
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
110
|
+
version: 1.5.11
|
97
111
|
description: 'A basic, human readable (CSV, JSON) sitemap generator. '
|
98
112
|
email:
|
99
113
|
- matt.fellows@onegeek.com.au
|
@@ -103,6 +117,7 @@ extensions: []
|
|
103
117
|
extra_rdoc_files: []
|
104
118
|
files:
|
105
119
|
- .gitignore
|
120
|
+
- .travis.yml
|
106
121
|
- Gemfile
|
107
122
|
- Gemfile.lock
|
108
123
|
- README.md
|