copiousfreetime / snipe

A system for scraping twitter content based upon the gnip notification feed

This URL has Read+Write access

Fri Jul 03 17:59:30 -0700 2009
commit  8d8f28c2c9078e98f7a2b5c5fab4cd2810e989b4
tree    1098b2a823cad2d7e0db00d2fd1c9dcb858500f9
parent  61b5cfabafa7a1152f5114963a238e5478d95265 parent  16c0e7791903ba317d8d2732d208630c0128efb3
snipe / Rakefile
100644 72 lines (63 sloc) 2.603 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
71
72
#--
# Copyright (c) 2009 Jeremy Hinegardner
# All rights reserved. See LICENSE and/or COPYING for details.
#++
 
#-------------------------------------------------------------------------------
# make sure our project's top level directory and the lib directory are added to
# the ruby search path.
#-------------------------------------------------------------------------------
$: << File.expand_path(File.join(File.dirname(__FILE__),"lib"))
$: << File.expand_path(File.dirname(__FILE__))
 
 
#-------------------------------------------------------------------------------
# load the global project configuration and add in the top level clean and
# clobber tasks so that other tasks can utilize those constants if necessary
# This loads up the defaults for the whole project configuration
#-------------------------------------------------------------------------------
require 'rubygems'
require 'tasks/config.rb'
require 'rake/clean'
 
#-------------------------------------------------------------------------------
# Main configuration for the project, these overwrite the items that are in
# tasks/config.rb
#-------------------------------------------------------------------------------
require 'snipe'
Configuration.for("project") {
  name "snipe"
  version Snipe::VERSION
  author "Jeremy Hinegardner"
  email "jeremy@copiousfreetime.org"
  homepage "http://snipe.rubyforge.org/"
}
 
#-------------------------------------------------------------------------------
# load up all the project tasks and setup the default task to be the
# test:default task.
#-------------------------------------------------------------------------------
Configuration.for("packaging").files.tasks.each do |tasklib|
  import tasklib
end
task :default => 'test:default'
 
#-------------------------------------------------------------------------------
# Finalize the loading of all pending imports and update the top level clobber
# task to depend on all possible sub-level tasks that have a name like
# ':clobber' in other namespaces. This allows us to say:
#
# rake clobber
#
# and it will get everything.
#-------------------------------------------------------------------------------
Rake.application.load_imports
Rake.application.tasks.each do |t|
  if t.name =~ /:clobber/ then
    task :clobber => [t.name]
  end
end
 
desc "Push views to serve"
task :view_push do
  host = "http://copiousfreetime:playingwfire@playground.copiousfreetime.org:5984/tweets"
  dir = Snipe::Paths.root_dir
  Dir.chdir( dir ) do
    cmd = "couchapp push rollups #{host}"
    puts cmd
   `#{cmd}`
  end
end