Sha256: a78037e3ae149abf7860f73846980f5c333070e7d4d90d94bb395889a4a0d283

Contents?: true

Size: 809 Bytes

Versions: 10

Compression:

Stored size: 809 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" 
          "http://#{name}.dev.plataformasocial.com.br"
        when "test"
          "http://#{name}.dev.plataformasocial.com.br"
        when "staging"
          "http://#{name}.dev.plataformasocial.com.br"
        end
        
      url
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
plataforma_social-0.0.13 lib/plataforma_social/domains.rb
plataforma_social-0.0.12 lib/plataforma_social/domains.rb
plataforma_social-0.0.11 lib/plataforma_social/domains.rb
plataforma_social-0.0.10 lib/plataforma_social/domains.rb
plataforma_social-0.0.9 lib/plataforma_social/domains.rb
plataforma_social-0.0.8 lib/plataforma_social/domains.rb
plataforma_social-0.0.7 lib/plataforma_social/domains.rb
plataforma_social-0.0.6 lib/plataforma_social/domains.rb
plataforma_social-0.0.5 lib/plataforma_social/domains.rb
plataforma_social-0.0.4 lib/plataforma_social/domains.rb