diff options
| -rw-r--r-- | lib/custodian/protocoltest/mx.rb | 2 | ||||
| -rw-r--r-- | lib/custodian/protocoltest/ssl.rb | 4 | ||||
| -rw-r--r-- | lib/custodian/util/bytemark.rb | 2 | ||||
| -rw-r--r-- | lib/custodian/util/timespan.rb | 12 | ||||
| -rwxr-xr-x | t/test-custodian-util-timespan.rb | 10 | 
5 files changed, 15 insertions, 15 deletions
| diff --git a/lib/custodian/protocoltest/mx.rb b/lib/custodian/protocoltest/mx.rb index 8f260f9..c05283d 100644 --- a/lib/custodian/protocoltest/mx.rb +++ b/lib/custodian/protocoltest/mx.rb @@ -73,7 +73,7 @@ module Custodian              Resolv::DNS.open do |dns|                ress = dns.getresources(@host, Resolv::DNS::Resource::IN::MX) -              ress.map { |r| mx.push( IPSocket::getaddress(r.exchange.to_s) ) } +              ress.map { |r| mx.push( IPSocket.getaddress(r.exchange.to_s) ) }              end            end          rescue Timeout::Error => e diff --git a/lib/custodian/protocoltest/ssl.rb b/lib/custodian/protocoltest/ssl.rb index 18da9f1..4929f7b 100644 --- a/lib/custodian/protocoltest/ssl.rb +++ b/lib/custodian/protocoltest/ssl.rb @@ -154,7 +154,7 @@ class SSLCheck      ctx = OpenSSL::SSL::SSLContext.new(:TLSv1_client)      retried = false      begin -      Timeout::timeout(10) do +      Timeout.timeout(10) do          s = TCPSocket.open(uri.host, uri.port)          s = OpenSSL::SSL::SSLSocket.new(s, ctx)          s.sync_close = true @@ -212,7 +212,7 @@ class SSLCheck      s = nil      begin -      Timeout::timeout(10) do +      Timeout.timeout(10) do          s = TCPSocket.open(uri.host, uri.port)          s = OpenSSL::SSL::SSLSocket.new(s, OpenSSL::SSL::SSLContext.new(:SSLv3_client))          s.sync_close = true diff --git a/lib/custodian/util/bytemark.rb b/lib/custodian/util/bytemark.rb index 9753c18..c821b18 100644 --- a/lib/custodian/util/bytemark.rb +++ b/lib/custodian/util/bytemark.rb @@ -26,7 +26,7 @@ module Custodian        #        # Is the named target inside the Bytemark IP-range?        # -      def Bytemark.inside?( target ) +      def self.inside?( target )          inside = false          if ( BYTEMARK_RANGES.any?{|range| range.include?(IPAddr.new(target))} ) diff --git a/lib/custodian/util/timespan.rb b/lib/custodian/util/timespan.rb index d3166c7..5340c65 100644 --- a/lib/custodian/util/timespan.rb +++ b/lib/custodian/util/timespan.rb @@ -53,8 +53,8 @@ module Custodian        #        def TimeSpan.to_hours( p_start, p_end ) -        p_start = Custodian::Util::TimeSpan::to_hour(p_start) -        p_end   = Custodian::Util::TimeSpan::to_hour(p_end) +        p_start = Custodian::Util::TimeSpan.to_hour(p_start) +        p_end   = Custodian::Util::TimeSpan.to_hour(p_end)          # @@ -99,15 +99,15 @@ module Custodian          #          # Ensure all values are sane and reasonable.          # -        p_start  = Custodian::Util::TimeSpan::to_hour(p_start) -        p_end    = Custodian::Util::TimeSpan::to_hour(p_end) -        cur_hour = Custodian::Util::TimeSpan::to_hour(cur_hour) +        p_start  = Custodian::Util::TimeSpan.to_hour(p_start) +        p_end    = Custodian::Util::TimeSpan.to_hour(p_end) +        cur_hour = Custodian::Util::TimeSpan.to_hour(cur_hour)          #          #  Get the expanded hours          #          valid = -          Custodian::Util::TimeSpan::to_hours( p_start, p_end ) +          Custodian::Util::TimeSpan.to_hours( p_start, p_end )          #          # Lookup to see if the specified hour is within the diff --git a/t/test-custodian-util-timespan.rb b/t/test-custodian-util-timespan.rb index 83eb59f..881f5a5 100755 --- a/t/test-custodian-util-timespan.rb +++ b/t/test-custodian-util-timespan.rb @@ -29,7 +29,7 @@ class TestTimeSpanUtil < Test::Unit::TestCase    def test_to_hour      for hour in 0..23 -      assert_equal( hour, Custodian::Util::TimeSpan::to_hour(hour)) +      assert_equal( hour, Custodian::Util::TimeSpan.to_hour(hour))      end      # @@ -55,11 +55,11 @@ class TestTimeSpanUtil < Test::Unit::TestCase      #  Ensure AM times work well      #      for hour in 0..11 -      assert_equal( hour, Custodian::Util::TimeSpan::to_hour( "#{hour}am")) +      assert_equal( hour, Custodian::Util::TimeSpan.to_hour( "#{hour}am"))      end      for hour in 0..11 -      assert_equal( 12 +hour, Custodian::Util::TimeSpan::to_hour( "#{hour}pm")) +      assert_equal( 12 +hour, Custodian::Util::TimeSpan.to_hour( "#{hour}pm"))      end    end @@ -215,14 +215,14 @@ class TestTimeSpanUtil < Test::Unit::TestCase    def test_wrap_around      for h in 00..23 -      assert_equal( 1, Custodian::Util::TimeSpan::to_hours( h,h ).size() ) +      assert_equal( 1, Custodian::Util::TimeSpan.to_hours( h,h ).size() )      end      #      #  But the time-period 00-23 is a full day      #      assert_equal( 24, -                  Custodian::Util::TimeSpan::to_hours( 0,23 ).size() ) +                  Custodian::Util::TimeSpan.to_hours( 0,23 ).size() )    end | 
