[DRE-commits] [ruby-sshkit] 06/07: d/patches: Refresh patchs

Sebastien Badia sbadia-guest at moszumanska.debian.org
Mon Feb 29 18:58:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

sbadia-guest pushed a commit to branch master
in repository ruby-sshkit.

commit 7c835ccec9f528a20c176fed22fa37e3e6326cab
Author: Sebastien Badia <seb at sebian.fr>
Date:   Mon Feb 29 15:50:47 2016 -0300

    d/patches: Refresh patchs
---
 debian/patches/002_fix-local-test-cd.patch         |   6 +-
 .../003_disabled-tests-that-require-turn.patch     | 127 +++++++++++----------
 2 files changed, 67 insertions(+), 66 deletions(-)

diff --git a/debian/patches/002_fix-local-test-cd.patch b/debian/patches/002_fix-local-test-cd.patch
index d69d002..3c6bfc6 100644
--- a/debian/patches/002_fix-local-test-cd.patch
+++ b/debian/patches/002_fix-local-test-cd.patch
@@ -5,9 +5,9 @@ Origin: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-sshkit.git;a=co
 Forwarded: not-needed
 Last-Update: 2014-04-21
 
---- ruby-sshkit-1.4.0.orig/test/unit/backends/test_local.rb
-+++ ruby-sshkit-1.4.0/test/unit/backends/test_local.rb
-@@ -11,7 +11,7 @@ module SSHKit
+--- a/test/unit/backends/test_local.rb
++++ b/test/unit/backends/test_local.rb
+@@ -15,7 +15,7 @@ module SSHKit
        def test_execute
          assert_equal true, local.execute('uname -a')
          assert_equal true, local.execute
diff --git a/debian/patches/003_disabled-tests-that-require-turn.patch b/debian/patches/003_disabled-tests-that-require-turn.patch
index be09fe3..42076ca 100644
--- a/debian/patches/003_disabled-tests-that-require-turn.patch
+++ b/debian/patches/003_disabled-tests-that-require-turn.patch
@@ -4,79 +4,80 @@ Author: Sebastien Badia <seb at sebian.fr>
 Forwarded: not-needed
 Last-Update: 2015-05-04
 
---- ruby-sshkit-1.7.1.orig/test/unit/formatters/test_dot.rb
-+++ ruby-sshkit-1.7.1/test/unit/formatters/test_dot.rb
-@@ -47,19 +47,5 @@ module SSHKit
-       assert_equal "", output.strip
+--- ruby-sshkit-1.8.0.orig/test/unit/formatters/test_pretty.rb
++++ ruby-sshkit-1.8.0/test/unit/formatters/test_pretty.rb
+@@ -65,11 +65,6 @@ module SSHKit
+       assert_log_output "  INFO some spaces\n"
      end
- 
--    def test_command_success
--      command = SSHKit::Command.new(:ls)
--      command.exit_status = 0
--      dot << command
--      assert_equal "\e[0;32;49m.\e[0m", output.strip
--    end
--
--    def test_command_failure
--      command = SSHKit::Command.new(:ls, {raise_on_non_zero_exit: false})
--      command.exit_status = 1
--      dot << command
--      assert_equal "\e[0;31;49m.\e[0m", output.strip
--    end
--
-   end
- end
---- ruby-sshkit-1.7.1.orig/test/unit/formatters/test_pretty.rb
-+++ /dev/null
-@@ -1,51 +0,0 @@
--require 'helper'
--require 'sshkit'
--
--module SSHKit
--  class TestPretty < UnitTest
--
--    def setup
--      SSHKit.config.output_verbosity = Logger::DEBUG
--    end
--
--    def output
--      @_output ||= String.new
--    end
--
--    def pretty
--      @_pretty ||= SSHKit::Formatter::Pretty.new(output)
+
+-    def test_can_log_non_strings
+-      pretty.log(Pathname.new('/var/log/my.log'))
+-      assert_log_output "  INFO /var/log/my.log\n"
 -    end
 -
