Class: Gemsi
- Inherits:
-
Object
- Object
- Gemsi
- Defined in:
- lib/gemsi.rb
Constant Summary collapse
- GEM_LINE_PATTERN =
/^\s*(gem|group|ruby)/.freeze
- GEM_NAME_PATTERN =
/^\s*gem\s*[\'\"]([-_\w\d]*)[\'\"]/.freeze
- GEMFILE =
'Gemfile'
- TAB_SIZE =
20
Class Method Summary collapse
Class Method Details
.main(path = nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gemsi.rb', line 10 def main(path = nil) gems = parsed_gems(path) gem_names_arr = [] gems.each do |gem| next if !gem[:is_parsed] || gem[:name].nil? gem_names_arr << gem[:name] gem[:spec] = gems_descriptions.detect { |description| description[:name] == gem[:name] } end name_size = gem_names_arr.max_by(&:length).size print_descriptions(gems, name_size) end |