Sha256: 84eba026d3677fdc70ad586025291b32d6648c2ef5e2a1549dcc68fcfd159680

Contents?: true

Size: 1.31 KB

Versions: 7

Compression:

Stored size: 1.31 KB

Contents

# encoding: utf-8
# vim: set shiftwidth=2 tabstop=2 expandtab:

require 'bundler/gem_tasks'
require 'bundler/setup'
require 'rake/testtask'

task :default => :test

task :"test:prerequisites" do
    raise 'Please define DELPHI_VERSION environment variable' \
		+ ' to run tests with appropriate Delphi compiler' unless ENV['DELPHI_VERSION']
end

Rake::TestTask.new('test:no:delphi') do |t|
    t.ruby_opts << '-d' if Rake.application.options.trace
    t.libs << 'test'
    t.test_files = FileList['test/test*'].delete_if do |f|
      # exclude "delphi" tests
      /delphi/.match(f)
    end
    t.verbose = true
end


desc 'Test on Travis CI (with no Delphi tests)'
task 'travis' => 'test:no:delphi'

Rake::TestTask.new do |t|
    t.ruby_opts << '-d' if Rake.application.options.trace
    t.libs << 'test'
    t.verbose = true
    Rake::application[t.name].enhance([:"test:prerequisites"])
end

desc 'Increase gem version'
task :'version:inc' do
  next_version = Gem::Version.new(Rake::Delphi::VERSION + '.0').bump
  puts "Version is #{next_version} now"
  version_file = File.expand_path('../lib/rake/delphi/version.rb', __FILE__)
  file_content = File.read(version_file).gsub(/(VERSION = )(.+)$/, "\\1'#{next_version}'")
  File.open(version_file, 'w') do |f|
    f.write(file_content)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rake-delphi-0.0.33 Rakefile.rb
rake-delphi-0.0.32 Rakefile.rb
rake-delphi-0.0.31 Rakefile.rb
rake-delphi-0.0.29 Rakefile.rb
rake-delphi-0.0.30 Rakefile.rb
rake-delphi-0.0.28 Rakefile.rb
rake-delphi-0.0.27 Rakefile.rb