Sha256: d57382bcc3a4b7d5f57daeb13dfe0c2aaf87d8c39ed08158eed392a06a7b05d9

Contents?: true

Size: 1.02 KB

Versions: 487

Compression:

Stored size: 1.02 KB

Contents

module Fastlane
  module Actions
    # will make sure a gem is installed. If it's not an appropriate error message is shown
    # this will *not* 'require' the gem
    def self.verify_gem!(gem_name)
      begin
        FastlaneRequire.install_gem_if_needed(gem_name: gem_name, require_gem: false)
        # We don't import this by default, as it's not always the same
        # also e.g. cocoapods is just required and not imported
      rescue Gem::LoadError
        UI.error("Could not find gem '#{gem_name}'")
        UI.error("")
        UI.error("If you installed fastlane using `sudo gem install fastlane` run")
        UI.command("sudo gem install #{gem_name}")
        UI.error("to install the missing gem")
        UI.error("")
        UI.error("If you use a Gemfile add this to your Gemfile:")
        UI.important("  gem '#{gem_name}'")
        UI.error("and run `bundle install`")

        UI.user_error!("You have to install the `#{gem_name}` gem on this machine") unless Helper.is_test?
      end
      true
    end
  end
end

Version data entries

487 entries across 487 versions & 1 rubygems

Version Path
fastlane-2.79.0.beta.20180124010003 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.79.0.beta.20180123010002 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.78.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.78.0.beta.20180122010003 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.78.0.beta.20180121010003 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.78.0.beta.20180120010003 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.78.0.beta.20180119010003 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.77.1 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.77.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.77.0.beta.20180118010004 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.77.0.beta.20180117010004 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.76.1 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.76.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.76.0.beta.20180116010004 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.76.0.beta.20180115010004 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.76.0.beta.20180114010004 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.76.0.beta.20180113010004 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.76.0.beta.20180112010003 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.76.0.beta.20180111010004 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.76.0.beta.20180110010004 fastlane/lib/fastlane/helper/gem_helper.rb