Browse Source

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

1-2-stable-sysmocom
Jeff Dutil 9 years ago
parent
commit
269c4490a0
  1. 4
      Versionfile
  2. 7
      lib/spree_sitemap_generator/spree_defaults.rb
  3. 4
      spree_sitemap_generator.gemspec

4
Versionfile

@ -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"}

7
lib/spree_sitemap_generator/spree_defaults.rb

@ -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

4
spree_sitemap_generator.gemspec

@ -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
Loading…
Cancel
Save