Sha256: 9f42af5158c00a697ea40b5d8384bc3ce69e5cfea3b546435546a3c6c8220ec6
Contents?: true
Size: 1.08 KB
Versions: 6
Compression:
Stored size: 1.08 KB
Contents
#!/usr/bin/env rake require "bundler/gem_tasks" require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) do |t| t.rspec_opts = "--format documentation" end task :default => :spec task :rspec_all_databases do results = {} dbs = %w{ postgresql mysql sqlite3 } if ENV['DB'] dbs = ENV['DB'].split(',') end dbs.each do |db| puts puts '#'*50 puts "# Running specs against #{db}" puts '#'*50 puts if RUBY_VERSION >= '1.9' pid = spawn({'DB' => db}, 'rspec', '--format', 'documentation', File.expand_path('../spec', __FILE__)) Process.waitpid pid results[db] = $?.success? else exec({'DB' => db}, 'rspec', '--format', 'documentation', File.expand_path('../spec', __FILE__)) end end puts results.inspect end task :n, :from, :to do |t, args| Dir[File.expand_path("../lib/upsert/**/#{args.from}.*", __FILE__)].each do |path| dir = File.dirname(path) File.open("#{dir}/#{args.to}.rb", 'w') do |f| f.write File.read(path).gsub(args.from, args.to) end end end require 'yard' YARD::Rake::YardocTask.new
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
upsert-2.2.1 | Rakefile |
upsert-2.2.0 | Rakefile |
upsert-2.1.2 | Rakefile |
upsert-2.1.1 | Rakefile |
upsert-2.1.0 | Rakefile |
upsert-2.0.4 | Rakefile |