Skip to content

Commit

Permalink
Add Capistrano3 support
Browse files Browse the repository at this point in the history
Add rake task for capistrano3.
  • Loading branch information
shishi committed Apr 16, 2014
1 parent a047d65 commit a47f53c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ require 'seed-fu/capistrano'
after 'deploy:update_code', 'db:seed_fu'
```

If you use Capistrano3, you should require another file.

```ruby
require 'seed-fu/capistrano3'

# Trigger the task before publishing
before 'deploy:publishing', 'db:seed_fu'
```

Bugs / Feature requests
-----------------------

Expand Down
1 change: 1 addition & 0 deletions lib/seed-fu/capistrano3.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
load File.expand_path('../../tasks/seed_fu_capistrano3.rake', __FILE__)
12 changes: 12 additions & 0 deletions lib/tasks/seed_fu_capistrano3.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace :db do
desc 'Load seed data into database'
task :seed_fu do
on roles(:db) do
within release_path do
with rails_env: fetch(:rails_env) do
execute :bundle, :exec, :rake, 'db:seed_fu'
end
end
end
end
end

0 comments on commit a47f53c

Please sign in to comment.