sitemap_generator 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/.autotest +36 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +131 -0
  4. data/Rakefile +29 -0
  5. data/VERSION +1 -0
  6. data/init.rb +2 -0
  7. data/install.rb +13 -0
  8. data/lib/sitemap_generator.rb +10 -0
  9. data/lib/sitemap_generator/helper.rb +59 -0
  10. data/lib/sitemap_generator/link.rb +19 -0
  11. data/lib/sitemap_generator/link_set.rb +28 -0
  12. data/lib/sitemap_generator/mapper.rb +16 -0
  13. data/lib/sitemap_generator/tasks.rb +1 -0
  14. data/tasks/sitemap_generator_tasks.rake +74 -0
  15. data/templates/sitemap.rb +30 -0
  16. data/templates/sitemap_index.builder +22 -0
  17. data/templates/xml_sitemap.builder +15 -0
  18. data/test/mock_app/.gitignore +3 -0
  19. data/test/mock_app/README +243 -0
  20. data/test/mock_app/Rakefile +10 -0
  21. data/test/mock_app/app/controllers/application_controller.rb +10 -0
  22. data/test/mock_app/app/controllers/contents_controller.rb +85 -0
  23. data/test/mock_app/app/models/content.rb +2 -0
  24. data/test/mock_app/config/boot.rb +110 -0
  25. data/test/mock_app/config/database.yml +5 -0
  26. data/test/mock_app/config/environment.rb +41 -0
  27. data/test/mock_app/config/environments/development.rb +17 -0
  28. data/test/mock_app/config/environments/production.rb +28 -0
  29. data/test/mock_app/config/environments/test.rb +28 -0
  30. data/test/mock_app/config/initializers/backtrace_silencers.rb +7 -0
  31. data/test/mock_app/config/initializers/inflections.rb +10 -0
  32. data/test/mock_app/config/initializers/mime_types.rb +5 -0
  33. data/test/mock_app/config/initializers/new_rails_defaults.rb +19 -0
  34. data/test/mock_app/config/initializers/session_store.rb +15 -0
  35. data/test/mock_app/config/locales/en.yml +5 -0
  36. data/test/mock_app/config/routes.rb +45 -0
  37. data/test/mock_app/config/sitemap.rb +13 -0
  38. data/test/mock_app/db/migrate/20090826121911_create_contents.rb +12 -0
  39. data/test/mock_app/db/schema.rb +20 -0
  40. data/test/mock_app/db/test.sqlite3 +0 -0
  41. data/test/mock_app/public/index.html +275 -0
  42. data/test/mock_app/script/console +3 -0
  43. data/test/sitemap_generator_test.rb +19 -0
  44. data/test/test_helper.rb +11 -0
  45. data/uninstall.rb +4 -0
  46. metadata +117 -0
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/console'
@@ -0,0 +1,19 @@
1
+ require File.dirname(__FILE__) + '/test_helper'
2
+
3
+ class SitemapGeneratorTest < Test::Unit::TestCase
4
+ context "SitemapGenerator Rake Task" do
5
+ setup do
6
+ ::Rake::Task['sitemap:refresh'].invoke
7
+ end
8
+
9
+ should "fail if hostname not defined" do
10
+ end
11
+ end
12
+
13
+ context "SitemapGenerator library" do
14
+ should "be have x elements" do
15
+ assert_equal SitemapGenerator::Sitemap.links.size, 14
16
+ end
17
+ end
18
+ end
19
+
@@ -0,0 +1,11 @@
1
+ ENV['RAILS_ENV'] = 'test'
2
+ ENV['RAILS_ROOT'] ||= File.join(File.dirname(__FILE__), 'mock_app')
3
+
4
+ require File.expand_path(File.join(ENV['RAILS_ROOT'], 'config', 'environment.rb'))
5
+
6
+ require 'rake'
7
+ require 'shoulda'
8
+
9
+ require 'rake/testtask'
10
+ require 'rake/rdoctask'
11
+ require 'tasks/rails'
data/uninstall.rb ADDED
@@ -0,0 +1,4 @@
1
+ # Uninstall hook code here
2
+
3
+ new_sitemap = File.join(RAILS_ROOT, 'config/sitemap.rb')
4
+ File.rm(new_sitemap) if File.exist?(new_sitemap)
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sitemap_generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Adam Salter
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-10-30 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: This plugin enables 'enterprise-class' Google Sitemaps to be easily generated for a Rails site as a rake task
17
+ email: "adam@salter.net "
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.md
24
+ files:
25
+ - .autotest
26
+ - MIT-LICENSE
27
+ - README.md
28
+ - Rakefile
29
+ - VERSION
30
+ - init.rb
31
+ - install.rb
32
+ - lib/sitemap_generator.rb
33
+ - lib/sitemap_generator/helper.rb
34
+ - lib/sitemap_generator/link.rb
35
+ - lib/sitemap_generator/link_set.rb
36
+ - lib/sitemap_generator/mapper.rb
37
+ - lib/sitemap_generator/tasks.rb
38
+ - tasks/sitemap_generator_tasks.rake
39
+ - templates/sitemap.rb
40
+ - templates/sitemap_index.builder
41
+ - templates/xml_sitemap.builder
42
+ - test/mock_app/.gitignore
43
+ - test/mock_app/README
44
+ - test/mock_app/Rakefile
45
+ - test/mock_app/app/controllers/application_controller.rb
46
+ - test/mock_app/app/controllers/contents_controller.rb
47
+ - test/mock_app/app/models/content.rb
48
+ - test/mock_app/config/boot.rb
49
+ - test/mock_app/config/database.yml
50
+ - test/mock_app/config/environment.rb
51
+ - test/mock_app/config/environments/development.rb
52
+ - test/mock_app/config/environments/production.rb
53
+ - test/mock_app/config/environments/test.rb
54
+ - test/mock_app/config/initializers/backtrace_silencers.rb
55
+ - test/mock_app/config/initializers/inflections.rb
56
+ - test/mock_app/config/initializers/mime_types.rb
57
+ - test/mock_app/config/initializers/new_rails_defaults.rb
58
+ - test/mock_app/config/initializers/session_store.rb
59
+ - test/mock_app/config/locales/en.yml
60
+ - test/mock_app/config/routes.rb
61
+ - test/mock_app/config/sitemap.rb
62
+ - test/mock_app/db/migrate/20090826121911_create_contents.rb
63
+ - test/mock_app/db/schema.rb
64
+ - test/mock_app/db/test.sqlite3
65
+ - test/mock_app/public/index.html
66
+ - test/mock_app/script/console
67
+ - test/sitemap_generator_test.rb
68
+ - test/test_helper.rb
69
+ - uninstall.rb
70
+ has_rdoc: true
71
+ homepage: http://github.com/adamsalter/sitemap_generator-plugin
72
+ licenses: []
73
+
74
+ post_install_message:
75
+ rdoc_options:
76
+ - --charset=UTF-8
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "0"
84
+ version:
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: "0"
90
+ version:
91
+ requirements: []
92
+
93
+ rubyforge_project:
94
+ rubygems_version: 1.3.5
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: This plugin enables 'enterprise-class' Google Sitemaps to be easily generated for a Rails site as a rake task
98
+ test_files:
99
+ - test/mock_app/app/controllers/application_controller.rb
100
+ - test/mock_app/app/controllers/contents_controller.rb
101
+ - test/mock_app/app/models/content.rb
102
+ - test/mock_app/config/boot.rb
103
+ - test/mock_app/config/environment.rb
104
+ - test/mock_app/config/environments/development.rb
105
+ - test/mock_app/config/environments/production.rb
106
+ - test/mock_app/config/environments/test.rb
107
+ - test/mock_app/config/initializers/backtrace_silencers.rb
108
+ - test/mock_app/config/initializers/inflections.rb
109
+ - test/mock_app/config/initializers/mime_types.rb
110
+ - test/mock_app/config/initializers/new_rails_defaults.rb
111
+ - test/mock_app/config/initializers/session_store.rb
112
+ - test/mock_app/config/routes.rb
113
+ - test/mock_app/config/sitemap.rb
114
+ - test/mock_app/db/migrate/20090826121911_create_contents.rb
115
+ - test/mock_app/db/schema.rb
116
+ - test/sitemap_generator_test.rb
117
+ - test/test_helper.rb