Class: Lono::Extension::List
- Inherits:
-
Object
- Object
- Lono::Extension::List
- Defined in:
- lib/lono/extension/list.rb
Instance Method Summary collapse
- #blueprint_configsets ⇒ Object
-
#initialize(options = {}) ⇒ List
constructor
A new instance of List.
- #project_configsets ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ List
Returns a new instance of List.
5 6 7 8 |
# File 'lib/lono/extension/list.rb', line 5 def initialize(={}) = @stack, @blueprint, @template, @param = Lono::Conventions.new().values end |
Instance Method Details
#blueprint_configsets ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/lono/extension/list.rb', line 18 def blueprint_configsets Lono::Extensions::Preparer.new().run # register and materialize gems tracked_extension_names = Lono::Jade::Registry.tracked_extensions.map(&:name) finder = Lono::Finder::Extension.new jadespecs = finder.find_all presenter = CliFormat::Presenter.new() presenter.header = %w[Name Path Type] jadespecs.each do |j| if tracked_extension_names.include?(j.name) pretty_path = j.root.sub("#{Lono.root}/",'').sub(ENV["HOME"], "~") presenter.rows << [j.name, pretty_path, j.source_type] end end presenter.show end |
#project_configsets ⇒ Object
36 37 38 |
# File 'lib/lono/extension/list.rb', line 36 def project_configsets Lono::Finder::Extension.list(filter_materialized: true, message: "Project extensions:") end |
#run ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/lono/extension/list.rb', line 10 def run if @blueprint blueprint_configsets else project_configsets end end |