linux_admin 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in linux_admin.gemspec
4
4
  gemspec
5
-
6
- gem "more_core_extensions", "=1.1.0", :git => "git://github.com/ManageIQ/more_core_extensions.git", :tag => "v1.1.0"
@@ -7,5 +7,12 @@ class LinuxAdmin
7
7
  pkg_hash[name] = ver
8
8
  end
9
9
  end
10
+
11
+ def self.upgrade(pkg)
12
+ cmd = "rpm -U"
13
+ params = { nil => pkg }
14
+
15
+ run(cmd, :params => params).exit_status == 0
16
+ end
10
17
  end
11
18
  end
@@ -1,3 +1,3 @@
1
1
  class LinuxAdmin
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
data/linux_admin.gemspec CHANGED
@@ -33,6 +33,6 @@ registration, updates, etc.
33
33
 
34
34
  spec.add_dependency "activesupport", "< 4.0"
35
35
  spec.add_dependency "inifile", "~> 2.0.2"
36
- spec.add_dependency "more_core_extensions", "~> 1.1.0"
36
+ spec.add_dependency "more_core_extensions", "~> 1.1"
37
37
  spec.add_dependency "nokogiri"
38
38
  end
data/spec/rpm_spec.rb CHANGED
@@ -26,4 +26,9 @@ describe LinuxAdmin::Rpm do
26
26
  "zlib-devel" =>"1.2.3-29.el6",
27
27
  })
28
28
  end
29
+
30
+ it ".upgrade" do
31
+ described_class.should_receive(:run).with("rpm -U", {:params=>{nil=>"abc"}}).and_return(CommandResult.new("", "", 0))
32
+ expect(described_class.upgrade("abc")).to be_true
33
+ end
29
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linux_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-10-03 00:00:00.000000000 Z
15
+ date: 2013-10-09 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -117,7 +117,7 @@ dependencies:
117
117
  requirements:
118
118
  - - ~>
119
119
  - !ruby/object:Gem::Version
120
- version: 1.1.0
120
+ version: '1.1'
121
121
  type: :runtime
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
@@ -125,7 +125,7 @@ dependencies:
125
125
  requirements:
126
126
  - - ~>
127
127
  - !ruby/object:Gem::Version
128
- version: 1.1.0
128
+ version: '1.1'
129
129
  - !ruby/object:Gem::Dependency
130
130
  name: nokogiri
131
131
  requirement: !ruby/object:Gem::Requirement