Sha256: 36825e97e15855841fb5c00ed83707b2deeaafa42703a1895604ac94bae009b2

Contents?: true

Size: 565 Bytes

Versions: 3

Compression:

Stored size: 565 Bytes

Contents

require 'test/unit'
require 'nokogiri'
require 'fileutils'

require_relative '../lib/rubyjobbuilderdsl'

module JenkinsJob
  class Builder
    def tmpdir
      ::File.join(File.dirname(__FILE__), '..', 'tmp')
    end

    def debug
      ::File.exist?(tmpdir)
    end

    def config_as_xml_node(jobname)
      generate_xml do |name, xml|
        if name == jobname
          File.open(::File.join(tmpdir, "#{name}.xml"), 'w+') do |f|
            f.write(xml)
          end if debug
          return Nokogiri::XML.parse(xml)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubyjobbuilderdsl-0.0.8 test/test_xml_generator.rb
rubyjobbuilderdsl-0.0.6 test/test_xml_generator.rb
rubyjobbuilderdsl-0.0.4 test/test_xml_generator.rb