capistrano-database 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,10 +13,9 @@ Gem::Specification.new do |gem|
13
13
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
14
  gem.name = 'capistrano-database'
15
15
  gem.require_paths = ['lib']
16
- gem.version = '0.0.5'
16
+ gem.version = '0.0.6'
17
17
 
18
18
  # Runtime dependencies
19
19
  gem.add_dependency 'rake'
20
- gem.add_dependency 'activesupport'
21
20
  gem.add_dependency 'capistrano-utils'
22
21
  end
@@ -103,9 +103,9 @@ Capistrano::Configuration.instance(:must_exist).load do
103
103
  end
104
104
 
105
105
  desc '[internal] Create the database user'
106
- task :create_db_user, :roles => :db do
106
+ task :create_user, :roles => :db do
107
107
  transaction do
108
- find_and_execute_db_task :create_db_user
108
+ find_and_execute_db_task :create_user
109
109
  end
110
110
  end
111
111
 
@@ -118,7 +118,7 @@ Capistrano::Configuration.instance(:must_exist).load do
118
118
 
119
119
  desc '[internal] Download the db backup file'
120
120
  task :download_backup, :roles => :db do
121
- fn = "#{random_tmp_file}.sql.bz2"
121
+ fn = "#{arguments(false).first || random_tmp_file}.bz2"
122
122
  on_rollback { `rm -f #{fn}` }
123
123
  download "#{fetch :latest_backup}.bz2", fn
124
124
  logger.important "The backup has been downloaded to #{fn}"
@@ -142,8 +142,8 @@ Capistrano::Configuration.instance(:must_exist).load do
142
142
  # Internal Dependencies
143
143
  before 'db:print_credentials', 'db:credentials'
144
144
  before 'db:print_root_credentials', 'db:root_credentials'
145
- before 'db:create_db_user', 'db:root_credentials'
146
- before 'db:create_db_user', 'db:credentials'
145
+ before 'db:create_user', 'db:root_credentials'
146
+ before 'db:create_user', 'db:credentials'
147
147
  before 'db:create_database', 'db:credentials'
148
148
  before 'db:backup', 'db:credentials'
149
149
  before 'db:import', 'db:credentials'
@@ -153,7 +153,7 @@ Capistrano::Configuration.instance(:must_exist).load do
153
153
  end
154
154
 
155
155
  # External Dependencies
156
- before 'deploy:server:setup', 'db:create_db_user'
156
+ before 'deploy:server:setup', 'db:create_user'
157
157
  after 'deploy:server:setup', 'db:create_database'
158
158
  before 'db:write_credentials', 'deploy:setup_if_needed'
159
159
  end
@@ -6,7 +6,7 @@ Capistrano::Configuration.instance(:must_exist).load do
6
6
  namespace :db do
7
7
  namespace :mysql do
8
8
  desc '[internal] Create the database user'
9
- task :create_db_user, :roles => :db do
9
+ task :create_user, :roles => :db do
10
10
  auth = fetch :db_credentials
11
11
  sauth = fetch :db_root_credentials
12
12
 
@@ -72,7 +72,7 @@ Capistrano::Configuration.instance(:must_exist).load do
72
72
 
73
73
  desc '[internal] Import a dump to the mysql database'
74
74
  task :import, :roles => :db do
75
- tmp_file = write File.read(arguments)
75
+ tmp_file = write File.read(arguments.first)
76
76
  auth = fetch :db_credentials
77
77
 
78
78
  begin
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-database
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -27,22 +27,6 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: activesupport
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
30
  - !ruby/object:Gem::Dependency
47
31
  name: capistrano-utils
48
32
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
78
  version: '0'
95
79
  segments:
96
80
  - 0
97
- hash: -3069972043424821512
81
+ hash: -421178969461404157
98
82
  requirements: []
99
83
  rubyforge_project:
100
84
  rubygems_version: 1.8.23