rails_pwnerer 0.4.14 → 0.4.15
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/lib/pwnage/base/dirs.rb +2 -2
- data/lib/pwnage/base/packages.rb +3 -1
- data/lib/pwnage/scaffolds/packages.rb +4 -1
- data/rails_pwnerer.gemspec +2 -2
- metadata +1 -1
data/CHANGELOG
CHANGED
data/lib/pwnage/base/dirs.rb
CHANGED
@@ -25,8 +25,8 @@ module RailsPwnage::Base
|
|
25
25
|
end
|
26
26
|
|
27
27
|
# executes a block in a temporary directory
|
28
|
-
def with_temp_dir
|
29
|
-
temp_dir = "rbpwn_#{Time.now.to_i}"
|
28
|
+
def with_temp_dir(options = {})
|
29
|
+
temp_dir = "#{options[:root] ? '/' : ''}rbpwn_#{Time.now.to_i}"
|
30
30
|
Dir.mkdir temp_dir
|
31
31
|
Dir.chdir(temp_dir) { yield }
|
32
32
|
FileUtils.rm_r temp_dir
|
data/lib/pwnage/base/packages.rb
CHANGED
@@ -6,7 +6,7 @@ module RailsPwnage::Base
|
|
6
6
|
# installs a package
|
7
7
|
def install_package(package_name, options = {})
|
8
8
|
if options[:source]
|
9
|
-
with_temp_dir do
|
9
|
+
with_temp_dir(:root => true) do
|
10
10
|
system "apt-get build-dep -y #{package_name}"
|
11
11
|
system "apt-get source -b #{package_name}"
|
12
12
|
system "dpkg -i #{Dir.glob('*.deb', File::FNM_DOTMATCH).join(' ')}"
|
@@ -19,6 +19,8 @@ module RailsPwnage::Base
|
|
19
19
|
# upgrades a package to the latest version
|
20
20
|
def upgrade_package(package_name, options = {})
|
21
21
|
if options[:source]
|
22
|
+
remove_package(package_name)
|
23
|
+
|
22
24
|
install_package(package_name, :source => true)
|
23
25
|
else
|
24
26
|
system "apt-get upgrade -y #{package_name.nil ? '' : package_name}"
|
@@ -32,11 +32,14 @@ class RailsPwnage::Scaffolds::Packages
|
|
32
32
|
|
33
33
|
# the packages for a mysql server and development libraries
|
34
34
|
def install_mysql
|
35
|
-
|
35
|
+
# not installing mySQL from source because it's a pain
|
36
|
+
install_packages %w(mysql-client mysql-server libmysqlclient15-dev)
|
36
37
|
end
|
37
38
|
|
38
39
|
# the packager for _the_ load balancer (nginx, from Russia with <3)
|
39
40
|
def install_balancer
|
41
|
+
remove_packages %w(nginx)
|
42
|
+
|
40
43
|
install_packages %w(nginx), :source => true
|
41
44
|
end
|
42
45
|
|
data/rails_pwnerer.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
|
-
# Gem::Specification for Rails_pwnerer-0.4.
|
2
|
+
# Gem::Specification for Rails_pwnerer-0.4.15
|
3
3
|
# Originally generated by Echoe
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = %q{rails_pwnerer}
|
7
|
-
s.version = "0.4.
|
7
|
+
s.version = "0.4.15"
|
8
8
|
|
9
9
|
s.specification_version = 2 if s.respond_to? :specification_version=
|
10
10
|
|