public
Description: The invisible framework
Homepage: http://macournoyer.com/
Clone URL: git://github.com/macournoyer/invisible.git
invisible / Rakefile
100644 69 lines (57 sloc) 1.963 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
require "rake/clean"
require "spec/rake/spectask"
require "yaml"
 
CLEAN.include "*.gem"
 
Spec::Rake::SpecTask.new do |t|
  t.spec_opts = %w(-fs -c)
end
task :default => :spec
 
desc "Compute LOC in invisible.rb"
task :size do
  loc = File.read("lib/invisible.rb").split("\n").reject { |l| l =~ /^\s*\#/ || l =~ /^\s*$/ }.size
  puts "#{loc} LOC"
end
 
namespace :site do
  task :build do
    mkdir_p 'tmp/site/images'
    cd 'tmp/site' do
      sh "SITE_ROOT='/invisible' ruby ../../site/thin.rb --dump"
    end
    cp 'site/style.css', 'tmp/site'
    cp_r Dir['site/images/*'], 'tmp/site/images'
  end
  
  desc 'Upload website to code.macournoyer.com'
  task :upload => :build do
    sh %{scp -rq tmp/site/* macournoyer@code.macournoyer.com:code.macournoyer.com/invisible}
    upload 'tmp/site/*', 'invisible'
  end
end
 
 
gemspec = Gem::Specification.new do |s|
  s.name = "invisible"
  s.version = "0.0.1"
  s.date = Time.today.strftime("%Y-%m-%d")
  s.summary = "The Invisible Web Framework"
  s.email = "macournoyer@gmail.com"
  s.homepage = "http://github.com/macournoyer/invisible"
  s.description = "Invisible is like a giant robot combining the awesomeness of Rails, Merb, Camping and Sinatra. Except, it's tiny (100 sloc)."
  s.authors = ["Marc-Andre Cournoyer"]
  s.files = %w(README Rakefile invisible.gemspec) + Dir["{bin,lib,app_generators}/**/*"]
  
  # RDoc
  s.has_rdoc = true
  s.rdoc_options = ["--main", "README"]
  s.extra_rdoc_files = ["README"]
  
  # Dependencies
  s.add_dependency "rack", ">= 0.4.0"
  s.add_dependency "markaby", ">= 0.5"
  s.add_dependency "rubigen", ">= 1.3.3"
  
  # Binary
  s.bindir = "bin"
  s.default_executable = "invisible"
  s.executables = "invisible"
end
 
namespace :gem do
  desc "Update the gemspec for GitHub's gem server"
  task :github do
    File.open("invisible.gemspec", 'w') { |f| f << YAML.dump(gemspec) }
  end
end