lib/maven/tools/pom.rb in maven-tools-1.0.5 vs lib/maven/tools/pom.rb in maven-tools-1.0.6

- old
+ new

@@ -17,11 +17,10 @@ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'fileutils' -require 'stringio' require 'maven/tools/model' require 'maven/tools/dsl' require 'maven/tools/visitor' require 'rubygems/specification' @@ -30,12 +29,11 @@ class POM include Maven::Tools::DSL def eval_spec( s, snapshot ) @model = tesla do - # spec = s, name = nil - spec s, nil, :snapshot => snapshot, :no_rubygems_repo => true + gemspec s, :snapshot => snapshot, :no_rubygems_repo => true end end def eval_file( file ) if file && ::File.directory?( file ) @@ -79,13 +77,13 @@ end end def to_s if @model - io = StringIO.new + io = String.new v = ::Maven::Tools::Visitor.new( io ) v.accept_project( @model ) - io.string + io end end def to_file( file ) if @model