Sha256: 9f3e94a677730b5f99e3295918f5fe4d31ca9239e82a8eeaf5ac6d1a62c8dbd3
Contents?: true
Size: 1.3 KB
Versions: 19
Compression:
Stored size: 1.3 KB
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/ # @!attribute debug # @return [Boolean] Whether or not to enable debug logging. # @!attribute repo # @return [String] Git repo name. # @!attribute default_widths # @return [Array] List of default widths for snapshot rendering unless overridden. attr_writer :access_token attr_writer :api_url attr_writer :debug attr_writer :repo attr_writer :default_widths # List of configurable keys for {Percy::Client} # @return [Array] Option keys. def keys @keys ||= [ :access_token, :api_url, :debug, :repo, :default_widths, ] 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 debug @debug ||= ENV['PERCY_DEBUG'] == '1' end def repo @repo ||= Percy::Client::Environment.repo end # List of default widths sent for every snapshot, unless overridden on a per-snapshot basis. def default_widths @default_widths ||= [] end end end
Version data entries
19 entries across 19 versions & 1 rubygems