public
Description: Backend interface for Ruby on Rails applications which definitely you'll love! (Admin scaffold generator)
Homepage: http://intraducibles.com/projects/typus
Clone URL: git://github.com/fesplugas/typus.git
fesplugas (author)
Thu Nov 05 09:43:32 -0800 2009
commit  07b0276fdb4d760d144f817ef9bae7f9e90c0d7c
tree    a2fea1a1272446d21bb5c1aaeb199b04cce93f97
parent  516fd9f194a373b4e5cf4b811b2ac7a9bc591a5b
typus / Rakefile
100644 70 lines (58 sloc) 2.001 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
require 'rubygems'
require 'rake/testtask'
require 'rake/rdoctask'
 
$LOAD_PATH.unshift 'lib'
require 'typus/version'
 
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 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.description = "Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)"
    gemspec.email = "francesc@intraducibles.com"
    gemspec.homepage = "http://intraducibles.com/projects/typus"
    gemspec.authors = ["Francesc Esplugas"]
    gemspec.version = Typus::Version
  end
rescue LoadError
  puts "Jeweler not available."
  puts "Install it with: gem install jeweler -s http://gemcutter.org"
end
 
desc "Generate package."
task :package => [ :write_version, :gemspec, :build ]
 
desc "Push a new version to Gemcutter"
task :publish => [ :package ] do
  system "git tag v#{Typus::Version}"
  system "git push origin v#{Typus::Version}"
  system "gem push pkg/typus-#{Typus::Version}.gem"
  system "git clean -fd"
end
 
task :write_version do
  File.open('VERSION', 'w') {|f| f.write(Typus::Version) }
end