Sha256: 9ba48fee758b75a90092890170eb6d1fe16f71c631bd26d79a7337df2717474e

Contents?: true

Size: 453 Bytes

Versions: 25

Compression:

Stored size: 453 Bytes

Contents

module Spider
   
    # TODO: remove when old RubyGems versions are not a problem anymore
    def self.gem_available?(name, *requirements)
        if Gem::Specification.respond_to?(:find_by_name)
            begin
                Gem::Specification.find_by_name(name, *requirements)
            rescue Gem::LoadError
                return false
            end
        else
            Gem.available?(name, requirements.first)
        end
    end 

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
spiderfw-1.0.1 lib/spiderfw/utils/gems.rb
spiderfw-1.0.0 lib/spiderfw/utils/gems.rb
spiderfw-0.6.39 lib/spiderfw/utils/gems.rb
spiderfw-0.6.38 lib/spiderfw/utils/gems.rb
spiderfw-0.6.37 lib/spiderfw/utils/gems.rb
spiderfw-0.6.35 lib/spiderfw/utils/gems.rb
spiderfw-0.6.34 lib/spiderfw/utils/gems.rb
spiderfw-0.6.33 lib/spiderfw/utils/gems.rb
spiderfw-0.6.32 lib/spiderfw/utils/gems.rb
spiderfw-0.6.31 lib/spiderfw/utils/gems.rb
spiderfw-0.6.30 lib/spiderfw/utils/gems.rb
spiderfw-0.6.29 lib/spiderfw/utils/gems.rb
spiderfw-0.6.28 lib/spiderfw/utils/gems.rb
spiderfw-0.6.27 lib/spiderfw/utils/gems.rb
spiderfw-0.6.26 lib/spiderfw/utils/gems.rb
spiderfw-0.6.26.pre1 lib/spiderfw/utils/gems.rb
spiderfw-0.6.25 lib/spiderfw/utils/gems.rb
spiderfw-0.6.24 lib/spiderfw/utils/gems.rb
spiderfw-0.6.23 lib/spiderfw/utils/gems.rb
spiderfw-0.6.22 lib/spiderfw/utils/gems.rb