Sha256: 0f5217ae5d476d7bd622c405ef9cb9ba054d19e68b20de2dea44f0d111cc1cb9

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

require 'rubygems'
require 'rubygems/specification'

require 'bundler'
Bundler::GemHelper.install_tasks

require 'rake/testtask'
Rake::TestTask.new do |t|
  t.libs << "test"
  t.pattern = "test/**/*_test.rb"
  t.verbose = true
  t.warning = true
end

require 'turn'

# -*- encoding: utf-8 -*-
$:.unshift File.expand_path("../lib", __FILE__)
require 'activevalidators'

def gemspec
  @gemspec ||= begin
                 file = File.expand_path('../activevalidators.gemspec', __FILE__)
                 eval(File.read(file), binding, file)
               end
end

desc "Clean the current directory"
task :clean do
  rm_rf 'tmp'
  rm_rf 'pkg'
end

desc "Run the full spec suite"
task :full => ["clean", "test"]

desc "install the gem locally"
task :install => :package do
  sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}}
end

desc "validate the gemspec"
task :gemspec do
  gemspec.validate
end

desc "Build the gem"
task :gem => [:gemspec, :build] do
  mkdir_p "pkg"
  sh "gem build activevalidators.gemspec"
  mv "#{gemspec.full_name}.gem", "pkg"
end

desc "Install ActiveValidators"
task :install => :gem do
  sh "gem install pkg/#{gemspec.full_name}.gem"
end

task :default => :full

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activevalidators-1.7.1 Rakefile
activevalidators-1.7.0 Rakefile
activevalidators-1.6.0 Rakefile