rhc 1.20.3 → 1.21.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,17 +47,17 @@ describe "rhc deployment scenarios" do
47
47
 
48
48
  it "should perform a complete deploy workflow" do
49
49
  configure_app_for_manual_git_deployment
50
- edit_simple_change 'Welcome to Test'
51
- app_page_content.should match /Welcome to OpenShift/
52
- app_page_content.should_not match /Welcome to Test/
50
+ edit_simple_change 'Bienvenido a'
51
+ app_page_content.should match /Welcome to/
52
+ app_page_content.should_not match /Bienvenido a/
53
53
  deploy_master
54
- app_page_content.should match /Welcome to Test/
55
- app_page_content.should_not match /Welcome to OpenShift/
54
+ app_page_content.should match /Bienvenido a/
55
+ app_page_content.should_not match /Welcome to/
56
56
  deployment_id = find_inactive_deployment
57
57
  deployment_id.should_not be_nil
58
58
  activate deployment_id
59
- app_page_content.should match /Welcome to OpenShift/
60
- app_page_content.should_not match /Welcome to Test/
59
+ app_page_content.should match /Welcome to/
60
+ app_page_content.should_not match /Bienvenido a/
61
61
  end
62
62
 
63
63
  private
@@ -100,7 +100,7 @@ describe "rhc deployment scenarios" do
100
100
  Dir.chdir git_directory
101
101
  `git config user.email "you@example.com"`
102
102
  `git config user.name "Your Name"`
103
- `sed -i "s/Welcome to OpenShift/#{content}/" php/index.php`
103
+ `sed -i "s/Welcome/#{content}/" index.php`
104
104
  `git commit -a -m "Commit from Feature Tests"`
105
105
  `git push origin master`
106
106
  Dir.chdir '../'
@@ -600,7 +600,7 @@ module RHC::Commands
600
600
  sleep_time *= DEFAULT_DELAY_THROTTLE
601
601
  }
602
602
 
603
- debug "End checking for application dns @ '#{host} - found=#{found}'"
603
+ debug "End checking for application dns @ '#{host} - found=#{host_found}'"
604
604
 
605
605
  host_found
606
606
  end
@@ -34,9 +34,14 @@ module RHC::Commands
34
34
 
35
35
  begin
36
36
  start_time = Time.now
37
+ last_sent = nil
37
38
  Net::SCP.send("#{action}!".to_sym, ssh_opts[1], ssh_opts[0], (action == 'upload' ? local_path : remote_path), (action == 'upload' ? remote_path : local_path)) do |ch, name, sent, total|
38
39
  #:nocov:
39
- $stderr.print "\r #{action}ing #{name}: #{((sent.to_f/total.to_f)*100).to_i}% complete. #{sent}/#{total} bytes transferred " + (sent == total ? "in #{Time.now - start_time} seconds \n" : "")
40
+ if sent != last_sent
41
+ last_sent = sent
42
+ complete = total == 0 ? 100 : ((sent.to_f/total.to_f)*100).to_i
43
+ $stderr.print "\r #{action}ing #{name}: #{complete}% complete. #{sent}/#{total} bytes transferred " + (sent == total ? "in #{Time.now - start_time} seconds \n" : "")
44
+ end
40
45
  #:nocov:
41
46
  end
42
47
  rescue Errno::ECONNREFUSED
@@ -394,7 +394,9 @@ module RHC
394
394
  # :nocov:
395
395
  # Patch for BZ840938 to support Ruby 1.8 on machines without /etc/resolv.conf
396
396
  dns = Resolv::DNS.new((Resolv::DNS::Config.default_config_hash || {}))
397
- dns.getresources(host, Resolv::DNS::Resource::IN::A).any?
397
+ resources = dns.getresources(host, Resolv::DNS::Resource::IN::A)
398
+ debug("Checking for #{host} from Resolv::DNS: #{resources.inspect}") if debug?
399
+ resources.present?
398
400
  # :nocov:
399
401
  end
400
402
 
@@ -402,7 +404,9 @@ module RHC
402
404
  with_tolerant_encoding do
403
405
  begin
404
406
  resolver = Resolv::Hosts.new
405
- resolver.getaddress host
407
+ result = resolver.getaddress host
408
+ debug("Checking for #{host} from Resolv::Hosts: #{result.inspect}") if debug?
409
+ result
406
410
  rescue => e
407
411
  debug "Error while resolving with Resolv::Hosts: #{e.message}(#{e.class})\n #{e.backtrace.join("\n ")}"
408
412
  end
@@ -569,7 +569,7 @@ module RHC
569
569
 
570
570
  In order to fully interact with OpenShift you will need to install and configure a git client if you have not already done so.
571
571
 
572
- Documentation for installing other tools you will need for OpenShift can be found at https://openshift.redhat.com/community/developers/install-the-client-tools
572
+ Documentation for installing other tools you will need for OpenShift can be found at https://www.openshift.com/developers/install-the-client-tools
573
573
 
574
574
  We recommend these free applications:
575
575
 
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: 65
4
+ hash: 69
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 20
8
+ - 21
9
9
  - 3
10
- version: 1.20.3
10
+ version: 1.21.3
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-02-24 00:00:00 Z
18
+ date: 2014-03-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: net-ssh