linux_admin 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -22,10 +22,10 @@ class LinuxAdmin
|
|
22
22
|
private
|
23
23
|
|
24
24
|
def self.registration_type_uncached
|
25
|
-
if
|
26
|
-
SubscriptionManager
|
27
|
-
elsif Rhn.new.registered?
|
25
|
+
if Rhn.new.registered?
|
28
26
|
Rhn
|
27
|
+
elsif SubscriptionManager.new.registered?
|
28
|
+
SubscriptionManager
|
29
29
|
else
|
30
30
|
self
|
31
31
|
end
|
data/lib/linux_admin/version.rb
CHANGED
data/lib/linux_admin/yum.rb
CHANGED
@@ -8,7 +8,7 @@ describe LinuxAdmin::RegistrationSystem do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "when registered RHN" do
|
11
|
-
stub_registered_to_system(:rhn)
|
11
|
+
stub_registered_to_system(:sm, :rhn)
|
12
12
|
expect(described_class.registration_type).to eq(LinuxAdmin::Rhn)
|
13
13
|
end
|
14
14
|
|
@@ -53,8 +53,8 @@ describe LinuxAdmin::RegistrationSystem do
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def stub_registered_to_system(system)
|
57
|
-
LinuxAdmin::SubscriptionManager.any_instance.stub(:registered? => (system
|
58
|
-
LinuxAdmin::Rhn.any_instance.stub(:registered? =>
|
56
|
+
def stub_registered_to_system(*system)
|
57
|
+
LinuxAdmin::SubscriptionManager.any_instance.stub(:registered? => (system.include?(:sm)))
|
58
|
+
LinuxAdmin::Rhn.any_instance.stub(:registered? => (system.include?(:rhn)))
|
59
59
|
end
|
60
60
|
end
|
data/spec/yum_spec.rb
CHANGED
@@ -7,12 +7,12 @@ describe LinuxAdmin::Yum do
|
|
7
7
|
|
8
8
|
context ".create_repo" do
|
9
9
|
it "default arguments" do
|
10
|
-
described_class.should_receive(:run!).once.with("
|
10
|
+
described_class.should_receive(:run!).once.with("createrepo", {:params=>{nil=>"some/path", "--database"=>nil, "--unique-md-filenames"=>nil}})
|
11
11
|
described_class.create_repo("some/path")
|
12
12
|
end
|
13
13
|
|
14
14
|
it "bare create" do
|
15
|
-
described_class.should_receive(:run!).once.with("
|
15
|
+
described_class.should_receive(:run!).once.with("createrepo", {:params=>{nil=>"some/path"}})
|
16
16
|
described_class.create_repo("some/path", :database => false, :unique_file_names => false)
|
17
17
|
end
|
18
18
|
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.
|
4
|
+
version: 0.4.1
|
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-
|
15
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bundler
|