Sha256: e24cd39aafe43219a4fcd1adcfa3b71c70f37fdc54d4a6edb4c34a1eddd6020a

Contents?: true

Size: 742 Bytes

Versions: 19

Compression:

Stored size: 742 Bytes

Contents

module Percy
  class Config
    # @!attribute [w] access_token
    #   @return [String] Percy repo access token.
    # @!attribute api_url
    #   @return [String] Base URL for API requests. Default: https://percy.io/api/v1/

    attr_accessor :access_token
    attr_accessor :api_url
    attr_accessor :repo

    # List of configurable keys for {Percy::Client}
    # @return [Array] Option keys.
    def keys
      @keys ||= [
        :access_token,
        :api_url,
        :repo,
      ]
    end

    def access_token
      @access_token ||= ENV['PERCY_TOKEN']
    end

    def api_url
      @api_url ||= ENV['PERCY_API'] || 'https://percy.io/api/v1'
    end

    def repo
      @repo ||= Percy::Client::Environment.repo
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
percy-client-0.5.0 lib/percy/config.rb
percy-client-0.4.1 lib/percy/config.rb
percy-client-0.4.0 lib/percy/config.rb
percy-client-0.3.2 lib/percy/config.rb
percy-client-0.3.1 lib/percy/config.rb
percy-client-0.3.0 lib/percy/config.rb
percy-client-0.2.11 lib/percy/config.rb
percy-client-0.2.10 lib/percy/config.rb
percy-client-0.2.9 lib/percy/config.rb
percy-client-0.2.8 lib/percy/config.rb
percy-client-0.2.7 lib/percy/config.rb
percy-client-0.2.6 lib/percy/config.rb
percy-client-0.2.5 lib/percy/config.rb
percy-client-0.2.4 lib/percy/config.rb
percy-client-0.2.3 lib/percy/config.rb
percy-client-0.2.2 lib/percy/config.rb
percy-client-0.2.1 lib/percy/config.rb
percy-client-0.2.0 lib/percy/config.rb
percy-client-0.1.6 lib/percy/config.rb