class Database
Public Class Methods
new(file_path = "data.yml")
click to toggle source
# File lib/xcodeci/database.rb, line 4 def initialize (file_path = "data.yml") @store = YAML::Store.new(file_path) end
Public Instance Methods
should_build_commit(appname, commit_hash)
click to toggle source
# File lib/xcodeci/database.rb, line 8 def should_build_commit appname, commit_hash report = @store.transaction { commits = @store[appname] if commits.nil? nil else @store[appname][commit_hash] end } report.nil? end
store_result(appname, commit_hash, result)
click to toggle source
# File lib/xcodeci/database.rb, line 20 def store_result appname, commit_hash, result @store.transaction do @store[appname] ||= Hash.new @store[appname][commit_hash] = result @store.commit end end