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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46ac0488541090a1e97170f60eaef6d7d158dcf7
4
- data.tar.gz: 3957490a7e8fa0af4f56f635f74351efcaee2ac5
3
+ metadata.gz: e2bbf800e373633072d496eb1c385c42495707c3
4
+ data.tar.gz: aa94ca4ab1331f61248a75e591d48af399d19531
5
5
  SHA512:
6
- metadata.gz: 7719e7dad8cbdae0850e1cf5ea50c86a3a237829708634ffb5b3bfe44e9fdf68fdb02fd990f5c9f3cc81fa590c80b0ba6388c5328a8bd10a304a0a7a177c68da
7
- data.tar.gz: 2651958c0a0e15d6063406b3cc8072c598656c6454a7cd9c724d22f1c8886cb29d719b50cf9e5d52be585ea5da98a5b611d4ecf638220bc64102d89b07e2855d
6
+ metadata.gz: 623e484c5b0a676072b59a43bced6893202ba0eb07966145678a862284e37944b685b0ff03028129a3f3bd3c4f85dec43e67d257f4076ebf1f44816fac787fab
7
+ data.tar.gz: 22034f516b800382e938ed58520738714d0519db9ee833d6288eeb8b07cb0e1d2ac7aabfbe41457d4c5440ed98ff2eafe7866055de497795abd950872022488c
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - 2.1.1
7
+ - 2.1.0
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in substantiate-analyser.gemspec
4
- gemspec
4
+ gemspec
@@ -1,22 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sitemap-analyser (0.0.1)
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
- mini_portile (0.6.0)
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
- sitemap-analyser!
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
@@ -67,7 +67,7 @@ module Sitemap
67
67
  end
68
68
  end
69
69
 
70
- # If query strings enabled, remove QueryString transformer
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)
@@ -79,7 +79,7 @@ module Filters
79
79
  f = filters_clone.shift
80
80
  uris = apply_filters(uris, index, base_uri, filters_clone)
81
81
 
82
- uris = uris.select do |k|
82
+ uris = uris.select do |k,v|
83
83
  f.filter(index, k, base_uri)
84
84
  end
85
85
  end
@@ -1,3 +1,3 @@
1
1
  module Sitemap
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -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
@@ -108,7 +108,7 @@ describe Filters::ResourcesFilter do
108
108
  i = Filters::Util.apply_filters(index, Hash.new, url, filters)
109
109
  puts i
110
110
 
111
- expect(i.length).to eq 3
111
+ expect(i.length).to eq 4
112
112
 
113
113
  end
114
114
 
@@ -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)
@@ -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
- expect(i[4].to_s).to eq 'http://foo.com/foo'
43
- expect(i[5].to_s).to eq 'http://foo.com/foo'
44
- expect(i[6].to_s).to eq 'http://foo.com/foo'
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.3
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-24 00:00:00.000000000 Z
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: '0'
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: '0'
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