Sha256: 8452342661916b6019810d710fa71c49836dbc7b62632e4d9a07b582430e4b39

Contents?: true

Size: 625 Bytes

Versions: 8

Compression:

Stored size: 625 Bytes

Contents

# -*- encoding : utf-8 -*-

require 'phrase'
require 'phrase/api'

class Phrase::Api::Config
  def self.api_port
    ENV.fetch("PHRASE_API_PORT", "443")
  end

  def self.api_host
    ENV.fetch("PHRASE_API_HOST", "phraseapp.com")
  end

  def self.api_path_prefix
    "/api/#{Phrase::API_VERSION}"
  end

  def self.api_use_ssl?
    ENV.fetch("PHRASE_API_USE_SSL", "1") == "1"
  end

  def self.api_max_retries
    ENV.fetch("PHRASE_API_MAX_RETRIES", 3).to_i
  end

  def self.skip_ssl_validation?
    ENV.fetch("PHRASE_API_SKIP_SSL_VALIDATION", "0") == "1"
  end

  def self.proxy
    ENV.fetch("http_proxy", nil)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
phrase-0.4.33 lib/phrase/api/config.rb
phrase-0.4.32 lib/phrase/api/config.rb
phrase-0.4.31 lib/phrase/api/config.rb
phrase-0.4.30 lib/phrase/api/config.rb
phrase-0.4.29 lib/phrase/api/config.rb
phrase-0.4.28 lib/phrase/api/config.rb
phrase-0.4.27 lib/phrase/api/config.rb
phrase-0.4.26 lib/phrase/api/config.rb