Module: Negroku::Versionable::ClassMethods

Defined in:
lib/negroku/versionable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#capfile_updatedObject

Returns the value of attribute capfile_updated.



3
4
5
# File 'lib/negroku/versionable.rb', line 3

def capfile_updated
  @capfile_updated
end

#capfile_versionObject

Returns the value of attribute capfile_version.



3
4
5
# File 'lib/negroku/versionable.rb', line 3

def capfile_version
  @capfile_version
end

#latestObject

Returns the value of attribute latest.



3
4
5
# File 'lib/negroku/versionable.rb', line 3

def latest
  @latest
end

#updatedObject

Returns the value of attribute updated.



3
4
5
# File 'lib/negroku/versionable.rb', line 3

def updated
  @updated
end

Instance Method Details

#check_capfile_versionObject



12
13
14
# File 'lib/negroku/versionable.rb', line 12

def check_capfile_version
  self.capfile_updated = is_latest?(capfile_version, version)
end

#check_versionObject



5
6
7
8
9
10
# File 'lib/negroku/versionable.rb', line 5

def check_version
  require 'gems'

  self.latest = Gems.versions("negroku").first["number"]
  self.updated = is_latest?(version, self.latest)
end