--    def teardown
--      remove_instance_variable :@_pretty
--      remove_instance_variable :@_output
--      SSHKit.reset_configuration!
+     def test_command_lifecycle_logging_without_color
+       simulate_command_lifecycle(pretty)
+
+@@ -84,13 +79,6 @@ module SSHKit
+       assert_equal expected_log_lines, output.split("\n")
+     end
+
+-    def test_unsupported_class
+-      raised_error = assert_raises RuntimeError do
+-        pretty << Pathname.new('/tmp')
+-      end
+-      assert_equal('write only supports formatting SSHKit::LogMessage, called with Pathname: #<Pathname:/tmp>', raised_error.message)
 -    end
 -
--    def test_logging_fatal
--      pretty << SSHKit::LogMessage.new(Logger::FATAL, "Test")
--      assert_equal output.strip, "\e[0;31;49mFATAL\e[0m Test"
+     def test_does_not_log_message_when_verbosity_is_too_low
+       SSHKit.config.output_verbosity = Logger::WARN
+       pretty.info('Some info')
+
+--- ruby-sshkit-1.8.0.orig/test/unit/formatters/test_simple_text.rb
++++ ruby-sshkit-1.8.0/test/unit/formatters/test_simple_text.rb
+@@ -28,11 +28,6 @@ module SSHKit
+       assert_log_output "some spaces\n"
+     end
+
+-    def test_can_log_non_strings
+-      simple.log(Pathname.new('/var/log/my.log'))
+-      assert_log_output "/var/log/my.log\n"
 -    end
 -
--    def test_logging_error
--      pretty << SSHKit::LogMessage.new(Logger::ERROR, "Test")
--      assert_equal output.strip, "\e[0;31;49mERROR\e[0m Test"
+     def test_command_lifecycle_logging
+       command = SSHKit::Command.new(:a_cmd, 'some args', host: Host.new('user at localhost'))
+       command.stubs(:uuid).returns('aaaaaa')
+@@ -57,13 +52,6 @@ module SSHKit
+       assert_equal expected_log_lines, output.split("\n")
+     end
+
+-    def test_unsupported_class
+-      raised_error = assert_raises RuntimeError do
+-        simple << Pathname.new('/tmp')
+-      end
+-      assert_equal('write only supports formatting SSHKit::LogMessage, called with Pathname: #<Pathname:/tmp>', raised_error.message)
 -    end
 -
--    def test_logging_warn
--      pretty << SSHKit::LogMessage.new(Logger::WARN, "Test")
--      assert_equal output.strip, "\e[0;33;49mWARN\e[0m Test".strip
--    end
+     def test_does_not_log_when_verbosity_is_too_low
+       SSHKit.config.output_verbosity = Logger::WARN
+       simple.info('Some info')
+--- ruby-sshkit-1.8.0.orig/test/unit/test_deprecation_logger.rb
++++ ruby-sshkit-1.8.0/test/unit/test_deprecation_logger.rb
+@@ -12,17 +12,6 @@ module SSHKit
+       @logger ||= DeprecationLogger.new(output)
+     end
+
+-    def test_hides_duplicate_deprecation_warnings
+-      line_number = generate_warning
+-      generate_warning
 -
--    def test_logging_info
--      pretty << SSHKit::LogMessage.new(Logger::INFO, "Test")
--      assert_equal output.strip, "\e[0;34;49mINFO\e[0m Test".strip
--    end
+-      actual_lines = output.lines.to_a
 -
--    def test_logging_debug
--      pretty << SSHKit::LogMessage.new(Logger::DEBUG, "Test")
--      assert_equal output.strip, "\e[0;30;49mDEBUG\e[0m Test".strip
+-      assert_equal(2, actual_lines.size)
+-      assert_equal "[Deprecated] Some message\n", actual_lines[0]
+-      assert_match %r{    \(Called from .*sshkit/test/unit/test_deprecation_logger.rb:#{line_number}:in `generate_warning'\)\n}, actual_lines[1]
 -    end
 -
--  end
--end
+     def test_handles_nil_output
+       DeprecationLogger.new(nil).log('Some message')
+     end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-sshkit.git



More information about the Pkg-ruby-extras-commits mailing list