Hello community,

here is the log from the commit of package rubygem-rhc for openSUSE:Factory 
checked in at 2014-12-10 23:45:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rhc (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-rhc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-rhc"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-rhc/rubygem-rhc.changes  2014-12-06 
13:47:06.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-rhc.new/rubygem-rhc.changes     
2014-12-10 23:44:51.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Dec  9 07:19:26 UTC 2014 - [email protected]
+
+- updated to version 1.33.4
+
+-------------------------------------------------------------------

Old:
----
  rhc-1.32.2.gem

New:
----
  rhc-1.33.4.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-rhc.spec ++++++
--- /var/tmp/diff_new_pack.ZUXozY/_old  2014-12-10 23:44:53.000000000 +0100
+++ /var/tmp/diff_new_pack.ZUXozY/_new  2014-12-10 23:44:53.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           rubygem-rhc
-Version:        1.32.2
+Version:        1.33.4
 Release:        0
 %define mod_name rhc
 %define mod_full_name %{mod_name}-%{version}

++++++ rhc-1.32.2.gem -> rhc-1.33.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rhc/commands/port_forward.rb 
new/lib/rhc/commands/port_forward.rb
--- old/lib/rhc/commands/port_forward.rb        1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/rhc/commands/port_forward.rb        1970-01-01 01:00:00.000000000 
+0100
@@ -131,7 +131,7 @@
                     debug args.inspect
                     ssh.forward.local(*args)
                     fs.bound = true
-                  rescue Errno::EADDRINUSE, Errno::EACCES => e
+                  rescue Errno::EADDRINUSE, Errno::EACCES, Errno::EPERM => e
                     warn "#{e} while forwarding port #{fs.port_from}. Trying 
local port #{fs.port_from+1}"
                     fs.port_from += 1
                   rescue Timeout::Error, Errno::EADDRNOTAVAIL, 
Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Net::SSH::AuthenticationFailed => e
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rhc/commands/ssh.rb new/lib/rhc/commands/ssh.rb
--- old/lib/rhc/commands/ssh.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/rhc/commands/ssh.rb 1970-01-01 01:00:00.000000000 +0100
@@ -39,10 +39,19 @@
 
         debug "Using user specified SSH: #{options.ssh}" if options.ssh
 
-        command_line = [RHC::Helpers.split_path(ssh), ('-vvv' if debug?), 
rest_app.ssh_string.to_s, command].flatten.compact
+        command_line = [RHC::Helpers.split_path(ssh), ('-vv' if debug?), 
rest_app.ssh_string.to_s, command].flatten.compact
 
         debug "Invoking Kernel.exec with #{command_line.inspect}"
-        Kernel.send(:exec, *command_line)
+        begin
+          Kernel.send(:exec, *command_line)
+        rescue Errno::ENOENT
+          debug "SSH executable #{ssh.inspect} not found, splitting and trying 
again..."
+
+          command_line = [ssh.chomp('"').reverse.chomp('"').reverse.split(' 
'), ('-vv' if debug?), rest_app.ssh_string.to_s, command].flatten.compact
+          debug "Invoking Kernel.exec with #{command_line.inspect}"
+
+          Kernel.send(:exec, *command_line)
+        end
       end
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rhc/ssh_helpers.rb new/lib/rhc/ssh_helpers.rb
--- old/lib/rhc/ssh_helpers.rb  1970-01-01 01:00:00.000000000 +0100
+++ new/lib/rhc/ssh_helpers.rb  1970-01-01 01:00:00.000000000 +0100
@@ -268,7 +268,7 @@
         else
           Net::SSH.start(ssh_uri.host, ssh_uri.user) do |ssh|
             File.open(filename, 'wb') do |file|
-              ssh.exec! "snapshot" do |channel, stream, data|
+              ssh.exec! snapshot_cmd do |channel, stream, data|
                 if stream == :stdout
                   file.write(data)
                 else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        1970-01-01 01:00:00.000000000 +0100
+++ new/metadata        1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +1,13 @@
 --- !ruby/object:Gem::Specification 
 name: rhc
 version: !ruby/object:Gem::Version 
-  hash: 147
+  hash: 155
   prerelease: 
   segments: 
   - 1
-  - 32
-  - 2
-  version: 1.32.2
+  - 33
+  - 4
+  version: 1.33.4
 platform: ruby
 authors: 
 - Red Hat
@@ -15,7 +15,7 @@
 bindir: bin
 cert_chain: []
 
-date: 2014-11-13 00:00:00 Z
+date: 2014-12-04 00:00:00 Z
 dependencies: 
 - !ruby/object:Gem::Dependency 
   name: net-ssh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/rhc/commands/port_forward_spec.rb 
new/spec/rhc/commands/port_forward_spec.rb
--- old/spec/rhc/commands/port_forward_spec.rb  1970-01-01 01:00:00.000000000 
+0100
+++ new/spec/rhc/commands/port_forward_spec.rb  1970-01-01 01:00:00.000000000 
+0100
@@ -131,6 +131,24 @@
       end
     end
 
+    # Windows 7 reportedly returns EPERM rather than EACCES when the
+    # port is in use by a local service (see
+    # <https://bugzilla.redhat.com/show_bug.cgi?id=1125963>).
+    context 'when local port is in use by local service on Windows 7' do
+      before(:each) do
+        Net::SSH.should_receive(:start).with(@uri.host, 
@uri.user).and_yield(@ssh).twice
+        @ssh.should_receive(:exec!).with("rhc-list-ports").and_yield(nil, 
:stderr, 'mysql -> 127.0.0.1:3306')
+        forward = double(Net::SSH::Service::Forward)
+        @ssh.should_receive(:forward).at_least(2).and_return(forward)
+        forward.should_receive(:local).with(3306, '127.0.0.1', 
3306).and_raise(Errno::EPERM)
+        forward.should_receive(:local).with(3307, '127.0.0.1', 3306)
+        @ssh.should_receive(:loop).and_raise(Interrupt.new)
+      end
+      it 'should bind to a higher port' do
+        run_output.should include("3307")
+      end
+    end
+
     context 'when host refuses connection' do
       before(:each) do
         Net::SSH.should_receive(:start).with(@uri.host, 
@uri.user).and_yield(@ssh).twice
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/rhc/commands/ssh_spec.rb 
new/spec/rhc/commands/ssh_spec.rb
--- old/spec/rhc/commands/ssh_spec.rb   1970-01-01 01:00:00.000000000 +0100
+++ new/spec/rhc/commands/ssh_spec.rb   1970-01-01 01:00:00.000000000 +0100
@@ -36,7 +36,7 @@
       before(:each) do
         @domain = rest_client.add_domain("mockdomain")
         @domain.add_application("app1", "mock_type")
-        Kernel.should_receive(:exec).with("ssh", "-vvv", 
"[email protected]").and_return(0)
+        Kernel.should_receive(:exec).with("ssh", "-vv", 
"[email protected]").and_return(0)
       end
       # It would be nice if this checked for the debug[123]: messages from 
standard error but im not sure how to look for that.
       it { run_output.should match("Connecting to fakeuuidfortestsapp") }
@@ -170,6 +170,23 @@
       it { expect { run }.to exit_with_code(0) }
     end
   end
+
+  describe 'app ssh custom ssh with spaces' do
+    let(:arguments) { ['app', 'ssh', 'app1', '--ssh', '/path/to/ssh 
--with_custom_flag'] }
+    context 'when custom ssh does not exist as a path' do
+      before(:each) do
+        @domain = rest_client.add_domain("mockdomain")
+        @domain.add_application("app1", "mock_type")
+        RHC::Commands::Ssh.any_instance.should_not_receive(:has_ssh?)
+        File.should_receive(:exist?).at_least(1).and_return(true)
+        File.should_receive(:executable?).at_least(1).and_return(true)
+        
subject.class.any_instance.stub(:discover_git_executable).and_return('git')
+        Kernel.should_receive(:exec).with('/path/to/ssh --with_custom_flag', 
"[email protected]").once.times.and_raise(Errno::ENOENT)
+        Kernel.should_receive(:exec).with('/path/to/ssh', 
'--with_custom_flag', "[email protected]").once.times.and_return(0)
+      end
+      it { expect { run }.to exit_with_code(0) }
+    end
+  end
 
   describe 'ssh tests' do
     let(:arguments) { ['app', 'ssh', 'app1', '-s /bin/blah'] }

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to