lib/mutx/support/change_inspector.rb in mutx-0.2.7 vs lib/mutx/support/change_inspector.rb in mutx-0.2.8
- old
+ new
@@ -7,12 +7,12 @@
# 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?
+ def self.is_there_a_change? data_json
if Mutx::Support::Configuration.use_git?
- if Mutx::Database::MongoConnector.last_commit != (last_repo_commit = Mutx::Support::Git.last_remote_commit)
+ if Mutx::Database::MongoConnector.last_commit != (last_repo_commit = data_json)#(last_repo_commit = Mutx::Support::Git.last_remote_commit)
Mutx::Support::Log.debug "Git has been changed. Perform code update" if Mutx::Support::Log
Mutx::Support::Git.reset_hard_and_pull
Mutx::Database::MongoConnector.insert_commit(last_repo_commit)
Mutx::Support::Log.debug "Commit log updated on database" if Mutx::Support::Log
true
\ No newline at end of file