Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 34 lines (26 sloc) 0.915 kb
7f5fd99 @laserlemon Clean up the Rakefile for style consistency
authored
1 require "bundler/gem_helper"
2 require "rspec/core/rake_task"
15c2d99 @laserlemon Make the default rake task run the specs
authored
3
7f5fd99 @laserlemon Clean up the Rakefile for style consistency
authored
4 Bundler::GemHelper.install_tasks(name: "periscope")
5 Bundler::GemHelper.install_tasks(name: "periscope-activerecord")
6 Bundler::GemHelper.install_tasks(name: "periscope-mongo_mapper")
7 Bundler::GemHelper.install_tasks(name: "periscope-mongoid")
8 Bundler::GemHelper.install_tasks(name: "periscope-data_mapper")
eb362f6 @laserlemon Add Bundler's gem helpers for each gemspec
authored
9
7f5fd99 @laserlemon Clean up the Rakefile for style consistency
authored
10 ADAPTERS = %w(active_record data_mapper mongo_mapper mongoid)
1ab0713 @laserlemon Build and separate active_record and mongo_mapper adapters
authored
11
12 ADAPTERS.each do |adapter|
13 desc "Run RSpec code examples for #{adapter} adapter"
8114a03 @laserlemon Fix bug where coverage was not being merged in the default Rake task
authored
14 RSpec::Core::RakeTask.new(adapter => "#{adapter}:adapter") do |t|
1ab0713 @laserlemon Build and separate active_record and mongo_mapper adapters
authored
15 t.pattern = "spec/periscope/adapters/#{adapter}_spec.rb"
16 end
17
18 namespace adapter do
8114a03 @laserlemon Fix bug where coverage was not being merged in the default Rake task
authored
19 task :adapter do
7f5fd99 @laserlemon Clean up the Rakefile for style consistency
authored
20 ENV["ADAPTER"] = adapter
1ab0713 @laserlemon Build and separate active_record and mongo_mapper adapters
authored
21 end
22 end
23 end
24
367d775 @laserlemon Remove Coveralls
authored
25 RSpec::Core::RakeTask.new(spec: ADAPTERS + [:adapter]) do |t|
7f5fd99 @laserlemon Clean up the Rakefile for style consistency
authored
26 t.pattern = "spec/periscope_spec.rb"
1ab0713 @laserlemon Build and separate active_record and mongo_mapper adapters
authored
27 end
28
8114a03 @laserlemon Fix bug where coverage was not being merged in the default Rake task
authored
29 task :adapter do
30 ENV["ADAPTER"] = nil
31 end
32
7f5fd99 @laserlemon Clean up the Rakefile for style consistency
authored
33 task default: :spec
Something went wrong with that request. Please try again.