rhc 1.26.9 → 1.27.4

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.
@@ -83,7 +83,7 @@ module RHC::Commands
83
83
 
84
84
  from_app = find_app(:app => options.from_app)
85
85
 
86
- arg_envs = from_app.environment_variables.collect {|env| "#{env.name}=#{env.value} "} + arg_envs
86
+ arg_envs = from_app.environment_variables.collect {|env| "#{env.name}=#{env.value}"} + arg_envs
87
87
  cartridges = from_app.cartridges.reject{|c| c.tags.include?('web_proxy')}.collect{|c| c.custom? ? c.url : c.name}
88
88
  end
89
89
 
@@ -62,7 +62,7 @@ module RHC::Commands
62
62
  domain.rename(new_namespace)
63
63
  success "done"
64
64
 
65
- info "Applications in this domain will use the new name in their URL."
65
+ info "Applications created in this domain will use the new name in their URL."
66
66
 
67
67
  0
68
68
  end
@@ -14,15 +14,15 @@ module RHC::Commands
14
14
  (development) and Enterprise (production) and the user also has a personal
15
15
  OpenShift Online account:
16
16
 
17
- rhc server add openshift.redhat.com online -l personal@email.com
18
- rhc server add origin.openshift.mycompany.com development -l user@company.com
19
- rhc server add enterprise.openshift.mycompany.com production -l user@company.com
17
+ rhc add-server openshift.redhat.com online -l personal@email.com
18
+ rhc add-server origin.openshift.mycompany.com development -l user@company.com
19
+ rhc add-server enterprise.openshift.mycompany.com production -l user@company.com
20
20
 
21
21
  Then, to switch between the servers:
22
22
 
23
- rhc server use online
24
- rhc server use development
25
- rhc server use production
23
+ rhc use-server online
24
+ rhc use-server development
25
+ rhc use-server production
26
26
 
27
27
  To list all servers configured:
28
28
 
@@ -132,7 +132,9 @@ module RHC::Commands
132
132
  def use(server)
133
133
  server = server_configs.find(server)
134
134
 
135
- if wizard_to_server(server.hostname, true, :login => server.login, :use_authorization_tokens => server.use_authorization_tokens, :insecure => server.insecure)
135
+ attrs = [:login, :use_authorization_tokens, :insecure, :timeout, :ssl_version, :ssl_client_cert_file, :ssl_ca_file]
136
+
137
+ if wizard_to_server(server.hostname, true, attrs.inject({}){ |h, (k, v)| h[k] = server.send(k); h })
136
138
  paragraph { success "Now using '#{server.hostname}'" }
137
139
  0
138
140
  else
@@ -213,9 +215,9 @@ module RHC::Commands
213
215
  options['use_authorization_tokens'] = args[:use_authorization_tokens] unless args[:use_authorization_tokens].nil?
214
216
  options['insecure'] = args[:insecure] unless args[:insecure].nil?
215
217
  options['timeout'] = args[:timeout] unless args[:timeout].nil?
216
- options['ssl_version'] = args[:ssl_version] unless args[:ssl_version].nil?
217
- options['ssl_client_cert_file'] = args[:ssl_client_cert_file] unless args[:ssl_client_cert_file].nil?
218
- options['ssl_ca_file'] = args[:ssl_ca_file] unless args[:ssl_ca_file].nil?
218
+ options['ssl_version'] = args[:ssl_version]
219
+ options['ssl_client_cert_file'] = args[:ssl_client_cert_file]
220
+ options['ssl_ca_file'] = args[:ssl_ca_file]
219
221
  RHC::ServerWizard.new(config, options, server_configs, set_default).run
220
222
  end
221
223
 
@@ -39,7 +39,8 @@ module RHC::Commands
39
39
 
40
40
  debug "Using user specified SSH: #{options.ssh}" if options.ssh
41
41
 
42
- command_line = [ ssh.split, rest_app.ssh_string.to_s, command].flatten.compact
42
+ command_line = [ ssh.split, ('-vvv' if debug?), rest_app.ssh_string.to_s, command ].flatten.compact
43
+
43
44
  debug "Invoking Kernel.exec with #{command_line.inspect}"
44
45
  Kernel.send(:exec, *command_line)
45
46
  end
@@ -338,7 +338,10 @@ module RHC
338
338
  :auto_deploy => 'Deployment',
339
339
  :sha1 => 'SHA1',
340
340
  :ref => 'Git Reference',
341
- :use_authorization_tokens => 'Use Auth Tokens'
341
+ :use_authorization_tokens => 'Use Auth Tokens',
342
+ :ssl_ca_file => 'SSL Cert CA File',
343
+ :ssl_version => 'SSL Version',
344
+ :ssl_client_cert_file => 'SSL x509 Client Cert File'
342
345
  })
343
346
 
344
347
  headings[value]
@@ -206,7 +206,7 @@ describe RHC::Commands::Domain do
206
206
  expect { run }.to exit_with_code(0)
207
207
  rest_client.domains[0].name.should == 'alterednamespace'
208
208
  end
209
- it { run_output.should match(/Renaming domain 'olddomain' to 'alterednamespace'.*done.*?Applications in this domain will use the new name in their URL./m) }
209
+ it { run_output.should match(/Renaming domain 'olddomain' to 'alterednamespace'.*done.*?Applications created in this domain will use the new name in their URL./m) }
210
210
  end
211
211
 
212
212
  context 'when there is no domain' do
@@ -227,7 +227,7 @@ describe RHC::Commands::Domain do
227
227
  expect { run }.to exit_with_code(0)
228
228
  rest_client.domains[0].name.should == 'alterednamespace'
229
229
  end
230
- it { run_output.should match(/This command is deprecated.*Renaming domain 'olddomain' to 'alterednamespace'.*done.*?Applications in this domain will use the new name in their URL./m) }
230
+ it { run_output.should match(/This command is deprecated.*Renaming domain 'olddomain' to 'alterednamespace'.*done.*?Applications created in this domain will use the new name in their URL./m) }
231
231
  end
232
232
 
233
233
  describe 'alter alias has been removed' do
@@ -28,6 +28,21 @@ describe RHC::Commands::Ssh do
28
28
  it { expect{ run }.to exit_with_code(0) }
29
29
  end
30
30
  end
31
+
32
+ describe 'ssh without command including debugging' do
33
+ let(:arguments) { ['app', 'ssh', 'app1', '--debug'] }
34
+
35
+ context 'when run' do
36
+ before(:each) do
37
+ @domain = rest_client.add_domain("mockdomain")
38
+ @domain.add_application("app1", "mock_type")
39
+ Kernel.should_receive(:exec).with("ssh", "-vvv", "fakeuuidfortestsapp1@127.0.0.1").and_return(0)
40
+ end
41
+ # It would be nice if this checked for the debug[123]: messages from standard error but im not sure how to look for that.
42
+ it { run_output.should match("Connecting to fakeuuidfortestsapp") }
43
+ it { expect{ run }.to exit_with_code(0) }
44
+ end
45
+ end
31
46
 
32
47
  describe 'app ssh with command' do
33
48
  let(:arguments) { ['app', 'ssh', 'app1', 'ls', '/tmp'] }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 109
4
+ hash: 115
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 26
9
- - 9
10
- version: 1.26.9
8
+ - 27
9
+ - 4
10
+ version: 1.27.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Red Hat
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-06-24 00:00:00 Z
18
+ date: 2014-07-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: net-ssh