Skip to content

Commit

Permalink
Merge pull request #71 from shishi/add_cap3_support
Browse files Browse the repository at this point in the history
Add Capistrano3 support
  • Loading branch information
aserafin committed Jul 15, 2014
2 parents a0ccc59 + a47f53c commit b62858b
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 b62858b

Please sign in to comment.