Class: Middleman::Presentation::Cli::Show

Inherits:
Base
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/middleman-presentation-core/cli/show.rb

Overview

This class provides an ‘presentation init’ command for the middleman CLI.

Instance Method Summary collapse

Methods inherited from Base

#help, subcommand_help

Methods included from Shared

#assets_loader, #bower_path, #enable_debug_mode, included, #open_in_editor

Instance Method Details

#configObject



48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/middleman-presentation-core/cli/show.rb', line 48

def config
  enable_debug_mode

  if options[:defaults]
    puts Middleman::Presentation.config.defaults.to_s
  else
    files = Middleman::Presentation.config.files
    puts Middleman::Presentation.t('views.configs.show.used_config_files', files: files.to_list, count: files.size)
    puts
    puts Middleman::Presentation.config.to_s
  end
end

#support_informationObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/middleman-presentation-core/cli/show.rb', line 10

def support_information
  enable_debug_mode
  load_runtime_assets

  puts FeduxOrgStdlib::SupportInformation.new(
    headlines: {
      rubygems_information: Middleman::Presentation.t('views.support_informations.show.headline.rubygems_information'),
      system_information: Middleman::Presentation.t('views.support_informations.show.headline.system_information'),
      installed_rubygems: Middleman::Presentation.t('views.support_informations.show.headline.installed_rubygems')
    },
    underline_character: Middleman::Presentation.underline_character
  ).to_s
  puts

  puts Middleman::Presentation.t('views.plugins.list.headline').underline(character: Middleman::Presentation.underline_character)
  puts Middleman::Presentation.plugins_manager.to_s
  puts

  puts Middleman::Presentation.t('views.helpers.list.headline').underline(character: Middleman::Presentation.underline_character)
  puts Middleman::Presentation.helpers_manager.to_s
  puts

  puts Middleman::Presentation.t('views.assets.list.headline').underline(character: Middleman::Presentation.underline_character)
  puts Middleman::Presentation.assets_manager.to_s
  puts

  puts Middleman::Presentation.t('views.components.list.headline').underline(character: Middleman::Presentation.underline_character)
  puts Middleman::Presentation.components_manager.to_s
  puts
end

#versionObject



42
43
44
# File 'lib/middleman-presentation-core/cli/show.rb', line 42

def version
  puts Middleman::Presentation::VERSION
end