Class: Bundler::Stats::CLI
- Inherits:
-
Thor
- Object
- Thor
- Bundler::Stats::CLI
- Defined in:
- lib/bundler/stats/cli.rb
Instance Method Summary collapse
Instance Method Details
#show(target) ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/bundler/stats/cli.rb', line 32 def show(target) calculator = build_calculator() stats = calculator.summarize(target) if [:format] =~ /json/i say JSON.pretty_generate(stats) else draw_show(stats, target) end end |
#stats ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/bundler/stats/cli.rb', line 17 def stats calculator = build_calculator() stats = calculator.stats if [:format] =~ /json/i say JSON.pretty_generate(stats) else draw_stats(stats[:gems], stats[:summary]) end end |
#version ⇒ Object
59 60 61 |
# File 'lib/bundler/stats/cli.rb', line 59 def version say "bundler-stats #{VERSION}" end |
#versions(target) ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/bundler/stats/cli.rb', line 47 def versions(target) calculator = build_calculator() stats = calculator.versions(target) if [:format] =~ /json/i say JSON.pretty_generate(stats) else draw_versions(stats, target) end end |