Sha256: 85d55fc6109d03b8056889ff243cffe75f439d983ba4710a08fef9b952270124

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

#!/usr/bin/env rake
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'net/http'
require 'net/https'

desc "Run RSpec"
RSpec::Core::RakeTask.new do |t|
  t.verbose = false
   t.rspec_opts = "--format progress"
end

task :default => :all_spec

desc "Run all specs, and test fixture apps"
task :all_spec => :spec do
  pwd = Dir.pwd
  Dir.chdir 'fixtures/rails_3_2_12'
  puts Dir.pwd
  str = `bundle install >> /dev/null; bundle exec rspec spec`
  puts str
  unless $? == 0
    Dir.chdir pwd
    fail "Header tests with app not using initializer failed exit code: #{$?}"
  end

  Dir.chdir pwd
  Dir.chdir 'fixtures/rails_3_2_12_no_init'
  puts Dir.pwd
  puts `bundle install >> /dev/null; bundle exec rspec spec`

  unless $? == 0
    fail "Header tests with app not using initializer failed"
    Dir.chdir pwd
  end
end

begin
  require 'rdoc/task'
rescue LoadError
  require 'rdoc/rdoc'
  require 'rake/rdoctask'
  RDoc::Task = Rake::RDocTask
end

RDoc::Task.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = 'SecureHeaders'
  rdoc.options << '--line-numbers'
  rdoc.rdoc_files.include('lib/**/*.rb')
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
secure_headers-2.0.0.pre2 Rakefile
secure_headers-2.0.0.pre Rakefile