lib/appraisal/gemspec.rb in appraisal-1.0.2 vs lib/appraisal/gemspec.rb in appraisal-1.0.3
- old
+ new
@@ -11,20 +11,19 @@
def to_s
"gemspec #{Utils.format_string(exported_options)}"
end
+ # :nodoc:
+ def for_dup
+ "gemspec #{Utils.format_string(@options)}"
+ end
+
private
def exported_options
- # Check to see if this is an absolute path
- if @options[:path] =~ /^(?:\/|\S:)/ || @options[:path] == '../'
- @options
- else
- # Remove leading ./ from path, if any
- cleaned_path = @options[:path].gsub(/(^|\/)\.\/?/, '\1')
- exported_path = ::File.join("..", cleaned_path)
- @options.merge(:path => exported_path)
- end
+ @options.merge(
+ path: Utils.prefix_path(@options[:path])
+ )
end
end
end