parent
6cb694779e
commit
484a103604
|
@ -18,4 +18,18 @@ Feature: Search for plugins
|
|||
|
||||
"""
|
||||
|
||||
Scenario: Searching for a plugin by title
|
||||
Given I have catalog meta-data
|
||||
When I run `jpm search "AnsiColor Plugin"`
|
||||
Then the output should contain:
|
||||
"""
|
||||
Loading plugin repository data...
|
||||
|
||||
- AnsiColor Plugin (ansicolor)
|
||||
version: v0.3.1
|
||||
labels: misc
|
||||
wiki: <https://wiki.jenkins-ci.org/display/JENKINS/AnsiColor+Plugin>
|
||||
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ module JPM
|
|||
def search(term)
|
||||
results = []
|
||||
@plugins.each_pair do |name, plugin|
|
||||
if name.match(term)
|
||||
if name.match(term) || plugin.title.match(term)
|
||||
if block_given?
|
||||
yield plugin
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue