Class: Senren::Rails::Installer
- Inherits:
-
Object
- Object
- Senren::Rails::Installer
- Defined in:
- lib/senren/rails/installer.rb
Overview
Idempotent installer that lays down the .senren directory, base component, stylesheet, and initial llms files. Reused by the install generator and by ad-hoc rake task entry points.
Constant Summary collapse
- INSTALL_GENERATOR_TEMPLATES =
File.( '../../generators/senren/install/templates', __dir__ ).freeze
- STATIC_FILES =
{ 'conventions.md.tt' => :conventions_file, 'installed_components.yml.tt' => :installed_components, 'base_component.rb.tt' => :base_component_path, 'senren.css.tt' => :stylesheet_path }.freeze
Instance Attribute Summary collapse
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(paths: HostPaths.new, stdout: $stdout) ⇒ Installer
constructor
A new instance of Installer.
- #run!(force: false) ⇒ Object
Constructor Details
Instance Attribute Details
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
11 12 13 |
# File 'lib/senren/rails/installer.rb', line 11 def paths @paths end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
11 12 13 |
# File 'lib/senren/rails/installer.rb', line 11 def stdout @stdout end |
Instance Method Details
#run!(force: false) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/senren/rails/installer.rb', line 18 def run!(force: false) paths.ensure_dirs! install_static_files(force: force) mirror_registry SkillWriter.new(paths: paths).sync! LlmsWriter.new(paths: paths).generate! print_next_steps true end |