lib/onering/util.rb in onering-client-0.4.0 vs lib/onering/util.rb in onering-client-0.4.1
- old
+ new
@@ -76,19 +76,15 @@
510 => 'Not Extended',
511 => 'Network Authentication Required'
}
def gem_path(name)
- begin
- if Gem::Specification.respond_to?(:find_by_name)
- return Gem::Specification.find_by_name(name).gem_dir
- else
- return Gem::SourceIndex.from_installed_gems.find_name(name).sort{|a,b|
- a.version.to_s <=> b.version.to_s
- }.last.full_gem_path
- end
- rescue Gem::LoadError
- return nil
+ if Gem::Specification.respond_to?(:find_by_name)
+ return Gem::Specification.find_by_name(name).gem_dir
+ else
+ return Gem::SourceIndex.from_installed_gems.find_name(name).sort{|a,b|
+ a.version.to_s <=> b.version.to_s
+ }.last.full_gem_path
end
end
def fact(name, default=nil)
reporter = Onering::Reporter.new()
\ No newline at end of file