class Percy::Config
Attributes
access_token[W]
@!attribute [w] access_token
@return [String] Percy project 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 default_widths
@return [Array] List of default widths for snapshot rendering unless overridden.
api_url[W]
debug[W]
default_widths[W]
Public Instance Methods
access_token()
click to toggle source
# File lib/percy/config.rb, line 28 def access_token @access_token ||= ENV['PERCY_TOKEN'] end
api_url()
click to toggle source
# File lib/percy/config.rb, line 32 def api_url @api_url ||= ENV['PERCY_API'] || 'https://percy.io/api/v1' end
debug()
click to toggle source
# File lib/percy/config.rb, line 36 def debug @debug ||= ENV['PERCY_DEBUG'] == '1' end
default_widths()
click to toggle source
List of default widths sent for every snapshot, unless overridden on a per-snapshot basis.
# File lib/percy/config.rb, line 41 def default_widths @default_widths ||= [] end
keys()
click to toggle source
List of configurable keys for {Percy::Client} @return [Array] Option keys.
# File lib/percy/config.rb, line 19 def keys @keys ||= [ :access_token, :api_url, :debug, :default_widths, ] end