Sha256: d074d665d2a63f7dcfaf7c51ba94427751d0a0200ee85fe8888b13a6a38cc057

Contents?: true

Size: 231 Bytes

Versions: 29

Compression:

Stored size: 231 Bytes

Contents

class RedirectLegacyProductUrl
  def initialize(app)
    @app = app
  end

  def call(env)
    if env["PATH_INFO"] =~ %r{/t/.+/p/(.+)}
      return [301, {'Location'=> "/products/#{$1}" }, []]
    end
    @app.call(env)
  end

end

Version data entries

29 entries across 29 versions & 6 rubygems

Version Path
spree_core-0.70.7 lib/redirect_legacy_product_url.rb
spree_core-0.70.6 lib/redirect_legacy_product_url.rb
apispree_core-0.0.0 lib/redirect_legacy_product_url.rb
My-Commerce_core-1.1.0 lib/redirect_legacy_product_url.rb
My-Commerce_core-1.0.0 lib/redirect_legacy_product_url.rb
MyCommerceapi-1.0.0 core/lib/redirect_legacy_product_url.rb
MyCommerce-0.0.3 core/lib/redirect_legacy_product_url.rb
rfcommerce_core-0.0.3 lib/redirect_legacy_product_url.rb
spree_core-0.60.6 lib/redirect_legacy_product_url.rb
spree_core-0.70.5 lib/redirect_legacy_product_url.rb
spree_core-0.70.4 lib/redirect_legacy_product_url.rb
spree_core-0.60.5 lib/redirect_legacy_product_url.rb
spree_core-0.70.3 lib/redirect_legacy_product_url.rb
spree_core-0.70.2 lib/redirect_legacy_product_url.rb
spree_core-0.50.4 lib/redirect_legacy_product_url.rb
spree_core-0.60.4 lib/redirect_legacy_product_url.rb
spree_core-0.50.3 lib/redirect_legacy_product_url.rb
spree_core-0.60.3 lib/redirect_legacy_product_url.rb
spree_core-0.70.1 lib/redirect_legacy_product_url.rb
spree_core-0.70.0 lib/redirect_legacy_product_url.rb