sitemap_generator 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2
1
+ 1.2.3
@@ -4,26 +4,26 @@ module SitemapGenerator
4
4
 
5
5
  # Copy templates/sitemap.rb to config if not there yet.
6
6
  def install_sitemap_rb(verbose=false)
7
- if File.exist?(File.join(RAILS_ROOT, 'config/sitemap.rb'))
7
+ if File.exist?(File.join(Rails.root, 'config/sitemap.rb'))
8
8
  puts "already exists: config/sitemap.rb, file not copied" if verbose
9
9
  else
10
10
  FileUtils.cp(
11
11
  SitemapGenerator.templates.template_path(:sitemap_sample),
12
- File.join(RAILS_ROOT, 'config/sitemap.rb'))
12
+ File.join(Rails.root, 'config/sitemap.rb'))
13
13
  puts "created: config/sitemap.rb" if verbose
14
14
  end
15
15
  end
16
16
 
17
17
  # Remove config/sitemap.rb if exists.
18
18
  def uninstall_sitemap_rb
19
- if File.exist?(File.join(RAILS_ROOT, 'config/sitemap.rb'))
20
- File.rm(File.join(RAILS_ROOT, 'config/sitemap.rb'))
19
+ if File.exist?(File.join(Rails.root, 'config/sitemap.rb'))
20
+ File.rm(File.join(Rails.root, 'config/sitemap.rb'))
21
21
  end
22
22
  end
23
23
 
24
24
  # Clean sitemap files in output directory.
25
25
  def clean_files
26
- FileUtils.rm(Dir[File.join(RAILS_ROOT, 'public/sitemap*.xml.gz')])
26
+ FileUtils.rm(Dir[File.join(Rails.root, 'public/sitemap*.xml.gz')])
27
27
  end
28
28
 
29
29
  # Returns a boolean indicating whether this environment is Rails 3
@@ -33,4 +33,4 @@ module SitemapGenerator
33
33
  Rails.version.to_f >= 3
34
34
  end
35
35
  end
36
- end
36
+ 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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 2
10
- version: 1.2.2
9
+ - 3
10
+ version: 1.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Karl Varga
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-18 00:00:00 -07:00
19
+ date: 2010-10-25 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency