ohai 0.6.14.rc.1 → 6.14.0.rc.1
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.
|
@@ -38,8 +38,15 @@ elsif File.exists?("/etc/enterprise-release")
|
|
|
38
38
|
platform "oracle"
|
|
39
39
|
platform_version get_redhatish_version(contents)
|
|
40
40
|
elsif File.exists?("/etc/debian_version")
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
# Ubuntu and Debian both have /etc/debian_version
|
|
42
|
+
# Ubuntu should always have a working lsb, debian does not by default
|
|
43
|
+
if lsb[:id] =~ /Ubuntu/i
|
|
44
|
+
platform "ubuntu"
|
|
45
|
+
platform_version lsb[:release]
|
|
46
|
+
else
|
|
47
|
+
platform "debian"
|
|
48
|
+
platform_version File.read("/etc/debian_version").chomp
|
|
49
|
+
end
|
|
43
50
|
elsif File.exists?("/etc/redhat-release")
|
|
44
51
|
contents = File.read("/etc/redhat-release").chomp
|
|
45
52
|
platform get_redhatish_platform(contents)
|
|
@@ -54,9 +54,8 @@ File.open("/etc/release") do |file|
|
|
|
54
54
|
platform "solaris2"
|
|
55
55
|
when /^\s*(NexentaCore)\s.*$/
|
|
56
56
|
platform "nexentacore"
|
|
57
|
-
when /^\s*(SmartOS)\s
|
|
57
|
+
when /^\s*(SmartOS)\s.*$/
|
|
58
58
|
platform "smartos"
|
|
59
|
-
platform_version $2
|
|
60
59
|
end
|
|
61
60
|
end
|
|
62
61
|
end
|
data/lib/ohai/version.rb
CHANGED
|
@@ -52,7 +52,6 @@ describe Ohai::System, "Linux plugin platform" do
|
|
|
52
52
|
it "should set platform to lowercased lsb[:id]" do
|
|
53
53
|
@ohai._require_plugin("linux::platform")
|
|
54
54
|
@ohai[:platform].should == "ubuntu"
|
|
55
|
-
|
|
56
55
|
end
|
|
57
56
|
|
|
58
57
|
it "should set platform_version to lsb[:release]" do
|
|
@@ -124,6 +123,13 @@ describe Ohai::System, "Linux plugin platform" do
|
|
|
124
123
|
@ohai[:platform_version].should == "5.0"
|
|
125
124
|
end
|
|
126
125
|
|
|
126
|
+
# Ubuntu has /etc/debian_version as well
|
|
127
|
+
it "should detect Ubuntu as itself rather than debian" do
|
|
128
|
+
@ohai[:lsb][:id] = "Ubuntu"
|
|
129
|
+
@ohai[:lsb][:release] = "8.04"
|
|
130
|
+
@ohai._require_plugin("linux::platform")
|
|
131
|
+
@ohai[:platform].should == "ubuntu"
|
|
132
|
+
end
|
|
127
133
|
end
|
|
128
134
|
|
|
129
135
|
describe "on slackware" do
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ohai
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 15424055
|
|
5
5
|
prerelease: 7
|
|
6
6
|
segments:
|
|
7
|
-
- 0
|
|
8
7
|
- 6
|
|
9
8
|
- 14
|
|
9
|
+
- 0
|
|
10
10
|
- rc
|
|
11
11
|
- 1
|
|
12
|
-
version:
|
|
12
|
+
version: 6.14.0.rc.1
|
|
13
13
|
platform: ruby
|
|
14
14
|
authors:
|
|
15
15
|
- Adam Jacob
|
|
@@ -17,7 +17,7 @@ autorequire:
|
|
|
17
17
|
bindir: bin
|
|
18
18
|
cert_chain: []
|
|
19
19
|
|
|
20
|
-
date: 2012-05-
|
|
20
|
+
date: 2012-05-29 00:00:00 Z
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|
|
23
23
|
name: systemu
|