rails_pwnerer 0.6.93 → 0.6.94
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/lib/rails_pwnerer/app/files.rb +7 -4
- data/lib/rails_pwnerer/app/main.rb +1 -1
- data/lib/rails_pwnerer/app/vcs/git.rb +1 -1
- data/rails_pwnerer.gemspec +3 -3
- metadata +5 -5
data/CHANGELOG
CHANGED
@@ -13,6 +13,8 @@ class RailsPwnerer::App::Files
|
|
13
13
|
dump_file = "files/#{app_name}.#{instance_name}_#{timestamp}.tar.gz"
|
14
14
|
|
15
15
|
backup_path = RailsPwnerer::Config[app_name, instance_name][:backup_path]
|
16
|
+
scaffold_backup app_name, instance_name unless File.exist?(backup_path)
|
17
|
+
|
16
18
|
app_path = RailsPwnerer::Config[app_name, instance_name][:app_path]
|
17
19
|
Dir.chdir backup_path do
|
18
20
|
# create a cold copy of the application files
|
@@ -27,7 +29,7 @@ class RailsPwnerer::App::Files
|
|
27
29
|
|
28
30
|
# pack and protect the cold copy
|
29
31
|
Dir.chdir 'tmp' do
|
30
|
-
system "tar -czf ../#{dump_file}
|
32
|
+
Kernel.system "tar -czf ../#{dump_file} ."
|
31
33
|
end
|
32
34
|
File.chmod 0400, dump_file
|
33
35
|
File.chown pwnerer_uid, pwnerer_gid, dump_file
|
@@ -64,8 +66,9 @@ class RailsPwnerer::App::Files
|
|
64
66
|
unless dump_file
|
65
67
|
dump_file = Dir.glob(File.join(backup_path, "files/#{app_name}.*")).max
|
66
68
|
end
|
67
|
-
|
68
|
-
|
69
|
+
FileUtils.mkpath backup_path unless File.exists? app_path
|
70
|
+
File.chown(pwnerer_uid, pwnerer_gid, app_path)
|
71
|
+
Dir.chdir app_path do
|
69
72
|
# find the latest dump and load it in
|
70
73
|
system "tar -xzf #{dump_file}"
|
71
74
|
end
|
@@ -84,7 +87,7 @@ class RailsPwnerer::App::Files
|
|
84
87
|
def manage(app_name, instance_name, action)
|
85
88
|
case action
|
86
89
|
when :checkpoint
|
87
|
-
dump_files app_name, instance_name
|
90
|
+
dump_files app_name, instance_name
|
88
91
|
when :rollback
|
89
92
|
drop_files app_name, instance_name
|
90
93
|
load_files app_name, instance_name
|
@@ -99,7 +99,7 @@ module RailsPwnerer::App
|
|
99
99
|
when :checkpoint
|
100
100
|
ClusterConfig.new.manage app, instance, action
|
101
101
|
Files.new.manage app, instance, action
|
102
|
-
self.update_app app, instance do
|
102
|
+
self.update_app app, instance do
|
103
103
|
Database.new.manage app, instance, action
|
104
104
|
end
|
105
105
|
when :rollback
|
@@ -22,7 +22,7 @@ class RailsPwnerer::App::Git
|
|
22
22
|
'public/javascripts', 'public/stylesheets', 'script',
|
23
23
|
'test', 'tmp', 'vendor',
|
24
24
|
].each { |dir| cleanup_app_dir app_name, instance_name, dir, app_name_is_dir }
|
25
|
-
end
|
25
|
+
end
|
26
26
|
|
27
27
|
# reverts the config changes made by rpwn, so git fetch doesn't get confused
|
28
28
|
def revert_config_changes(app_name, instance_name)
|
data/rails_pwnerer.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rails_pwnerer}
|
5
|
-
s.version = "0.6.
|
5
|
+
s.version = "0.6.94"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [%q{Victor Costan}]
|
9
|
-
s.date = %q{2011-07
|
9
|
+
s.date = %q{2011-08-07}
|
10
10
|
s.description = %q{Rails deployment hack.}
|
11
11
|
s.email = %q{victor@costan.us}
|
12
12
|
s.executables = [%q{rpwn}, %q{rpwnctl}, %q{rpwndev}]
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Rails_pwnerer}, %q{--main}, %q{README}]
|
18
18
|
s.require_paths = [%q{lib}, %q{ext}]
|
19
19
|
s.rubyforge_project = %q{rails-pwnage}
|
20
|
-
s.rubygems_version = %q{1.8.
|
20
|
+
s.rubygems_version = %q{1.8.4}
|
21
21
|
s.summary = %q{Rails deployment hack.}
|
22
22
|
s.test_files = [%q{test/base_package_test.rb}]
|
23
23
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_pwnerer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 187
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 94
|
10
|
+
version: 0.6.94
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Victor Costan
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07
|
18
|
+
date: 2011-08-07 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: zerg_support
|
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
requirements: []
|
230
230
|
|
231
231
|
rubyforge_project: rails-pwnage
|
232
|
-
rubygems_version: 1.8.
|
232
|
+
rubygems_version: 1.8.4
|
233
233
|
signing_key:
|
234
234
|
specification_version: 3
|
235
235
|
summary: Rails deployment hack.
|