Sha256: 56756cee5bbefaaceb566a893ea597d9f14331685c620e583f0036771d28da7d

Contents?: true

Size: 690 Bytes

Versions: 1

Compression:

Stored size: 690 Bytes

Contents

module Percy
  def self.client_info
    "percy-capybara/#{VERSION}"
  end

  def self.environment_info
    env_strings = [
      "rails/#{self._rails_version}",
      "sinatra/#{self._sinatra_version}",
      "ember-cli-rails/#{self._ember_cli_rails_version}",
    ].reject do |info|
      info =~ /\/$/ # reject if version is empty
    end
    env_strings.empty? ? 'unknown' : env_strings.join('; ')
  end

  def self._ember_cli_rails_version
    return unless defined? EmberCli

    require 'ember_cli/version'
    EmberCli::VERSION
  end

  def self._rails_version
    Rails.version if defined? Rails
  end

  def self._sinatra_version
    Sinatra::VERSION if defined? Sinatra
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
percy-capybara-4.0.0.pre.beta1 lib/environment.rb