class MnoEnterprise::Router

MnoEnterprise Router
Centralizes all URLs available on the Maestrano Enterprise side

Attributes

after_sign_out_url[RW]

Customise after_sign_out url

dashboard_path[RW]
terms_url[RW]

Public Instance Methods

admin_path() click to toggle source
# File lib/mno_enterprise/core.rb, line 58
def admin_path
  @admin_path || '/admin/'
end
authorize_oauth_url(id,opts = {}) click to toggle source
# File lib/mno_enterprise/core.rb, line 66
def authorize_oauth_url(id,opts = {})
  host_url("/oauth/#{id}/authorize",opts)
end
disconnect_oauth_url(id,opts = {}) click to toggle source
# File lib/mno_enterprise/core.rb, line 70
def disconnect_oauth_url(id,opts = {})
  host_url("/oauth/#{id}/disconnect",opts)
end
impac_root_url() click to toggle source

@deprecated Impac is now configured through Settings

# File lib/mno_enterprise/core.rb, line 79
def impac_root_url
  warn '[DEPRECATION] `impac_root_url` is deprecated. Impac is now configured in the frontend through `Settings`.'
  URI.join(MnoEnterprise.impac_api_host,MnoEnterprise.impac_api_root_path)
end
launch_url(id,opts = {}) click to toggle source
# File lib/mno_enterprise/core.rb, line 62
def launch_url(id,opts = {})
  host_url("/launch/#{id}",opts)
end
sync_oauth_url(id,opts = {}) click to toggle source
# File lib/mno_enterprise/core.rb, line 74
def sync_oauth_url(id,opts = {})
  host_url("/oauth/#{id}/sync",opts)
end

Private Instance Methods

base_path() click to toggle source
# File lib/mno_enterprise/core.rb, line 85
def base_path
  MnoEnterprise.mno_api_root_path
end
host() click to toggle source
# File lib/mno_enterprise/core.rb, line 89
def host
  MnoEnterprise.mno_api_host
end
host_url(path,opts = {}) click to toggle source
# File lib/mno_enterprise/core.rb, line 93
def host_url(path,opts = {})
  url = URI.join(host,"#{base_path}#{path}").to_s
  url += "?#{opts.to_query}" if opts.any?
  url
end