Sha256: d93202caa8b4e6b822b4b04fed12e125c29a9f1afaacb47b4208ceb258aed972

Contents?: true

Size: 807 Bytes

Versions: 11

Compression:

Stored size: 807 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

11 entries across 11 versions & 1 rubygems

Version Path
plataforma_social-0.0.26 lib/plataforma_social/domains.rb
plataforma_social-0.0.25 lib/plataforma_social/domains.rb
plataforma_social-0.0.24 lib/plataforma_social/domains.rb
plataforma_social-0.0.23 lib/plataforma_social/domains.rb
plataforma_social-0.0.22 lib/plataforma_social/domains.rb
plataforma_social-0.0.21 lib/plataforma_social/domains.rb
plataforma_social-0.0.20 lib/plataforma_social/domains.rb
plataforma_social-0.0.17 lib/plataforma_social/domains.rb
plataforma_social-0.0.16 lib/plataforma_social/domains.rb
plataforma_social-0.0.15 lib/plataforma_social/domains.rb
plataforma_social-0.0.14 lib/plataforma_social/domains.rb