Sha256: 531505016ca6f8ac34e3f52e44285b330a68037ba3aafff6ce3e80701062a113

Contents?: true

Size: 730 Bytes

Versions: 25

Compression:

Stored size: 730 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  class RSpec
    # Print's useful information about env: Ruby / Rails versions,
    # Doorkeeper configuration, etc.
    def self.print_configuration_info
      puts <<-INFO.strip_heredoc
        ====> Doorkeeper ORM: '#{Doorkeeper.configuration.orm}'
        ====> Doorkeeper version: #{Doorkeeper.gem_version}
        ====> Rails version: #{::Rails.version}
        ====> Ruby version: #{RUBY_VERSION} on #{RUBY_PLATFORM}
      INFO
    end

    # Tries to find ORM from the Gemfile used to run test suite
    def self.detect_orm
      orm = (ENV["BUNDLE_GEMFILE"] || "").match(/Gemfile\.(.+)\.rb/)
      (orm && orm[1] || ENV["ORM"] || :active_record).to_sym
    end
  end
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
doorkeeper-5.2.1 spec/support/doorkeeper_rspec.rb
doorkeeper-5.2.0 spec/support/doorkeeper_rspec.rb
doorkeeper-5.2.0.rc3 spec/support/doorkeeper_rspec.rb
doorkeeper-5.2.0.rc2 spec/support/doorkeeper_rspec.rb
doorkeeper-5.2.0.rc1 spec/support/doorkeeper_rspec.rb