Sha256: 8818ac5b6aca451011cd9f1113a93e03f1e199747fdca906ecc3eed5cca9f4f7

Contents?: true

Size: 813 Bytes

Versions: 16

Compression:

Stored size: 813 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
  true
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
jenkins_pipeline_builder-0.15.3 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.15.2 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.15.1 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.14.0 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.13.4 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.13.3 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.13.2 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.13.1 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.13.0 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.12.3 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.12.2 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.12.1 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.12.0 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.11.2 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.11.1 lib/jenkins_pipeline_builder/extension_dsl.rb
jenkins_pipeline_builder-0.11.0 lib/jenkins_pipeline_builder/extension_dsl.rb