Sha256: 0948d5e90bf3bf65548aa1c7c3412d00df87dd9b5313392487e67b85ef80ed71

Contents?: true

Size: 1.65 KB

Versions: 16

Compression:

Stored size: 1.65 KB

Contents

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

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

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

# dirty hack for YardocTask
::Rake.application.class.class_eval do
  alias_method :last_comment, :last_description
end

YARD::Rake::YardocTask.new do |t|
  t.files = ['lib/**/*.rb', 'spec/**/*_spec.rb'] # optional
  t.options = ['--any', '--extra', '--opts', '--markup-provider=redcarpet', '--markup=markdown', '--debug'] # optional
  t.stats_options = ['--list-undoc'] # optional
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

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
asana_exception_notifier-2.2.0 Rakefile
asana_exception_notifier-2.1.0 Rakefile
asana_exception_notifier-2.0.2 Rakefile
asana_exception_notifier-2.0.1 Rakefile
asana_exception_notifier-2.0.0 Rakefile
asana_exception_notifier-1.1.0 Rakefile
asana_exception_notifier-1.0.2 Rakefile
asana_exception_notifier-1.0.1 Rakefile
asana_exception_notifier-1.0.0 Rakefile
asana_exception_notifier-0.8.0 Rakefile
asana_exception_notifier-0.7.0 Rakefile
asana_exception_notifier-0.6.0 Rakefile
asana_exception_notifier-0.5.0 Rakefile
asana_exception_notifier-0.4.0 Rakefile
asana_exception_notifier-0.3.8 Rakefile
asana_exception_notifier-0.3.7 Rakefile