Sha256: 1449c90f62b6d370d380dca3343779d115173b9bedacbb2c80e2211455e50b7e

Contents?: true

Size: 1.59 KB

Versions: 3

Compression:

Stored size: 1.59 KB

Contents

# -*- ruby -*-

require 'rubygems'
require 'hoe'
require './lib/ixtlan/version.rb'

require 'spec'
require 'spec/rake/spectask'
require 'pathname'
require 'yard'

Hoe.spec('ixtlan') do |p|
  p.developer('mkristian', 'm.kristian@web.de')
  p.extra_deps = [['dm-core', '~>0.10.1'], ['dm-validations', '~>0.10.1'], ['dm-timestamps', '~>0.10.1'], ['dm-migrations', '~>0.10.1'], ['slf4r', '~>0.2.0'], ['datamapper4rails', '~>0.4.0'],['rack-datamapper', '~>0.2.5'], ['logging', '~>1.2.3']]
  p.rspec_options << '--options' << 'spec/spec.opts'
end

desc 'Install the package as a gem.'
task :install => [:clean, :package] do
  gem = Dir['pkg/*.gem'].first
  sh "gem install --local #{gem} --no-ri --no-rdoc"
end

desc 'generate rails using all generators and run the specs'
task :integration_tests => [:spec, :install] do
  require 'datamapper4rails/integration_test'
  tests = Datamapper4Rails::IntegrationTest.new do |t|
    t.directory = 'temp'
    ENV['GWT'] = "true"
    t.rails_template = 'ixtlan_rails_templates.rb'
    t.generate "ixtlan_datamapper_model name name:string"
    t.generate "ixtlan_datamapper_rspec_model domain name:string"
    t.generate "ixtlan_datamapper_rspec_scaffold player name:string"
    t.generate "gwt_ixtlan_datamapper_rspec_scaffold word name:string"
   end
   tests.command("mvn clean integration-test")
end

YARD::Rake::YardocTask.new

module Datamapper4Rails
  class IntegrationTest
    def command(command) 
      FileUtils.cd(@directory) do
      unless system("#{command}")
        puts
        puts "error in: #{command}"
        exit 1
      end
    end
    end
  end
end

# vim: syntax=Ruby

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ixtlan-0.2.4 Rakefile
ixtlan-0.2.3 Rakefile
ixtlan-0.2.2 Rakefile