module ActiveGit

Constants

VERSION

Public Class Methods

batch() { || ... } click to toggle source
# File lib/active_git.rb, line 54
def self.batch(&block)
  @batch_mode = true
  begin
    result = yield
    Synchronizer.synchronize queued_events
    result
  ensure
    @batch_mode = false
    queued_events.clear
  end
end
configuration() click to toggle source
# File lib/active_git.rb, line 29
def self.configuration
  @configuration ||= Configuration.new
end
configure() { |configuration| ... } click to toggle source
# File lib/active_git.rb, line 33
def self.configure
  yield configuration
end
models() click to toggle source
# File lib/active_git.rb, line 37
def self.models
  @models ||= Set.new
end
repository() click to toggle source
# File lib/active_git.rb, line 41
def self.repository
  @repository = GitWrapper::Repository.new(ActiveGit.configuration.working_path) if @repository.nil? || @repository.location != ActiveGit.configuration.working_path
  @repository
end
synchronize(*events) click to toggle source
# File lib/active_git.rb, line 46
def self.synchronize(*events)
  if @batch_mode
    enqueue events
  else
    Synchronizer.synchronize events
  end
end

Private Class Methods

enqueue(*events) click to toggle source
# File lib/active_git.rb, line 68
def self.enqueue(*events)
  events.each { |e| queued_events << e }
end
queued_events() click to toggle source
# File lib/active_git.rb, line 72
def self.queued_events
  @events ||= []
end