Sha256: cf2808490031f4ff7425151a741e55a55fb0f473fd09b00cbb4ea57d6f84bea5

Contents?: true

Size: 1.84 KB

Versions: 29

Compression:

Stored size: 1.84 KB

Contents

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

desc 'Default: run unit tests.'
task :default => :test

desc 'Test the typus plugin.'
Rake::TestTask.new(:test) do |t|
  t.libs << 'lib'
  t.pattern = 'test/**/*_test.rb'
  t.verbose = true
end

desc 'Generate documentation for the typus plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_files.add ['README.rdoc', 'MIT-LICENSE', 'lib/**/*.rb']
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = 'Typus documentation'
  rdoc.main = 'README.rdoc'
  rdoc.options << '--charset=UTF-8'
  rdoc.options << '--inline-source'
  rdoc.options << '--line-numbers'
end

desc 'Generate specdoc-style documentation from tests'
task :specs do

  puts 'Started'
  timer, count = Time.now, 0

  File.open('SPECDOC', 'w') do |file|
    Dir.glob('test/**/*_test.rb').each do |test|
      test =~ /.*\/([^\/].*)_test.rb$/
      file.puts "#{$1.gsub('_', ' ').capitalize} should:" if $1
      File.read(test).map { |line| /test_(.*)$/.match line }.compact.each do |spec|
        file.puts "- #{spec[1].gsub('_', ' ')}"
        sleep 0.001; print '.'; $stdout.flush; count += 1
      end
      file.puts
    end
  end

  puts "\nFinished in #{Time.now - timer} seconds.\n"
  puts "#{count} specifications documented"

end

begin
  require 'jeweler'
  Jeweler::Tasks.new do |gemspec|
    gemspec.name = "typus"
    gemspec.summary = "Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)"
    gemspec.email = "francesc@intraducibles.com"
    gemspec.homepage = "http://intraducibles.com/projects/typus"
    gemspec.description = "Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)"
    gemspec.authors = ["Francesc Esplugas"]
  end
rescue LoadError
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
fesplugas-typus-0.9.0 Rakefile
fesplugas-typus-0.9.1 Rakefile
fesplugas-typus-0.9.10 Rakefile
fesplugas-typus-0.9.11 Rakefile
fesplugas-typus-0.9.12 Rakefile
fesplugas-typus-0.9.13 Rakefile
fesplugas-typus-0.9.14 Rakefile
fesplugas-typus-0.9.15 Rakefile
fesplugas-typus-0.9.16 Rakefile
fesplugas-typus-0.9.17 Rakefile
fesplugas-typus-0.9.2 Rakefile
fesplugas-typus-0.9.3 Rakefile
fesplugas-typus-0.9.4 Rakefile
fesplugas-typus-0.9.5 Rakefile
fesplugas-typus-0.9.6 Rakefile
fesplugas-typus-0.9.7 Rakefile
fesplugas-typus-0.9.8 Rakefile
fesplugas-typus-0.9.9 Rakefile
typus-0.9.27 Rakefile
typus-0.9.26 Rakefile