Module: GitFit::Install::Actions
- Defined in:
- lib/git_fit/install/actions.rb
Constant Summary collapse
- TEMPLATE_DIR =
File.("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
- .install(family = nil, check: false, dry_run: false) ⇒ Object
- .restore_action(db_path = "db/fit.sqlite3") ⇒ Object
- .save_action(db_path = "db/fit.sqlite3") ⇒ Object
Class Method Details
.install(family = nil, check: false, dry_run: false) ⇒ Object
74 75 76 77 |
# File 'lib/git_fit/install/actions.rb', line 74 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
79 80 81 |
# File 'lib/git_fit/install/actions.rb', line 79 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
85 86 87 |
# File 'lib/git_fit/install/actions.rb', line 85 def self.save_action(db_path = "db/fit.sqlite3") render("db-store/save", db_path: db_path) end |