Module: GitFit::Install::Actions

Defined in:
lib/git_fit/install/actions.rb

Constant Summary collapse

TEMPLATE_DIR =
File.expand_path('actions', __dir__)
VERSION_STAMP =
"# Generated by git-fit v#{GitFit::VERSION} — do not edit manually\n"
RESTORE_ACTION =
restore_action
SAVE_ACTION =
save_action

Class Method Summary collapse

Class Method Details

.install(family = nil, check: false, dry_run: false) ⇒ Object



76
77
78
79
# File 'lib/git_fit/install/actions.rb', line 76

def self.install(family = nil, check: false, dry_run: false)
  families = family ? [family] : available_families
  families.flat_map { |f| install_family(f, check: check, dry_run: dry_run) }
end

.restore_action(db_path = 'db/fit.sqlite3') ⇒ Object



81
82
83
# File 'lib/git_fit/install/actions.rb', line 81

def self.restore_action(db_path = 'db/fit.sqlite3')
  render('db-store/restore', db_path: db_path)
end

.save_action(db_path = 'db/fit.sqlite3') ⇒ Object



87
88
89
# File 'lib/git_fit/install/actions.rb', line 87

def self.save_action(db_path = 'db/fit.sqlite3')
  render('db-store/save', db_path: db_path)
end