capistrano-rails-dbinit 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d78d80d2d22315b951d3e67beab62a237d72d371
4
+ data.tar.gz: e6a3cc2799afd62188959041f089a469f0c9ec63
5
+ SHA512:
6
+ metadata.gz: 0ede1fb21c690e8a273723019d3994c34e034bf7f202d7976ef870677534bf600ccd5bd4e88d4377b456959b4c15413acd5ce521eef14fc90aa7f1e8ad48dc8d
7
+ data.tar.gz: c75e3a435fdd8db0f570cf4322bafbd0efa7c35a905aa66045922bfbb4cf2b743fabd42ecdcb199aed48c465744522bec97cab0697440ceaa66ea3aabbd0bb00
@@ -4,7 +4,7 @@ Capistrano::Configuration.instance.load do
4
4
  namespace :deploy do
5
5
  namespace :db do
6
6
  def run_rake(task)
7
- run "cd #{current_path} && bundle exec rake #{task} RAILS_ENV=#{rails_env}"
7
+ run "cd #{release_path} && bundle exec rake #{task} RAILS_ENV=#{rails_env}"
8
8
  end
9
9
 
10
10
  desc "Create Database"
@@ -12,7 +12,7 @@ Capistrano::Configuration.instance.load do
12
12
  run_rake("db:create")
13
13
  end
14
14
 
15
- desc "Create Database"
15
+ desc "Drop Database"
16
16
  task :drop, {:roles => :db, :only => {:primary => true}} do
17
17
  run_rake("db:drop")
18
18
  end
@@ -23,15 +23,6 @@ Capistrano::Configuration.instance.load do
23
23
  end
24
24
 
25
25
  task :init, {:roles => :db, :only => {:primary => true}} do
26
- tasks = %w(deploy:update_code
27
- deploy:create_symlink
28
- db:symlink
29
- deploy:db:drop
30
- deploy:db:create
31
- deploy:migrate
32
- deploy:db:seed)
33
-
34
-
35
26
  if ENV["FORCE_DEPLOY_DB_INIT"] == nil
36
27
  agree = Capistrano::CLI.ui.agree("deploy:db:init will DROP your database. Are you sure? (Yes, No)") do |q|
37
28
  q.default = 'No'
@@ -39,10 +30,11 @@ Capistrano::Configuration.instance.load do
39
30
  end
40
31
 
41
32
  transaction do
42
- tasks.each do |name|
43
- task = top.find_task(name)
44
- invoke_task_directly_without_callbacks(task)
45
- end
33
+ deploy.update_code
34
+ db.drop
35
+ db.create
36
+ deploy.migrate
37
+ db.seed
46
38
  end
47
39
  end
48
40
  end
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module Rails
3
3
  module Dbinit
4
- VERSION = "0.0.2"
4
+ VERSION = "0.1.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-rails-dbinit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Takeshi KOMIYA
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-11 00:00:00.000000000 Z
11
+ date: 2013-08-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: capistrano
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: capistrano_database_yml
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: Capistrano tasks to initialize database for Rails Apps
@@ -60,26 +55,25 @@ files:
60
55
  - lib/capistrano-rails-dbinit/version.rb
61
56
  homepage: https://github.com/tk0miya/capistrano-rails-dbinit
62
57
  licenses: []
58
+ metadata: {}
63
59
  post_install_message:
64
60
  rdoc_options: []
65
61
  require_paths:
66
62
  - lib
67
63
  required_ruby_version: !ruby/object:Gem::Requirement
68
- none: false
69
64
  requirements:
70
- - - ! '>='
65
+ - - '>='
71
66
  - !ruby/object:Gem::Version
72
67
  version: '0'
73
68
  required_rubygems_version: !ruby/object:Gem::Requirement
74
- none: false
75
69
  requirements:
76
- - - ! '>='
70
+ - - '>='
77
71
  - !ruby/object:Gem::Version
78
72
  version: '0'
79
73
  requirements: []
80
74
  rubyforge_project:
81
- rubygems_version: 1.8.24
75
+ rubygems_version: 2.0.2
82
76
  signing_key:
83
- specification_version: 3
77
+ specification_version: 4
84
78
  summary: Capistrano tasks to initialize database for Rails Apps
85
79
  test_files: []