Sha256: cf2187efb6a32e3b26b96a350be74c2de826bdd306003679b27634b71f2886a3

Contents?: true

Size: 806 Bytes

Versions: 5

Compression:

Stored size: 806 Bytes

Contents

JenkinsPipelineBuilder.registry.entries.each do |type, path|
  singular_type = type.to_s.singularize
  define_method singular_type do |&block|
    set = JenkinsPipelineBuilder::ExtensionSet.new singular_type, path, &block
    return false unless set.valid?

    JenkinsPipelineBuilder.registry.register([:job, type], set)
    versions = set.extensions.map(&:min_version)
    puts "Successfully registered #{set.name} for versions #{versions}" if set.announced
    true
  end
end

def job_attribute(&block)
  set = JenkinsPipelineBuilder::ExtensionSet.new :job_attribute, &block
  return false unless set.valid?

  JenkinsPipelineBuilder.registry.register([:job], set)
  versions = set.extensions.map(&:min_version)
  puts "Successfully registered #{set.name} for versions #{versions}" if set.announced
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jenkins_pipeline_builder-0.10.16 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.10.15 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.10.14 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.10.13 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.10.12 lib/jenkins_pipeline_builder/extension_dsl.rb