Module: Dots

Defined in:
lib/ruby/dots/sanity.rb,
lib/ruby/dots.rb,
lib/ruby/dots/command.rb,
lib/ruby/dots/version.rb,
lib/ruby/dots/dot_file.rb,
lib/ruby/dots/packages.rb,
lib/ruby/dots/bootstrap.rb,
lib/ruby/dots/persistence.rb,
lib/ruby/dots/installation.rb

Overview

Dots::Installation

These are various tasks that DOTS uses to install itself onto each machine. While most RubyGems are served from its directory in GEM_HOME, DOTS is primarily run from the user’s home directory, since a user typically makes all kinds of shell configuration enhancements after installing.

Defined Under Namespace

Modules: Bootstrap, Installation, Persistence, Sanity Classes: Command, DotFile, Packages

Constant Summary collapse

GEMS =

All gems installed by DOTS

%w(dots pv git_tracker rails)
HOME =

The home directory for the current user.

ENV['HOME']
VERSION =
"0.6.0"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.dots_versionObject

Shows a String with the current version of the framework.



37
38
39
# File 'lib/ruby/dots.rb', line 37

def self.dots_version
  "DOTS version #{Dots::VERSION} - http://github.com/tubbo/dots"
end

.gemsObject

Accessor for all gems installed by DOTS, formatted for a ‘gem install`.



49
50
51
# File 'lib/ruby/dots.rb', line 49

def self.gems
  GEMS.join " "
end

.homeObject

The home directory of DOTS.



25
26
27
# File 'lib/ruby/dots.rb', line 25

def self.home
  @home_dir ||= File.expand_path "~/.dots"
end

.rootObject

The root path of the DOTS gem.



17
18
19
20
21
22
# File 'lib/ruby/dots.rb', line 17

def self.root
  @root_dir ||= begin
    spec = Gem::Specification.find_by_name 'zsh_dots'
    spec.gem_dir
  end
end

.usage_informationObject



29
30
31
32
33
34
# File 'lib/ruby/dots.rb', line 29

def self.usage_information
  path = "#{Dots.root}/lib/ruby/templates/usage.txt.erb"
  template = ERB.new File.read(path)

  template.result(binding)
end

Instance Method Details

#dots_versionObject



41
42
43
# File 'lib/ruby/dots.rb', line 41

def dots_version
  self.dots_version
end