Sha256: 88ad611ff75e4dec2c1f514f0a89fbf36cdf6e31787e01950d3e5930cd1ab291

Contents?: true

Size: 897 Bytes

Versions: 2

Compression:

Stored size: 897 Bytes

Contents

module JmeterPerf
  class DSL
    def keystore_configuration(params = {}, &)
      node = JmeterPerf::KeystoreConfiguration.new(params)
      attach_node(node, &)
    end
  end

  class KeystoreConfiguration
    attr_accessor :doc
    include Helper

    def initialize(params = {})
      testname = params.is_a?(Array) ? "KeystoreConfiguration" : (params[:name] || "KeystoreConfiguration")
      @doc = Nokogiri::XML(<<~EOS.strip_heredoc)
        <KeystoreConfig guiclass="TestBeanGUI" testclass="KeystoreConfig" testname="#{testname}" enabled="true">
          <stringProp name="endIndex"/>
          <stringProp name="preload">True</stringProp>
          <stringProp name="startIndex"/>
          <stringProp name="clientCertAliasVarName"/>
        </KeystoreConfig>
      EOS
      update params
      update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jmeter_perf-0.0.6 lib/jmeter_perf/dsl/keystore_configuration.rb
jmeter_perf-0.0.2 lib/jmeter_perf/dsl/keystore_configuration.rb