Sha256: 000f40e346cc6c58c98984e5dfbbfddfc249dccb035f864fbfd5127fed92b435

Contents?: true

Size: 568 Bytes

Versions: 11

Compression:

Stored size: 568 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
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
phrase-0.4.25 lib/phrase/api/config.rb
phrase-0.4.24 lib/phrase/api/config.rb
phrase-0.4.23 lib/phrase/api/config.rb
phrase-0.4.22 lib/phrase/api/config.rb
phrase-0.4.21 lib/phrase/api/config.rb
phrase-0.4.20 lib/phrase/api/config.rb
phrase-0.4.19 lib/phrase/api/config.rb
phrase-0.4.18 lib/phrase/api/config.rb
phrase-0.4.17 lib/phrase/api/config.rb
phrase-0.4.16 lib/phrase/api/config.rb
phrase-0.4.15 lib/phrase/api/config.rb