rhcp_shell 0.2.13 → 0.2.14

Sign up to get free protection for your applications and to get access to all the features.
data/bin/rhcp_shell CHANGED
@@ -97,7 +97,7 @@ EOF
97
97
  url = URI::HTTP.build(http_options)
98
98
  end
99
99
 
100
- @http_broker = RHCP::Client::HttpBroker.new(url)
100
+ @http_broker = RHCP::Client::HttpBroker.new(url, options['username'], options['password'])
101
101
 
102
102
  backend = RHCPShellBackend.new(@http_broker)
103
103
  backend.banner = <<EOF
@@ -49,8 +49,14 @@ def add_help_commands(broker)
49
49
  if param.is_default_param
50
50
  param_name += " *"
51
51
  end
52
+ if param.allows_extra_values
53
+ param_name += " ~"
54
+ end
52
55
  puts sprintf(" %-20s %s%s\n", param_name, param.description, default_value)
53
56
  end
57
+ if command.accepts_extra_params
58
+ puts "This command accepts extra parameters."
59
+ end
54
60
  end
55
61
  puts ""
56
62
  else
@@ -1,13 +1,15 @@
1
- require 'shell_backend.rb'
1
+ require 'rhcp_shell/shell_backend.rb'
2
2
 
3
- require 'local_commands/help'
4
- require 'local_commands/detail'
5
- require 'local_commands/exit'
6
- require 'local_commands/context'
7
- require 'local_commands/set_prompt'
3
+ require 'rhcp_shell/local_commands/help'
4
+ require 'rhcp_shell/local_commands/detail'
5
+ require 'rhcp_shell/local_commands/exit'
6
+ require 'rhcp_shell/local_commands/context'
7
+ require 'rhcp_shell/local_commands/set_prompt'
8
8
 
9
- require 'display_types/table'
10
- require 'display_types/hash'
9
+ require 'rhcp_shell/display_types/table'
10
+ require 'rhcp_shell/display_types/hash'
11
+
12
+ require 'rhcp_shell/util/colorize'
11
13
 
12
14
  require 'rubygems'
13
15
  require 'rhcp'
@@ -328,7 +330,7 @@ class RHCPShellBackend < ShellBackend
328
330
  puts "collecting value for extra param : #{key} => #{value}"
329
331
  @collected_values["extra_params"] = {} unless @collected_values.has_key?("extra_params")
330
332
  @collected_values["extra_params"][key] = Array.new if @collected_values["extra_params"][key] == nil
331
- @collected_values["extra_params"][key] << [ value ]
333
+ @collected_values["extra_params"][key] << value
332
334
  else
333
335
  puts "ignoring parameter value '#{value}' for param '#{key}' : " + ex.to_s
334
336
  end
@@ -375,8 +377,6 @@ class RHCPShellBackend < ShellBackend
375
377
  puts @banner
376
378
  end
377
379
 
378
- require 'util/colorize'
379
-
380
380
  def prompt
381
381
  if @current_param != nil
382
382
  "#{@command_selected.name}.#{@current_param.name} $ "
@@ -7,7 +7,7 @@ module RhcpShell #:nodoc:
7
7
 
8
8
  MAJOR = 0
9
9
  MINOR = 2
10
- TINY = 13
10
+ TINY = 14
11
11
 
12
12
  def Version.to_s
13
13
  [ MAJOR, MINOR, TINY ].join(".")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhcp_shell
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 13
10
- version: 0.2.13
9
+ - 14
10
+ version: 0.2.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philipp T.
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-06 00:00:00 Z
18
+ date: 2013-02-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rhcp
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 0.1.9
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
- description:
36
+ description: command line shell for RHCP
37
37
  email: philipp at virtualop dot org
38
38
  executables:
39
39
  - rhcp_shell
@@ -43,20 +43,20 @@ extra_rdoc_files: []
43
43
 
44
44
  files:
45
45
  - bin/rhcp_shell
46
- - lib/rhcp_shell.rb
47
- - lib/rhcp_shell/util/colorize.rb
46
+ - lib/test.log
48
47
  - lib/rhcp_shell/rhcp_shell_backend.rb
49
- - lib/rhcp_shell/local_commands/set_prompt.rb
50
- - lib/rhcp_shell/local_commands/context.rb
51
- - lib/rhcp_shell/local_commands/detail.rb
52
- - lib/rhcp_shell/local_commands/help.rb
53
- - lib/rhcp_shell/local_commands/exit.rb
54
- - lib/rhcp_shell/version.rb
55
48
  - lib/rhcp_shell/display_types/hash.rb
56
49
  - lib/rhcp_shell/display_types/table.rb
57
- - lib/rhcp_shell/base_shell.rb
50
+ - lib/rhcp_shell/version.rb
58
51
  - lib/rhcp_shell/shell_backend.rb
59
- - lib/test.log
52
+ - lib/rhcp_shell/util/colorize.rb
53
+ - lib/rhcp_shell/base_shell.rb
54
+ - lib/rhcp_shell/local_commands/exit.rb
55
+ - lib/rhcp_shell/local_commands/set_prompt.rb
56
+ - lib/rhcp_shell/local_commands/detail.rb
57
+ - lib/rhcp_shell/local_commands/help.rb
58
+ - lib/rhcp_shell/local_commands/context.rb
59
+ - lib/rhcp_shell.rb
60
60
  - test/rhcp_shell_backend_test.rb
61
61
  - test/setup_test_registry.rb
62
62
  homepage: http://rubyforge.org/projects/rhcp