Skip to content
A Spree extension for redirecting old urls to new ones. Useful for when launching a new spree site.
CSS Ruby JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
config
db/migrate
lib
spec
.gitignore
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
Versionfile
spree_redirects.gemspec

README.md

Spree Redirects Build Status

Spree Redirects adds an interface for redirecting old urls to new ones. It's for when you replace an existing site with a shiny new spree site and want to avoid broken links and broken hearts.

To get a better idea of what it does, just follow the Demo instructions below...


Installation

Install spree_redirects by adding the following to your existing spree site's Gemfile:

gem 'spree_redirects', '0.2.0'

Or if you want to track the git repo, add this instead:

gem 'spree_redirects', :git => 'git://github.com/citrus/spree_redirects.git'

Now bundle up:

bundle

Then run the generator which copies the migration template into your project:

rails g spree_redirects:install

Migrate your database:

rake db:migrate

And boot up your server:

rails s

You should now be up and running at http://localhost:3000!


Testing

Clone this repo to where you develop, bundle up and run dummier to get the show started:

git clone git://github.com/citrus/spree_redirects.git
cd spree_redirects
bundle install
bundle exec dummier

This will generate a fresh rails app in test/dummy, install spree_core & spree_redirects, then migrate the test database. Sweet.

Now just run the tests with:

bundle exec rake    

Demo

You can easily use the test/dummy app as a demo of spree_redirects. Just cd to where you develop and run:

git clone git://github.com/citrus/spree_redirects.git
cd spree_redirects
cp test/dummy_hooks/after_migrate.rb.sample test/dummy_hooks/after_migrate.rb
bundle install
bundle exec dummier
cd test/dummy
rails s

Now log into the admin, click the 'Configuration' tab, then click 'Manage Redirects'. Try adding a redirect for /shop.php that points to /products, then visit http://localhost:3000/shop.php. You should be redirected to /products.


Contributors

So far it's just me; Spencer Steffen.

If you'd like to help out feel free to fork and send me pull requests!


Change Log

2012/5/7

  • Add support for spree 1.1.x

2012/3/14

  • Add support for spree 1.0.x

0.2.0 - 2012/1/5

  • Add support for spree 0.70.x and above
  • Remove spork development dependency

0.1.0 - 2011/6/1

  • Initial Release

License

Copyright (c) 2011 - 2012 Spencer Steffen and Citrus, released under the New BSD License All rights reserved.

Something went wrong with that request. Please try again.