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(" Latest version: {{info.version}} ({{age}})\n Installed versions: {% if specs %}{{ specs | map:\"version\" | join: \", \"}}{% else %}\u2014{% endif %}\n{% if current %}\nMost recent installed at: {{current.dir}}\n{% endif %}\n{% unless bundled.type == 'nobundle' %}\n In your bundle: {% if bundled.type == 'notbundled' %}\u2014{% else\n%}{{ bundled.version }} at {{ bundled.dir }}{% endif %}\n{% endunless %}\n\nTry also:\n{% for command in commands %}\n `whatthegem {{info.name}} {{command.handle}}` -- {{command.description}}{% endfor %}\n")
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
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/whatthegem/info.rb', line 25 def locals { info: gem.rubygems.info, age: age, specs: specs, current: specs.last, bundled: gem.bundled.to_h, commands: commands } end |