Sha256: 269e262728ccd7abd4888db15c54af7c5b61791803523f861bdfbb6f29bd9e2f
Contents?: true
Size: 1.1 KB
Versions: 7
Compression:
Stored size: 1.1 KB
Contents
module Kaya module Support module ChangeInspector # Evaluates if code has been changed. If yes, performs a git reset hard and git pull # Update commit log into Database and return true # Returns true if there is a change in code. # Consider true if git usage is false # @return [Boolean] def self.is_there_a_change? if Kaya::Support::Configuration.use_git? if Kaya::Database::MongoConnector.last_commit != (last_repo_commit = Kaya::Support::Git.last_commit) $K_LOG.debug "Git has been changed. Perform code update" if $K_LOG Kaya::Support::Git.reset_hard_and_pull Kaya::Database::MongoConnector.insert_commit(last_repo_commit) $K_LOG.debug "Commit log updated on database" if $K_LOG true else $K_LOG.debug "No git changes" if $K_LOG false end else true end end def self.is_there_gemfile_lock? begin IO.read("#{Dir.pwd}/Gemfile.lock") rescue false end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems