public
Description: Simple Facebook platform simulator, to aid in developing Facebook canvas apps offline.
Homepage: http://github.com/sco/fakebook/
Clone URL: git://github.com/sco/fakebook.git
Click here to lend your support to: fakebook and make a donation at www.pledgie.com !
fakebook / Rakefile
100644 23 lines (20 sloc) 0.7 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'rake'
 
desc "install gem"
task :install_gem do
  puts `gem build fakebook.gemspec && sudo gem install fakebook*.gem --no-rdoc --no-ri && rm fakebook*.gem`
end
 
desc "update gemspec with latest file list, because github can't deal with File.glob tricks"
task :manifest do
  list = Dir['**/*'].sort
  spec_file = Dir['*.gemspec'].first
  list -= [spec_file] if spec_file
  
  if spec_file
    spec = File.read(spec_file)
    spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
      assignment = $1
      bunch = $2 ? list.grep(/^test\//) : list
      '%s%%w(%s)' % [assignment, bunch.join(' ')]
    end
    File.open(spec_file, 'w') {|f| f << spec }
  end
end