capone 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/TODO +26 -0
- data/recipes/db.rb +5 -7
- data/recipes/replicate.rb +3 -0
- metadata +23 -9
data/TODO
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
## Features
|
2
|
+
|
3
|
+
### nginx
|
4
|
+
|
5
|
+
Capone assumes that your nginx config located in the `config/nginx.conf`
|
6
|
+
|
7
|
+
### Additional features
|
8
|
+
|
9
|
+
If your project uses delayed_job plugin:
|
10
|
+
|
11
|
+
set :delayed_job, true
|
12
|
+
|
13
|
+
If your project uses whenever plugin:
|
14
|
+
|
15
|
+
set :whenever, true
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
[ ] db.rb
|
20
|
+
|
21
|
+
release_path
|
22
|
+
current_path
|
23
|
+
previous_release
|
24
|
+
current_release
|
25
|
+
|
26
|
+
[ ] logrotate
|
data/recipes/db.rb
CHANGED
@@ -30,7 +30,7 @@ namespace :capone do
|
|
30
30
|
cmd << "--user='#{config['username'].nil? ? 'root' : config['username']}'"
|
31
31
|
cmd << "--password='#{config['password']}'" unless config["password"].nil?
|
32
32
|
cmd << config["database"]
|
33
|
-
cmd << "| bzip2 > #{
|
33
|
+
cmd << "| bzip2 > #{current_path}/db/#{rails_env}-data.sql.bz2"
|
34
34
|
run cmd.join(" ")
|
35
35
|
else
|
36
36
|
puts "Task not supported by '#{config['adapter']}'."
|
@@ -38,17 +38,15 @@ namespace :capone do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
desc <<-DESC
|
41
|
-
|
41
|
+
Dump the database for the current environment and take a local copy.
|
42
42
|
DESC
|
43
43
|
task :download_backup, :roles => :db, :only => { :primary => true } do
|
44
44
|
backup
|
45
|
-
get "#{
|
45
|
+
get "#{current_path}/db/#{rails_env}-data.sql.bz2", "db/#{rails_env}-data.sql.bz2"
|
46
46
|
end
|
47
47
|
|
48
48
|
desc <<-DESC
|
49
|
-
|
50
|
-
WARNING: this completely nukes the existing database! Use SOURCE_ENV to
|
51
|
-
specify which dump should be loaded. Defaults to 'production'."
|
49
|
+
Load an existing database dump into the development environment's database.
|
52
50
|
DESC
|
53
51
|
task :load_backup do
|
54
52
|
run_locally "rake db:drop"
|
@@ -57,7 +55,7 @@ namespace :capone do
|
|
57
55
|
config = YAML::load(File.open("config/database.yml"))[rails_env]
|
58
56
|
case config["adapter"]
|
59
57
|
when "mysql"
|
60
|
-
cmd = ["bzcat db
|
58
|
+
cmd = ["bzcat db/#{rails_env}-data.sql.bz2 | mysql"]
|
61
59
|
cmd << "--host='#{config['host']}'" unless config["host"].nil?
|
62
60
|
cmd << "--user='#{config['username'].nil? ? 'root' : config['username']}'"
|
63
61
|
cmd << "--password='#{config['password']}'" unless config["password"].nil?
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 12
|
9
|
+
version: 0.0.12
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Denis Barushev
|
@@ -9,19 +14,23 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-04-23 00:00:00 +03:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: capistrano
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 2
|
29
|
+
- 5
|
30
|
+
- 0
|
23
31
|
version: 2.5.0
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
description:
|
26
35
|
email: barushev@gmail.com
|
27
36
|
executables: []
|
@@ -31,6 +40,7 @@ extensions: []
|
|
31
40
|
extra_rdoc_files:
|
32
41
|
- LICENSE
|
33
42
|
- README.md
|
43
|
+
- TODO
|
34
44
|
files:
|
35
45
|
- LICENSE
|
36
46
|
- README.md
|
@@ -43,7 +53,9 @@ files:
|
|
43
53
|
- recipes/delayed_job.rb
|
44
54
|
- recipes/gems.rb
|
45
55
|
- recipes/nginx.rb
|
56
|
+
- recipes/replicate.rb
|
46
57
|
- recipes/whenever.rb
|
58
|
+
- TODO
|
47
59
|
has_rdoc: true
|
48
60
|
homepage: http://github.com/denis/capone
|
49
61
|
licenses: []
|
@@ -57,18 +69,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
57
69
|
requirements:
|
58
70
|
- - ">="
|
59
71
|
- !ruby/object:Gem::Version
|
72
|
+
segments:
|
73
|
+
- 0
|
60
74
|
version: "0"
|
61
|
-
version:
|
62
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
76
|
requirements:
|
64
77
|
- - ">="
|
65
78
|
- !ruby/object:Gem::Version
|
79
|
+
segments:
|
80
|
+
- 0
|
66
81
|
version: "0"
|
67
|
-
version:
|
68
82
|
requirements: []
|
69
83
|
|
70
84
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.3.
|
85
|
+
rubygems_version: 1.3.6
|
72
86
|
signing_key:
|
73
87
|
specification_version: 3
|
74
88
|
summary: Capone is the set of rake tasks and capistrano recipes.
|