Sha256: 55df8a317c2f12dbd5d66e2e04ea626955ebdc26fa2438a5110ed8a66f66edde

Contents?: true

Size: 1.54 KB

Versions: 6

Compression:

Stored size: 1.54 KB

Contents

require 'bundler/setup'
require 'bundler/gem_tasks'
require 'appraisal'
require 'rspec/core/rake_task'
require 'coveralls/rake/task'
require 'yard'
require 'yard-rspec'
Coveralls::RakeTask.new

RSpec::Core::RakeTask.new(:spec) do |spec|
  spec.rspec_opts = ['--backtrace '] if ENV['DEBUG']
  spec.verbose = true
end

desc 'Default: run the unit tests.'
task default: [:all]

desc 'Test the plugin under all supported Rails versions.'
task :all do |_t|
  if ENV['TRAVIS']
    # require 'json'
    # puts JSON.pretty_generate(ENV.to_hash)
    if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
      appraisal_name = ENV['BUNDLE_GEMFILE'].scan(/rails_(.*)\.gemfile/).flatten.first
      command_prefix = "appraisal rails-#{appraisal_name}"
      exec ("#{command_prefix} bundle install && #{command_prefix} bundle exec rspec && bundle exec rake coveralls:push ")
    else
      exec(' bundle exec appraisal install && bundle exec rake appraisal spec && bundle exec rake coveralls:push')
   end
  else
    exec('bundle exec appraisal install && bundle exec rake appraisal spec')
  end
end

YARD::Config.options[:load_plugins] = true
YARD::Config.load_plugins

::Rake.application.class.class_eval do
  alias_method :last_comment, :last_description
end

YARD::Rake::YardocTask.new do |t|
  t.files = %w(lib/**/*.rb spec/**/*_spec.rb) # optional
  t.options = %w(--any --extra --opts --markup-provider=redcarpet --markup=markdown --debug) # optional
  t.stats_options = ['--list-undoc'] # optional
end

task :docs do
  exec('bundle exec inch --pedantic && bundle exec yard --list-undoc')
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
washout_builder-2.0.5 Rakefile
washout_builder-2.0.4 Rakefile
washout_builder-2.0.3 Rakefile
washout_builder-2.0.2 Rakefile
washout_builder-2.0.0 Rakefile
washout_builder-1.7.5 Rakefile