rails_pwnerer 0.6.97 → 0.6.98
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/CHANGELOG +2 -0
- data/lib/rails_pwnerer/app/cluster_config.rb +1 -0
- data/lib/rails_pwnerer/app/files.rb +8 -3
- data/lib/rails_pwnerer/app/scripts.rb +1 -0
- data/rails_pwnerer.gemspec +2 -2
- metadata +4 -4
data/CHANGELOG
CHANGED
|
@@ -16,6 +16,7 @@ class RailsPwnerer::App::ClusterConfig
|
|
|
16
16
|
writable_dirs += app_config[:writable_dirs].split ','
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
return unless File.exist?(app_config[:app_path])
|
|
19
20
|
Dir.chdir app_config[:app_path] do
|
|
20
21
|
writable_dirs.each do |writable_dir|
|
|
21
22
|
FileUtils.mkpath writable_dir unless File.exists? writable_dir
|
|
@@ -28,8 +28,8 @@ class RailsPwnerer::App::Files
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
# pack and protect the cold copy
|
|
31
|
-
Dir.chdir
|
|
32
|
-
Kernel.system "tar -czf
|
|
31
|
+
Dir.chdir cold_copy do
|
|
32
|
+
Kernel.system "tar -czf ../../#{dump_file} ."
|
|
33
33
|
end
|
|
34
34
|
File.chmod 0400, dump_file
|
|
35
35
|
File.chown pwnerer_uid, pwnerer_gid, dump_file
|
|
@@ -66,8 +66,13 @@ class RailsPwnerer::App::Files
|
|
|
66
66
|
unless dump_file
|
|
67
67
|
dump_file = Dir.glob(File.join(backup_path, "files/#{app_name}.*")).max
|
|
68
68
|
end
|
|
69
|
-
FileUtils.
|
|
69
|
+
FileUtils.mkdir_p app_path unless File.exists? app_path
|
|
70
|
+
|
|
71
|
+
pwnerer_user = RailsPwnerer::Config[app_name, instance_name][:pwnerer_user]
|
|
72
|
+
pwnerer_uid = uid_for_username(pwnerer_user)
|
|
73
|
+
pwnerer_gid = gid_for_username(pwnerer_user)
|
|
70
74
|
File.chown(pwnerer_uid, pwnerer_gid, app_path)
|
|
75
|
+
|
|
71
76
|
Dir.chdir app_path do
|
|
72
77
|
# find the latest dump and load it in
|
|
73
78
|
system "tar -xzf #{dump_file}"
|
|
@@ -11,6 +11,7 @@ class RailsPwnerer::App::Scripts
|
|
|
11
11
|
|
|
12
12
|
return unless app_path = app_config[:app_path]
|
|
13
13
|
|
|
14
|
+
return unless File.exist?(app_config[:app_path])
|
|
14
15
|
Dir.chdir app_path do
|
|
15
16
|
script_file = Dir.glob(File.join('script/rails_pwnerer', script_name + '*')).first
|
|
16
17
|
return if script_file.nil?
|
data/rails_pwnerer.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.98"
|
|
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}]
|
|
@@ -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.7}
|
|
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: 195
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 6
|
|
9
|
-
-
|
|
10
|
-
version: 0.6.
|
|
9
|
+
- 98
|
|
10
|
+
version: 0.6.98
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Victor Costan
|
|
@@ -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.7
|
|
233
233
|
signing_key:
|
|
234
234
|
specification_version: 3
|
|
235
235
|
summary: Rails deployment hack.
|