Update for Spree 1.0.x and 1.1.x compatibility.

This commit is contained in:
Jeff Dutil 2012-03-24 04:33:40 -04:00
parent 76fa39a656
commit 269c4490a0
3 changed files with 8 additions and 7 deletions

View File

@ -7,5 +7,7 @@
# "0.60.x" => { :branch => "0-60-stable" }
# "0.40.x" => { :tag => "v1.0.0", :version => "1.0.0" }
"0.70.x" => { :branch => "master"}
"1.1.x" => { :branch => "master"}
"1.0.x" => { :branch => "master"}
"0.70.x" => { :ref => "76fa39a65680076c4d0a7b8c6c562e3a618426b7" }
"0.30.x" => { :tag => "v3.0.2"}

View File

@ -2,7 +2,7 @@ module SpreeSitemapGenerator::SpreeDefaults
def default_url_options
{:host => SitemapGenerator::Sitemap.default_host}
end
include ::Rails.application.routes.url_helpers
include Spree::Core::Engine.routes.url_helpers
def add_login(options={})
add(login_path, options)
@ -21,7 +21,7 @@ module SpreeSitemapGenerator::SpreeDefaults
end
def add_products(options={})
active_products = Product.active
active_products = Spree::Product.active
add(products_path, options.merge(:lastmod => active_products.last_updated))
active_products.each do |product|
@ -30,7 +30,7 @@ module SpreeSitemapGenerator::SpreeDefaults
end
def add_taxons(options={})
Taxon.roots.each {|taxon| add_taxon(taxon, options) }
Spree::Taxon.roots.each {|taxon| add_taxon(taxon, options) }
end
def add_taxon(taxon, options={})
@ -38,4 +38,3 @@ module SpreeSitemapGenerator::SpreeDefaults
taxon.children.each {|child| add_taxon(child, options) }
end
end

View File

@ -15,6 +15,6 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'
s.add_dependency('spree_core', '>= 0.70.0')
s.add_dependency('sitemap_generator', '>= 2.0.1')
s.add_dependency('spree_core', '>= 1.0.0')
s.add_dependency('sitemap_generator', '~> 2.2.1')
end