Update for Spree 1.0.x and 1.1.x compatibility.
This commit is contained in:
parent
76fa39a656
commit
269c4490a0
|
@ -7,5 +7,7 @@
|
||||||
# "0.60.x" => { :branch => "0-60-stable" }
|
# "0.60.x" => { :branch => "0-60-stable" }
|
||||||
# "0.40.x" => { :tag => "v1.0.0", :version => "1.0.0" }
|
# "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"}
|
"0.30.x" => { :tag => "v3.0.2"}
|
||||||
|
|
|
@ -2,7 +2,7 @@ module SpreeSitemapGenerator::SpreeDefaults
|
||||||
def default_url_options
|
def default_url_options
|
||||||
{:host => SitemapGenerator::Sitemap.default_host}
|
{:host => SitemapGenerator::Sitemap.default_host}
|
||||||
end
|
end
|
||||||
include ::Rails.application.routes.url_helpers
|
include Spree::Core::Engine.routes.url_helpers
|
||||||
|
|
||||||
def add_login(options={})
|
def add_login(options={})
|
||||||
add(login_path, options)
|
add(login_path, options)
|
||||||
|
@ -21,7 +21,7 @@ module SpreeSitemapGenerator::SpreeDefaults
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_products(options={})
|
def add_products(options={})
|
||||||
active_products = Product.active
|
active_products = Spree::Product.active
|
||||||
|
|
||||||
add(products_path, options.merge(:lastmod => active_products.last_updated))
|
add(products_path, options.merge(:lastmod => active_products.last_updated))
|
||||||
active_products.each do |product|
|
active_products.each do |product|
|
||||||
|
@ -30,7 +30,7 @@ module SpreeSitemapGenerator::SpreeDefaults
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_taxons(options={})
|
def add_taxons(options={})
|
||||||
Taxon.roots.each {|taxon| add_taxon(taxon, options) }
|
Spree::Taxon.roots.each {|taxon| add_taxon(taxon, options) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_taxon(taxon, options={})
|
def add_taxon(taxon, options={})
|
||||||
|
@ -38,4 +38,3 @@ module SpreeSitemapGenerator::SpreeDefaults
|
||||||
taxon.children.each {|child| add_taxon(child, options) }
|
taxon.children.each {|child| add_taxon(child, options) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,6 @@ Gem::Specification.new do |s|
|
||||||
s.require_path = 'lib'
|
s.require_path = 'lib'
|
||||||
s.requirements << 'none'
|
s.requirements << 'none'
|
||||||
|
|
||||||
s.add_dependency('spree_core', '>= 0.70.0')
|
s.add_dependency('spree_core', '>= 1.0.0')
|
||||||
s.add_dependency('sitemap_generator', '>= 2.0.1')
|
s.add_dependency('sitemap_generator', '~> 2.2.1')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue