Class: Serverkit::Resources::Git

Inherits:
Base
  • Object
show all
Defined in:
lib/serverkit/resources/git.rb

Constant Summary collapse

DEFAULT_STATUS =
"cloned"

Instance Attribute Summary

Attributes inherited from Base

#attributes, #backend, #recipe

Instance Method Summary collapse

Methods inherited from Base

#all_errors, attribute, #handlers, #id, #initialize, #inspect_apply_result, #inspect_check_result, #notifiable?, #run_apply, #run_check, #to_a

Constructor Details

This class inherits a constructor from Serverkit::Resources::Base

Instance Method Details

#applyObject

Note:

Override



13
14
15
16
# File 'lib/serverkit/resources/git.rb', line 13

def apply
  clone if clonable?
  update if updatable?
end

#checkObject

Note:

Override



19
20
21
# File 'lib/serverkit/resources/git.rb', line 19

def check
  has_git? && cloned? && !updatable?
end