open_gem 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +2 -2
- data/lib/open_gem/common_options.rb +5 -2
- data/lib/rubygems/commands/read_command.rb +1 -1
- metadata +1 -1
data/VERSION.yml
CHANGED
@@ -16,10 +16,13 @@ module OpenGem
|
|
16
16
|
|
17
17
|
def get_spec(name)
|
18
18
|
dep = Gem::Dependency.new name, options[:version]
|
19
|
-
specs = Gem.source_index.search(dep)
|
19
|
+
specs = Gem.source_index.search(dep)
|
20
|
+
if block_given?
|
21
|
+
specs = specs.select{|spec| yield spec}
|
22
|
+
end
|
20
23
|
|
21
24
|
if specs.length == 0
|
22
|
-
say "
|
25
|
+
say "'#{name}' is not available"
|
23
26
|
return nil
|
24
27
|
|
25
28
|
elsif specs.length == 1 || options[:latest]
|