Method: Gitenv::Controller#run

Defined in:
lib/gitenv/controller.rb

#runObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/gitenv/controller.rb', line 12

def run
  check_config_file!

  create_config_file! if !File.exist?(config_file) and !repository

  repo = repository
  @config.from repo if repo && !repo.empty?

  load_config_file!

  # @config.from repository
  # check_repository!

  # load dot files by default
  # if @config.actions.empty?
  #  @config.symlink @config.dot_files
  # end

  # check_files!

  renderer = Renderer.new
  @config.actions.each do |a|
    a.each do |impl|
      impl.apply if @action == :apply
      puts renderer.render(impl)
    end
  end
end