Sha256: 574e425d192556c4b69fdcd53ce11c6f5d05f1bf8801be15f52bedefe8fe5211

Contents?: true

Size: 810 Bytes

Versions: 2

Compression:

Stored size: 810 Bytes

Contents

module PlataformaSocial
  def self.domains module_name
    domains = {
      :js => 'js',
      :analytics => 'analytics',
      :login => 'login',
      :events => 'events',
      :share => 'share',
      :comments => 'comments',
      :ranking => 'ranking',
      :badge => 'badge',
      :notification => 'notification'
    }

    if domains[module_name.to_sym].present?
      name = domains[module_name.to_sym]
  
      url = case Rails.env
        when "production"
          "https://#{name}.plataformasocial.com.br"
        when "development" 
          "https://#{name}.dev.plataformasocial.com.br"
        when "test"
          "https://#{name}.dev.plataformasocial.com.br"
        when "staging"
          "https://#{name}.dev.plataformasocial.com.br"
        end
        
      url
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plataforma_social-0.0.19 lib/plataforma_social/domains.rb
plataforma_social-0.0.18 lib/plataforma_social/domains.rb