BasicSpecification is an abstract class which implements some common code used by both Specification and StubSpecification.
True when the gem has been activated
# File rubygems/basic_specification.rb, line 40
def activated?
raise NotImplementedError
end
Return true if this spec can require file.
# File rubygems/basic_specification.rb, line 70
def contains_requirable_file? file
root = full_gem_path
suffixes = Gem.suffixes
require_paths.any? do |lib|
base = "#{root}/#{lib}/#{file}"
suffixes.any? { |suf| File.file? "#{base}#{suf}" }
end
end
Set the filename of the Specification was
loaded from. path is converted to a String.
# File rubygems/basic_specification.rb, line 59
def filename= path
@filename = path && path.to_s
@full_gem_path = nil
@gems_dir = nil
@base_dir = nil
end
The full path to the gem (install path + full name).
# File rubygems/basic_specification.rb, line 83
def full_gem_path
# TODO: This is a heavily used method by gems, so we'll need
# to aleast just alias it to #gem_dir rather than remove it.
@full_gem_path ||= find_full_gem_path
end
Name of the gem
# File rubygems/basic_specification.rb, line 12
def name
raise NotImplementedError
end
Platform of the gem
# File rubygems/basic_specification.rb, line 26
def platform
raise NotImplementedError
end
Require paths of the gem
# File rubygems/basic_specification.rb, line 33
def require_paths
raise NotImplementedError
end
Return a Gem::Specification from this gem
# File rubygems/basic_specification.rb, line 47
def to_spec
raise NotImplementedError
end
Version of the gem
# File rubygems/basic_specification.rb, line 19
def version
raise NotImplementedError
end