Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated to work with Spree 0.70.x

  • Loading branch information...
commit b62bebac3a8486e9700b28d0b3719bcc7766147c 1 parent dc80b7b
@romul authored
View
5 README.md
@@ -9,8 +9,7 @@ Installation
Add `gem "spree_address_book", :git => "git://github.com/romul/spree_address_book.git"
Run `bundle install`
- Run `rake spree_address_book:install`
- Run `rake db:migrate`
+ Run `rails g spree_address_book:install`
-Copyright (c) 2011 Roman Smirnov, released under the New BSD License
+Copyright (c) 2011-2012 Roman Smirnov, released under the New BSD License
View
0  public/javascripts/checkout.js → app/assets/javascripts/store/checkout.js
File renamed without changes
View
18 lib/generators/spree_address_book/install_generator.rb
@@ -0,0 +1,18 @@
+module SpreeAddressBook
+ module Generators
+ class InstallGenerator < Rails::Generators::Base
+ def add_migrations
+ run 'bundle exec rake railties:install:migrations FROM=spree_address_book'
+ end
+
+ def run_migrations
+ res = ask "Would you like to run the migrations now? [Y/n]"
+ if res == "" || res.downcase == "y"
+ run 'bundle exec rake db:migrate'
+ else
+ puts "Skiping rake db:migrate, don't forget to run it!"
+ end
+ end
+ end
+ end
+end
View
3  lib/spree_address_book.rb
@@ -2,7 +2,8 @@
module SpreeAddressBook
class Engine < Rails::Engine
-
+ engine_name 'spree_address_book'
+
config.autoload_paths += %W(#{config.root}/lib)
def self.activate
View
25 lib/tasks/install.rake
@@ -1,25 +0,0 @@
-namespace :spree_address_book do
- desc "Copies all migrations and assets (NOTE: This will be obsolete with Rails 3.1)"
- task :install do
- Rake::Task['spree_address_book:install:migrations'].invoke
- Rake::Task['spree_address_book:install:assets'].invoke
- end
-
- namespace :install do
- desc "Copies all migrations (NOTE: This will be obsolete with Rails 3.1)"
- task :migrations do
- source = File.join(File.dirname(__FILE__), '..', '..', 'db')
- destination = File.join(Rails.root, 'db')
- Spree::FileUtilz.mirror_files(source, destination)
- end
-
- desc "Copies all assets (NOTE: This will be obsolete with Rails 3.1)"
- task :assets do
- source = File.join(File.dirname(__FILE__), '..', '..', 'public')
- destination = File.join(Rails.root, 'public')
- puts "INFO: Mirroring assets from #{source} to #{destination}"
- Spree::FileUtilz.mirror_files(source, destination)
- end
- end
-
-end
View
1  lib/tasks/spree_address_book.rake
@@ -1 +0,0 @@
-# add custom rake tasks here
Please sign in to comment.
Something went wrong with that request. Please try again.