Class: WhatTheGem::Info
Constant Summary collapse
- TEMPLATE =
About info shortening: It is because minitest pastes their whole README there, including a quotations of how they are better than RSpec. (At the same time, RSpec’s info reads “BDD for Ruby”.)
Template.parse(<<~INFO) Latest version: {{info.version}} ({{age}}) {% if prerelease %} Prerelease: {{prerelease.number}} ({{prerelease.age}}) {% endif %} Installed versions: {% if specs %}{{ specs | map:"version" | join: ", "}}{% else %}—{% endif %} {% if current %} Most recent installed at: {{current.dir}} {% endif %} {% unless bundled.type == 'nobundle' %} In your bundle: {% if bundled.type == 'notbundled' %}—{% else %}{{ bundled.version }} at {{ bundled.dir }}{% endif %} {% endunless %} Try also: {% for command in commands %} `whatthegem {{info.name}} {{command.handle}}` -- {{command.description}}{% endfor %} INFO
Constants inherited from Command
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
call, #call, get, #initialize, #meta, register
Constructor Details
This class inherits a constructor from WhatTheGem::Command
Instance Method Details
#locals ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/whatthegem/info.rb', line 28 def locals { info: gem.rubygems.info, age: age, prerelease: prerelease, specs: specs, current: specs.last, bundled: gem.bundled.to_h, commands: commands } end |