Class: SysInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/slideshow/cli/main_utils.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ SysInfo

Returns a new instance of SysInfo.



66
67
68
# File 'lib/slideshow/cli/main_utils.rb', line 66

def initialize( config )
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



70
71
72
# File 'lib/slideshow/cli/main_utils.rb', line 70

def config
  @config
end

Instance Method Details

#dumpObject



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/slideshow/cli/main_utils.rb', line 72

def dump
puts <<EOS

#{Slideshow.generator}

Gems versions:
- pakman #{Pakman::VERSION}
- fetcher #{Fetcher::VERSION}
- markdown #{Markdown::VERSION}
- textutils #{TextUtils::VERSION}
- props #{Props::VERSION}

      Env home: #{Env.home}
Slideshow config: #{config.config_dir}
 Slideshow cache: #{config.cache_dir}
Slideshow root: #{Slideshow.root}

EOS

# dump Slideshow settings
config.dump
puts
    
# dump Markdown settings
Markdown.dump
puts

# todo:
# add verison for rubygems

## todo: add more gem version info
#- redcloth
#- kramdown

    
  dump_load_path   # helps debugging pluggin loading (e.g. Ruby 1.9.2> no longer includes ./ in load path)
end

#dump_load_pathObject



110
111
112
113
114
115
# File 'lib/slideshow/cli/main_utils.rb', line 110

def dump_load_path
  puts 'load path:'
  $LOAD_PATH.each_with_index do |path,i|
    puts "  [#{i+1}] #{path}"
  end
end