Sha256: c34746196af09477fee2802fe1a79d2e0b82f18537273c138b30497a8c4c80b4

Contents?: true

Size: 528 Bytes

Versions: 34

Compression:

Stored size: 528 Bytes

Contents

module Capistrano
  class VersionValidator
    def initialize(version)
      @version = version
    end

    def verify
      return self if match?
      raise "Capfile locked at #{version}, but #{current_version} is loaded"
    end

    private

    attr_reader :version

    def match?
      available =~ requested
    end

    def current_version
      VERSION
    end

    def available
      Gem::Dependency.new("cap", version)
    end

    def requested
      Gem::Dependency.new("cap", current_version)
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
capistrano-3.19.2 lib/capistrano/version_validator.rb
capistrano-3.19.1 lib/capistrano/version_validator.rb
capistrano-3.19.0 lib/capistrano/version_validator.rb
capistrano-3.18.1 lib/capistrano/version_validator.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/capistrano-3.18.0/lib/capistrano/version_validator.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/capistrano-3.18.0/lib/capistrano/version_validator.rb
capistrano-3.18.0 lib/capistrano/version_validator.rb
capistrano-3.17.3 lib/capistrano/version_validator.rb
capistrano-3.17.2 lib/capistrano/version_validator.rb
capistrano-3.17.1 lib/capistrano/version_validator.rb
capistrano-3.17.0 lib/capistrano/version_validator.rb
capistrano-3.16.0 lib/capistrano/version_validator.rb
capistrano-3.15.0 lib/capistrano/version_validator.rb
capistrano-3.14.1 lib/capistrano/version_validator.rb
capistrano-3.14.0 lib/capistrano/version_validator.rb
capistrano-3.13.0 lib/capistrano/version_validator.rb
capistrano-3.12.1 lib/capistrano/version_validator.rb
capistrano-3.12.0 lib/capistrano/version_validator.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/capistrano-3.11.0/lib/capistrano/version_validator.rb
capistrano-3.11.2 lib/capistrano/version_validator.rb