Sha256: ec0608c3083eba867fb037537546b05e6d7468058ffd87b1b1b26d3f086f4c70
Contents?: true
Size: 1.8 KB
Versions: 3
Compression:
Stored size: 1.8 KB
Contents
require File.dirname(__FILE__) + '/lib/yard' require File.dirname(__FILE__) + '/lib/yard/rubygems/specification' require 'rbconfig' YARD::VERSION.replace(ENV['YARD_VERSION']) if ENV['YARD_VERSION'] task :default => :travis_ci desc "Publish gem" task :publish do ver = ENV['VERSION'] if ver.nil? || ver.empty? fail "missing VERSION=x.y.z" elsif ver < YARD::VERSION fail "invalid version `#{ver}' (must be >= `#{YARD::VERSION}')" end file = "release-v#{ver}.tar.gz" cmd = "bundle exec samus" sh "#{cmd} build #{ver} && #{cmd} publish #{file} && rm #{file}" end desc "Builds the gem" task :gem do sh "gem build yard.gemspec" end desc "Installs the gem" task :install => :gem do sh "gem install yard-#{YARD::VERSION}.gem --no-document" end begin require 'rvm-tester' RVM::Tester::TesterTask.new do |t| t.rubies = %w(1.8.6 ree jruby 1.8.7 1.9.2 1.9.3) t.bundle_install = false # don't need to do this all the time t.verbose = true end rescue LoadError end task :travis_ci do ENV['SUITE'] = '1' ENV['CI'] = '1' ENV['LEGACY'] = nil Rake::Task['specs'].execute if RUBY_VERSION >= '1.9' && RUBY_PLATFORM != 'java' puts "" puts "Running specs with in legacy mode" ENV['LEGACY'] = '1' Rake::Task['specs'].execute end end desc "Run all specs" task :specs do opts = ['rspec', '-c'] opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')] opts += ['-I', YARD::ROOT] if ENV['DEBUG'] $DEBUG = true opts += ['-d'] end opts += FileList["spec/**/*_spec.rb"].sort cmd = opts.join(' ') puts cmd if Rake.application.options.trace system(cmd) raise "Command failed with status (#{$?.to_i}): #{cmd}" if $?.to_i != 0 end task :spec => :specs YARD::Rake::YardocTask.new do |t| t.options += ['--title', "YARD #{YARD::VERSION} Documentation"] end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
yard-0.9.5 | Rakefile |
yard-0.9.4 | Rakefile |
yard-0.9.3 | Rakefile |