Sha256: 5b3db47f80d1397f2272495535013a056381da5d4561221e4c3133d877750f40

Contents?: true

Size: 614 Bytes

Versions: 11

Compression:

Stored size: 614 Bytes

Contents

module EY
  class Compatibility
    attr_reader :server_version, :client_version, :server_required

    def initialize(client_version, server_required)
      require 'rubygems'
      @client_version = Gem::Version.new(client_version)
      @server_required = Gem::Requirement.new(server_required)
      @server_version = Gem::Version.new(EY::VERSION)
    end

    def server_required_version
      server_required.requirements.first.last
    end

    def compatible?
      server_required.satisfied_by?(server_version)
    end

    def server_newer?
      server_version > server_required_version
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ey-deploy-0.3.3 lib/ey-deploy/compatibility.rb
ey-deploy-0.3.2 lib/ey-deploy/compatibility.rb
ey-deploy-0.3.1 lib/ey-deploy/compatibility.rb
ey-deploy-0.3.0 lib/ey-deploy/compatibility.rb
ey-deploy-0.2.7 lib/ey-deploy/compatibility.rb
ey-deploy-0.2.6 lib/ey-deploy/compatibility.rb
ey-deploy-0.2.5 lib/ey-deploy/compatibility.rb
ey-deploy-0.2.4 lib/ey-deploy/compatibility.rb
ey-deploy-0.2.4.pre2 lib/ey-deploy/compatibility.rb
ey-deploy-0.2.4.pre1 lib/ey-deploy/compatibility.rb
ey-deploy-0.2.4.pre lib/ey-deploy/compatibility.rb