Sha256: 5f23dea5b90b8402e9603392f80c98ee825343b91d3cc8feed016d65f987aeb0

Contents?: true

Size: 794 Bytes

Versions: 3

Compression:

Stored size: 794 Bytes

Contents

module Fastlane
  module Helper
    class XcversionHelper
      def self.find_xcode(req)
        req = Gem::Requirement.new(req.to_s)

        require 'xcode/install'
        installer = XcodeInstall::Installer.new
        installed = installer.installed_versions.reverse
        installed.detect do |xcode|
          req.satisfied_by?(Gem::Version.new(xcode.version))
        end
      end

      module Verify
        def self.requirement(req)
          UI.user_error!("Version must be specified") if req.nil? || req.to_s.strip.size == 0
          Gem::Requirement.new(req.to_s)
        rescue Gem::Requirement::BadRequirementError
          UI.user_error!("The requirement '#{req}' is not a valid RubyGems style requirement")
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fastlane_hotfix-2.165.1 fastlane/lib/fastlane/helper/xcversion_helper.rb
fastlane_hotfix-2.165.0 fastlane/lib/fastlane/helper/xcversion_helper.rb
fastlane_hotfix-2.187.0 fastlane/lib/fastlane/helper/xcversion_helper.rb