Sha256: e34575be301b271181bbd94e4866a1b3aa072b5d0783f4f5ed374f931f91e17b

Contents?: true

Size: 351 Bytes

Versions: 7

Compression:

Stored size: 351 Bytes

Contents

require 'uri'

module OData
  module Support
    class SampleServiceMatcher
      def self.call(req1, req2)
        regexp = /^(https?:\/\/(?:[^@]*@)?)[^:]*(:\d+\/.*$)/i
        request1 = req1.uri.match(regexp)
        request2 = req2.uri.match(regexp)

        (request1[1] == request2[1]) && (request1[2] == request2[2])
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby_odata-0.2.0.beta1 spec/support/sample_service_matcher.rb
ruby_odata-0.1.6 spec/support/sample_service_matcher.rb
ruby_odata-0.1.5 spec/support/sample_service_matcher.rb
ruby_odata-0.1.4 spec/support/sample_service_matcher.rb
ruby_odata-0.1.3 spec/support/sample_service_matcher.rb
ruby_odata-0.1.2 spec/support/sample_service_matcher.rb
ruby_odata-0.1.1 spec/support/sample_service_matcher.rb