Sha256: 313c8eac07912048647fdc688f2cef7ec258e3881374e752bb9b6bb8e94c66d8

Contents?: true

Size: 659 Bytes

Versions: 2

Compression:

Stored size: 659 Bytes

Contents

module CapistranoExtensions
  module Version #:nodoc:
    # A method for comparing versions of required modules. It expects two
    # arrays of integers as parameters, the first being the minimum version
    # required, and the second being the actual version available. It returns
    # true if the actual version is at least equal to the required version.
    def self.check(required, actual) #:nodoc:
      required = required.map { |v| "%06d" % v }.join(".")
      actual   = actual.map { |v| "%06d" % v }.join(".")
      return actual >= required
    end

    MAJOR = 0
    MINOR = 1
    TINY  = 4

    STRING = [MAJOR, MINOR, TINY].join(".")
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
jtrupiano-capistrano-extensions-0.1.4 lib/capistrano-extensions/version.rb
capistrano-extensions-0.1.4 lib/capistrano-extensions/version.rb