Sha256: 1a795e9c9cadb589ba9c009ca6f2aae45d07321e0761481d669a8035982e1c5c

Contents?: true

Size: 705 Bytes

Versions: 12

Compression:

Stored size: 705 Bytes

Contents

module JmeterPerf
  class ExtendedDSL < DSL
    def module_controller(params, &)
      node = JmeterPerf::DSL::ModuleController.new(params)

      if params[:test_fragment]
        params[:test_fragment].is_a?(String) &&
          params[:test_fragment].split("/")
      elsif params[:node_path]
        params[:node_path]
      else
        []
      end.each_with_index do |node_name, index|
        node.doc.at_xpath("//collectionProp") << Nokogiri::XML(
          JmeterPerf::Helpers::String.strip_heredoc(
            <<-EOS
              <stringProp name="node_#{index}">#{node_name}</stringProp>
            EOS
          )
        ).children
      end

      attach_node(node, &)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
jmeter_perf-1.1.1 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.1.0 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.10 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.9 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.8 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.7 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.6 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.5 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.4 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.2 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.1 lib/jmeter_perf/extend/controllers/module_controller.rb
jmeter_perf-1.0.0 lib/jmeter_perf/extend/controllers/module_controller.rb