Sha256: 486db2e5fcd22f891e9da6836c5111a04b1fbc1f2a446b7a2fdb3f138cade4c9

Contents?: true

Size: 1.72 KB

Versions: 5

Compression:

Stored size: 1.72 KB

Contents

$:.unshift File.expand_path("../lib", __FILE__)
require "dpl/version"

def gemspec_for(provider_name=nil, runtime_dependencies=[])
  Gem::Specification.new do |s|

    s.name                  = ["dpl", provider_name].compact.join("-")
    s.author                = "Konstantin Haase"
    s.email                 = "konstantin.mailinglists@googlemail.com"
    s.homepage              = "https://github.com/travis-ci/dpl"
    s.summary               = %q{deploy tool}
    s.description           = %q{deploy tool abstraction for clients}
    s.license               = 'MIT'

    s.require_path          = 'lib'
    s.required_ruby_version = '>= 2.2'

    # set up version
    s.version = ENV['DPL_VERSION'] || DPL::VERSION

    # dependencies
    if provider_name
      s.add_runtime_dependency 'dpl', s.version
    end

    runtime_dependencies.each do |part|
      s.add_runtime_dependency *part
    end

    s.add_development_dependency 'rspec', '~> 3.0.0'
    s.add_development_dependency 'rspec-its'
    s.add_development_dependency 'rake'
    s.add_development_dependency 'json_pure'
    s.add_development_dependency 'tins'
    s.add_development_dependency 'coveralls'

    # set up files
    if provider_name
      s.files       = `git ls-files`.split("\n").grep(Regexp.new provider_name.to_s)
      s.test_files  = `git ls-files -- {test,spec,features}/*`.split("\n").grep(Regexp.new provider_name.to_s)
    else
      s.files      = `git ls-files`.split("\n").reject {|f| f =~ Regexp.new("provider/")}
      s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n").reject {|f| f =~ Regexp.new("provider/")}
    end
    s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }.grep(Regexp.new provider_name.to_s)

   end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dpl-1.9.1.travis.2608.5 gemspec_helper.rb
dpl-1.9.1.travis.2605.5 gemspec_helper.rb
dpl-1.9.1.travis.2603.5 gemspec_helper.rb
dpl-1.9.1.travis.2592.5 gemspec_helper.rb
dpl-1.9.1.travis.2589.5 gemspec_helper.rb