Sha256: d989f837230d1cfa6938888b06c18665ae4d12cbd570af71e86c59467c8561bf

Contents?: true

Size: 661 Bytes

Versions: 3

Compression:

Stored size: 661 Bytes

Contents

# RootTenancyUrl will lookup configuration hash and

# TODO: Write Tests (PN)
module IuguSDK
  class RootTenancyUrl

    # +matches?+ will check a request.host against a set of invalid urls
    #
    # * *Args*:
    #   - +request+ -> An ActionDispatch::Request object
    # * *Success*
    #   - Return true if request.host is found in the invalid array
    # * *False*
    #   - Return true if request.host is not found in the invalid array
    def self.matches?(request)
      application_domain = IuguSDK::application_main_host
      valids = [ application_domain, ['www.',application_domain].join ]
      valids.include?( request.host )
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
iugusdk-1.0.0.alpha.2 lib/iugusdk/root_tenancy_url.rb
iugusdk-1.0.0.alpha.1 lib/iugusdk/root_tenancy_url.rb
iugusdk-1.0.0.alpha.0 lib/iugusdk/root_tenancy_url.rb