class Appraisal::Gemspec
Attributes
Public Class Methods
Source
# File lib/appraisal/gemspec.rb, line 7 def initialize(options = {}) @options = options @options[:path] ||= '.' end
Public Instance Methods
Source
# File lib/appraisal/gemspec.rb, line 12 def exists? Dir[::File.join(@options[:path], "*.gemspec")].size > 0 end
Source
# File lib/appraisal/gemspec.rb, line 16 def to_s if exists? "gemspec #{exported_options.inspect.gsub(/^\{|\}$/, '')}" end end
Private Instance Methods
Source
# File lib/appraisal/gemspec.rb, line 24 def exported_options # Check to see if this is an absolute path if @options[:path] =~ /^(?:\/|\S:)/ @options else # Remove leading ./ from path, if any exported_path = ::File.join("..", @options[:path].sub(/^\.\/?/,'')) @options.merge(:path => exported_path) end end