Sha256: 68e03c6c1d2b562d5775a317a39c0eabd37bc07aa08d4cdf8c5a6af72c5b4c68

Contents?: true

Size: 1.65 KB

Versions: 4

Compression:

Stored size: 1.65 KB

Contents

require 'rubygems'
require 'rake/testtask'
require "#{File.dirname(__FILE__)}/lib/new_relic/version.rb"
require "#{File.dirname(__FILE__)}/lib/tasks/all.rb"

task :default => :test

task :test => [:gemspec, 'test:newrelic']

namespace :test do
  desc "Run all tests"
  task :all => %w{newrelic multiverse}

  agent_home = File.expand_path(File.dirname(__FILE__))

  desc "Run functional test suite for newrelic"
  task :multiverse, [:suite, :mode] => [:gemspec] do |t, args|
    args.with_defaults(:suite => "", :mode => "")
    if args.mode == "run_one"
      puts `#{agent_home}/test/multiverse/script/run_one #{args.suite}`
    else
      ruby "#{agent_home}/test/multiverse/script/runner #{args.suite}"
    end
  end

  Rake::TestTask.new(:intentional_fail) do |t|
    t.libs << "#{agent_home}/test"
    t.libs << "#{agent_home}/lib"
    t.pattern = "#{agent_home}/test/intentional_fail.rb"
    t.verbose = true
  end

  # Note unit testing task is defined in lib/tasks/tests.rake to facilitate
  # running them in a rails application environment.

end

desc 'Generate gemspec [ build_number, stage ]'
task :gemspec, [ :build_number, :stage ] do |t, args|
  require 'erb'
  version = NewRelic::VERSION::STRING.split('.')[0..2]
  version << args.build_number.to_s if args.build_number
  version << args.stage.to_s        if args.stage

  version_string = version.join('.')
  gem_version    = Gem::VERSION
  date           = Time.now.strftime('%Y-%m-%d')
  files          = `git ls-files`.split + ['newrelic_rpm.gemspec']

  template = ERB.new(File.read('newrelic_rpm.gemspec.erb'))
  File.open('newrelic_rpm.gemspec', 'w') do |gemspec|
    gemspec.write(template.result(binding))
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
newrelic_rpm-3.5.4.35.beta Rakefile
newrelic_rpm-3.5.4.34 Rakefile
newrelic_rpm-3.5.4.33 Rakefile
newrelic_rpm-3.5.4.31.beta Rakefile