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 CHANGED
@@ -1,3 +1,5 @@
1
+ v0.6.68. Bugfix in untested package installation code, plus new test.
2
+
1
3
  v0.6.67. Binaries fixed to reference new (proper) namespace.
2
4
 
3
5
  v0.6.65. Tweaks and tests for package installation code.
@@ -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
- package_name = best_package_matching patterns
19
- install_package package_name, options
18
+ package = best_package_matching patterns
19
+ package ? install_package(package[:name], options) : false
20
20
  end
21
21
 
22
22
  # Installs a package.
@@ -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.67"
5
+ s.version = "0.6.68"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Victor Costan"]
@@ -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: 129
4
+ hash: 143
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 67
10
- version: 0.6.67
9
+ - 68
10
+ version: 0.6.68
11
11
  platform: ruby
12
12
  authors:
13
13
  - Victor Costan