blacklight-sitemap 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,15 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- diff-lcs (1.1.2)
4
+ diff-lcs (1.1.3)
5
5
  git (1.2.5)
6
- jeweler (1.5.1)
6
+ jeweler (1.5.2)
7
7
  bundler (~> 1.0.0)
8
8
  git (>= 1.2.5)
9
9
  rake
10
- nokogiri (1.4.4)
11
- rake (0.8.7)
12
- rcov (0.9.9)
10
+ nokogiri (1.5.0)
11
+ rake (0.9.2)
12
+ rcov (0.9.10)
13
13
  rspec (2.1.0)
14
14
  rspec-core (~> 2.1.0)
15
15
  rspec-expectations (~> 2.1.0)
@@ -8,7 +8,7 @@ Rake task for creating a sitemap from a Blacklight Solr index.
8
8
  of this gem.
9
9
 
10
10
  * In Gemfile
11
- gem 'blacklight-sitemap'
11
+ gem 'blacklight-sitemap', '~> 1.0.0'
12
12
 
13
13
  * Install the gem:
14
14
  bundle install
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -3,6 +3,12 @@ require 'nokogiri'
3
3
  require 'rake'
4
4
  require 'fileutils'
5
5
 
6
+ # allow this to work for rake 0.8.7 and 0.9.x without deprecation warnings
7
+ begin
8
+ include Rake::DSL
9
+ rescue
10
+ end
11
+
6
12
  module Rake
7
13
  class BlacklightSitemapTask
8
14
  # base url used for all locations
@@ -101,7 +107,7 @@ module Rake
101
107
  end
102
108
  end
103
109
  end
104
- sitemap_filename = File.join(RAILS_ROOT, 'public', @base_filename + '-sitemap' + batch_number.to_s + '.xml')
110
+ sitemap_filename = File.join(Rails.root, 'public', @base_filename + '-sitemap' + batch_number.to_s + '.xml')
105
111
  File.open(sitemap_filename, 'w') do |fh|
106
112
  fh.puts sitemap_builder.to_xml
107
113
  end
@@ -130,7 +136,7 @@ module Rake
130
136
  end
131
137
  end
132
138
  end #sitemap_index_builder
133
- index_sitemap_filename = File.join(RAILS_ROOT, 'public', @base_filename + '-sitemap.xml')
139
+ index_sitemap_filename = File.join(Rails.root, 'public', @base_filename + '-sitemap.xml')
134
140
  File.open(index_sitemap_filename, 'w') do |fh|
135
141
  fh.puts sitemap_index_builder.to_xml
136
142
  end
@@ -148,7 +154,7 @@ module Rake
148
154
  desc 'clobber sitemap files'
149
155
  task :clobber do
150
156
  puts "Deleting all sitemap files..."
151
- Dir.glob(File.join(RAILS_ROOT, 'public', @base_filename + '-sitemap*')).each do |sitemap|
157
+ Dir.glob(File.join(Rails.root, 'public', @base_filename + '-sitemap*')).each do |sitemap|
152
158
  FileUtils.rm(sitemap)
153
159
  end
154
160
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-sitemap
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Ronallo
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-01 00:00:00 -04:00
18
+ date: 2011-09-10 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency