Sha256: 816007fce61c95cc5048092841b845d882f0ca39bf21ffeac3ca68c69841e3f4

Contents?: true

Size: 1.21 KB

Versions: 6

Compression:

Stored size: 1.21 KB

Contents

# desc "Explaining what the task does"
# task :cul_omniauth do
#   # Task goes here
# end
namespace :cul_omniauth do
  begin
    # This code is in a begin/rescue block so that the Rakefile is usable
    # in an environment where RSpec is unavailable (i.e. production).

    require 'rspec/core/rake_task'

    RSpec::Core::RakeTask.new(:rspec) do |spec|
      spec.pattern = FileList['spec/**/*_spec.rb']
      spec.pattern += FileList['spec/*_spec.rb']
      spec.rspec_opts = ['--backtrace'] if ENV['CI']
    end

    RSpec::Core::RakeTask.new(:rcov) do |spec|
      spec.pattern = FileList['spec/**/*_spec.rb']
      spec.pattern += FileList['spec/*_spec.rb']
      spec.rcov = true
    end

  rescue LoadError => e
    puts "[Warning] Exception creating rspec rake tasks.  This message can be ignored in environments that intentionally do not pull in the RSpec gem (i.e. production)."
    puts e
  end
  desc "Execute specs with coverage"
  task :coverage do
    # Put spec opts in a file named .rspec in root
    ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
    ENV['COVERAGE'] = 'true' unless ruby_engine == 'jruby'

   # Rake::Task["active_fedora:fixtures"].invoke
    Rake::Task["cul_omniauth:rspec"].invoke
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cul_omniauth-0.6.0 lib/tasks/cul_omniauth_tasks.rake
cul_omniauth-0.5.3 lib/tasks/cul_omniauth_tasks.rake
cul_omniauth-0.5.2 lib/tasks/cul_omniauth_tasks.rake
cul_omniauth-0.5.1 lib/tasks/cul_omniauth_tasks.rake
cul_omniauth-0.5.0 lib/tasks/cul_omniauth_tasks.rake
cul_omniauth-0.4.3 lib/tasks/cul_omniauth_tasks.rake