Sha256: 1be9f83dd41d25996f1bab27c70e590c857ec0f74445d8713968c39d03de032f

Contents?: true

Size: 1.7 KB

Versions: 3

Compression:

Stored size: 1.7 KB

Contents

module Slideshow

class List

  include LogUtils::Logging

  include ManifestHelper

### fix: remove opts, use config (wrapped!!)
  
  def initialize( opts, config )
    @opts    = opts
    @config  = config
  end

  attr_reader :opts, :config

  def run
    home = Env.home
    ## replace home w/ ~ (to make out more readable (shorter))
    ## e.g. use gsub( home, '~' )

    puts ''
    puts 'Installed plugins in search path'

    installed_plugin_manifest_patterns.each_with_index do |pattern,i|
      puts "    [#{i+1}] #{pattern.gsub(home,'~')}"
    end
    puts '  include:'

    installed_plugin_manifests.each do |manifest|
      pakname      = manifest[0].gsub('.txt','').gsub('.plugin','')
      manifestpath = manifest[1].gsub(home,'~')
      puts "%16s (%s)" % [pakname,manifestpath]
    end

    puts ''
    puts 'Installed quickstarter packs in search path'

    installed_quick_manifest_patterns.each_with_index do |pattern,i|      
      puts "    [#{i+1}] #{pattern.gsub(home,'~')}"
    end
    puts '  include:'
    
    installed_quick_manifests.each do |manifest|
      pakname      = manifest[0].gsub('.txt','').gsub('.quick','')
      manifestpath = manifest[1].gsub(home,'~')
      puts "%16s (%s)" % [pakname,manifestpath]
    end


    puts ''
    puts 'Installed template packs in search path'
    
    installed_template_manifest_patterns.each_with_index do |pattern,i|
      puts "    [#{i+1}] #{pattern.gsub(home,'~')}"
    end
    puts '  include:'
    
    installed_template_manifests.each do |manifest|
      pakname      = manifest[0].gsub('.txt','')
      manifestpath = manifest[1].gsub(home,'~')
      puts "%16s (%s)" % [pakname,manifestpath]
    end
    
  end

end # class List

end # class Slideshow

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slideshow-2.3.0 lib/slideshow/cli/commands/list.rb
slideshow-2.2.0 lib/slideshow/cli/commands/list.rb
slideshow-2.1.0 lib/slideshow/cli/commands/list.rb