hammer_cli_katello_bridge 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/hammer_cli_katello_bridge.rb +7 -5
- data/lib/hammer_cli_katello_bridge/version.rb +1 -1
- metadata +12 -19
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a9711ad104d47a673c287e0f428217bdb7ceeb9d
|
4
|
+
data.tar.gz: a54156ccb83ad90dab757ce5433f1308658f9653
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 30a4e95a507bd30b6613763d50a2558e770e74aa4bd081a82776ca41d397d53de87e6eca3796bb8732f9e03c274ab87e2948fdb10cdb6267bd5746dd3d8a9b27
|
7
|
+
data.tar.gz: c2b683d4adbd6c52378383ec0e79a8b9e5ce62d1c481d2e9ee9417fd0d1f0f515702926a86ad38f7254b4e6851648b38a5dcec06226259b729ad27db4c6ff227
|
@@ -16,11 +16,11 @@ module HammerCLIKatelloBridge
|
|
16
16
|
@command_prefix = ''
|
17
17
|
|
18
18
|
def execute
|
19
|
-
katello_params = options.select { |k,v| k != 'dry_run' }
|
20
|
-
safe_params = katello_params.map do |k,v|
|
19
|
+
katello_params = options.select { |k,v| k != 'dry_run' }
|
20
|
+
safe_params = katello_params.map do |k,v|
|
21
21
|
if v.is_a?(TrueClass)
|
22
22
|
param = "--#{k}"
|
23
|
-
else
|
23
|
+
else
|
24
24
|
param = "--#{k}='%s'" % v.gsub("'","\\\\'")
|
25
25
|
end
|
26
26
|
param
|
@@ -43,7 +43,7 @@ module HammerCLIKatelloBridge
|
|
43
43
|
command = "katello #{username_param} #{password_param} #{cml}"
|
44
44
|
|
45
45
|
logger.info "Passing control to: %s" % command.gsub(/\s\-p\s\S*/, ' -p ***')
|
46
|
-
|
46
|
+
|
47
47
|
exec command unless dry_run?
|
48
48
|
end
|
49
49
|
|
@@ -78,10 +78,12 @@ module HammerCLIKatelloBridge
|
|
78
78
|
command_buffer
|
79
79
|
end
|
80
80
|
|
81
|
+
|
82
|
+
|
81
83
|
json_file = HammerCLI::Settings[:katello_cli_description]
|
82
84
|
raise "Path to katello CLI description is not set or file does not exist" unless (json_file && File.exist?(json_file))
|
83
85
|
self.load_commands(File.read(json_file)).each do |command|
|
84
|
-
HammerCLI::MainCommand.subcommand
|
86
|
+
HammerCLI::MainCommand.subcommand!(command[:name], command[:desc], command[:cls])
|
85
87
|
end
|
86
88
|
|
87
89
|
end
|
metadata
CHANGED
@@ -1,49 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_katello_bridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Martin Bačovský
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-09-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: json
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: hammer_cli
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
|
-
description:
|
41
|
+
description: "Katello commands for Hammer CLI. This plugin use Katello CLI to run
|
47
42
|
the commands. \n"
|
48
43
|
email: mbacovsk@redhat.com
|
49
44
|
executables: []
|
@@ -54,27 +49,25 @@ files:
|
|
54
49
|
- lib/hammer_cli_katello_bridge/version.rb
|
55
50
|
homepage: http://github.com/theforeman/hammer-cli-katello-bridge
|
56
51
|
licenses: []
|
52
|
+
metadata: {}
|
57
53
|
post_install_message:
|
58
54
|
rdoc_options: []
|
59
55
|
require_paths:
|
60
56
|
- lib
|
61
57
|
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
-
none: false
|
63
58
|
requirements:
|
64
|
-
- -
|
59
|
+
- - '>='
|
65
60
|
- !ruby/object:Gem::Version
|
66
61
|
version: '0'
|
67
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
63
|
requirements:
|
70
|
-
- -
|
64
|
+
- - '>='
|
71
65
|
- !ruby/object:Gem::Version
|
72
66
|
version: '0'
|
73
67
|
requirements: []
|
74
68
|
rubyforge_project:
|
75
|
-
rubygems_version:
|
69
|
+
rubygems_version: 2.0.8
|
76
70
|
signing_key:
|
77
|
-
specification_version:
|
71
|
+
specification_version: 4
|
78
72
|
summary: Katello commands for hammer-cli
|
79
73
|
test_files: []
|
80
|
-
has_rdoc:
|