public
Description: Remote multi-server automation tool
Homepage: http://www.capify.org
Clone URL: git://github.com/jamis/capistrano.git
jamis (author)
Fri May 02 13:47:55 -0700 2008
commit  cf8826617c474dcff4ef360edf09858f59b52b08
tree    8e0fcf43749365f2c4c8d9e9f3ae1cd5e5d90857
parent  838f6abd74b4d4244111a698ab8b955fbe678cde
capistrano / lib / capistrano / version.rb
100644 23 lines (19 sloc) 0.709 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Capistrano
  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 = 2
    MINOR = 3
    TINY = 0
 
    STRING = [MAJOR, MINOR, TINY].join(".")
    
    SSH_REQUIRED = [1,0,10]
    SFTP_REQUIRED = [1,1,0]
  end
end