rails_pwnerer 0.6.67 → 0.6.68
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/base/packages.rb +2 -2
- data/rails_pwnerer.gemspec +1 -1
- data/test/base_package_test.rb +6 -0
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -15,8 +15,8 @@ module RailsPwnerer::Base
|
|
15
15
|
#
|
16
16
|
# Returns true for success, false if something went wrong.
|
17
17
|
def install_package_matching(patterns, options = {})
|
18
|
-
|
19
|
-
install_package
|
18
|
+
package = best_package_matching patterns
|
19
|
+
package ? install_package(package[:name], options) : false
|
20
20
|
end
|
21
21
|
|
22
22
|
# Installs a package.
|
data/rails_pwnerer.gemspec
CHANGED
data/test/base_package_test.rb
CHANGED
@@ -91,6 +91,12 @@ class BasePackageTest < Test::Unit::TestCase
|
|
91
91
|
assert @base.install_package('hello')
|
92
92
|
end
|
93
93
|
|
94
|
+
def test_install_package_matching
|
95
|
+
command = "env DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical DEBCONF_TERSE=yes apt-get install -qq -y hello"
|
96
|
+
flexmock(Kernel).should_receive(:system).with(command).and_return(true)
|
97
|
+
assert @base.install_package_matching('hello')
|
98
|
+
end
|
99
|
+
|
94
100
|
def test_install_package_from_sources
|
95
101
|
c1 = "env DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical DEBCONF_TERSE=yes apt-get build-dep -qq -y hello"
|
96
102
|
flexmock(Kernel).should_receive(:system).with(c1).and_return(true)
|
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: 143
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 68
|
10
|
+
version: 0.6.68
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Victor Costan
|