linux_admin 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linux_admin.rb +9 -1
- data/lib/linux_admin/common.rb +2 -0
- data/lib/linux_admin/logging.rb +5 -0
- data/lib/linux_admin/null_logger.rb +11 -0
- data/lib/linux_admin/registration_system.rb +1 -0
- data/lib/linux_admin/registration_system/rhn.rb +1 -0
- data/lib/linux_admin/registration_system/subscription_manager.rb +1 -0
- data/lib/linux_admin/rpm.rb +4 -2
- data/lib/linux_admin/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 416f57382aba9378eb64a0b558478898d1d40e2f
|
4
|
+
data.tar.gz: d4c70351176347b76844638bae4cc6c49dbad3b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3f345b3999366943ae185ce3a93a57664142b0213a37490fbeff23d650712fc28c29f64b761deba2eb3652548e461459773e6bfedb1ea393d049a595a15a5c9
|
7
|
+
data.tar.gz: 97b4f388757fce7f406a4a5e3671aa034b347384c37958e3c22e9e307aa4cb649143079640fff88b5b0989819c085696b9a6c79ba6653d4a309909baf6c9fc28
|
data/lib/linux_admin.rb
CHANGED
@@ -2,6 +2,8 @@ require 'more_core_extensions/all'
|
|
2
2
|
require 'active_support'
|
3
3
|
require 'active_support/core_ext'
|
4
4
|
|
5
|
+
require 'linux_admin/logging'
|
6
|
+
require 'linux_admin/null_logger'
|
5
7
|
|
6
8
|
require 'linux_admin/common'
|
7
9
|
require 'linux_admin/exceptions'
|
@@ -28,5 +30,11 @@ require 'linux_admin/volume_group'
|
|
28
30
|
|
29
31
|
module LinuxAdmin
|
30
32
|
extend Common
|
31
|
-
|
33
|
+
extend self
|
34
|
+
|
35
|
+
attr_writer :logger
|
36
|
+
|
37
|
+
def logger
|
38
|
+
@logger ||= NullLogger.new
|
39
|
+
end
|
32
40
|
end
|
data/lib/linux_admin/common.rb
CHANGED
@@ -44,6 +44,7 @@ module LinuxAdmin
|
|
44
44
|
cmd = "rhn-channel -a"
|
45
45
|
params = user_pwd(options).merge("--channel=" => repo)
|
46
46
|
|
47
|
+
logger.info("#{self.class.name}##{__method__} Enabling channel: #{repo}")
|
47
48
|
run!(cmd, :params => params)
|
48
49
|
end
|
49
50
|
alias_method :subscribe, :enable_channel
|
data/lib/linux_admin/rpm.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
module LinuxAdmin
|
2
2
|
class Rpm < Package
|
3
|
+
extend Logging
|
4
|
+
|
3
5
|
def self.rpm_cmd
|
4
6
|
Distros.local.command(:rpm)
|
5
7
|
end
|
@@ -16,8 +18,8 @@ module LinuxAdmin
|
|
16
18
|
#
|
17
19
|
# Rpm.import_key("/etc/pki/my-gpg-key")
|
18
20
|
def self.import_key(file)
|
19
|
-
|
20
|
-
run!("rpm", :params =>
|
21
|
+
logger.info("#{self.class.name}##{__method__} Importing RPM-GPG-KEY: #{file}")
|
22
|
+
run!("rpm", :params => {"--import" => file})
|
21
23
|
end
|
22
24
|
|
23
25
|
def self.info(pkg)
|
data/lib/linux_admin/version.rb
CHANGED
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.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Dunne
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2015-
|
16
|
+
date: 2015-05-04 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: bundler
|
@@ -119,14 +119,14 @@ dependencies:
|
|
119
119
|
requirements:
|
120
120
|
- - ~>
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: '1.
|
122
|
+
version: '1.3'
|
123
123
|
type: :runtime
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - ~>
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: '1.
|
129
|
+
version: '1.3'
|
130
130
|
- !ruby/object:Gem::Dependency
|
131
131
|
name: nokogiri
|
132
132
|
requirement: !ruby/object:Gem::Requirement
|
@@ -166,8 +166,10 @@ files:
|
|
166
166
|
- lib/linux_admin/exceptions.rb
|
167
167
|
- lib/linux_admin/fstab.rb
|
168
168
|
- lib/linux_admin/hosts.rb
|
169
|
+
- lib/linux_admin/logging.rb
|
169
170
|
- lib/linux_admin/logical_volume.rb
|
170
171
|
- lib/linux_admin/mountable.rb
|
172
|
+
- lib/linux_admin/null_logger.rb
|
171
173
|
- lib/linux_admin/package.rb
|
172
174
|
- lib/linux_admin/partition.rb
|
173
175
|
- lib/linux_admin/physical_volume.rb
|