public
Description: restful workflow engine based on Rack and ruote (Warning : ruote-rest will be replaced by ruote-kit soon)
Homepage: http://openwferu.rubyforge.org
Clone URL: git://github.com/jmettraux/ruote-rest.git
jmettraux (author)
Mon Nov 02 21:55:41 -0800 2009
commit  1a56bd3fb72150f14e2f3fef6c90a306217bca0b
tree    d56ec76162bed4887ce3d818e4ec9dc419b411d1
parent  b9888dc0b8f2c30292704de67514edb0a2501813
ruote-rest / Rakefile
100644 120 lines (89 sloc) 2.021 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
require 'rubygems'
 
require 'rake'
require 'rake/clean'
require 'rake/packagetask'
#require 'rake/gempackagetask'
#require 'rake/rdoctask'
require 'rake/testtask'
 
 
RUOTE_REST_VERSION = '0.9.21'
 
RUOTE_LIB = '~/ruote/lib'
 
#
# tasks
 
CLEAN.include 'work_test', 'work_development', 'log', 'tmp', 'pkg'
 
#task :default => [ :clean, :repackage ]
 
 
#
# TESTING
 
#
# rake test
#
Rake::TestTask.new(:test) do |t|
 
  #ENV['ruote.environment'] = 'test'
  #t.libs << 'test'
  #t.libs << 'conf'
  #t.libs << 'vendor'
  #t.libs << RUOTE_LIB
  #t.libs << '~/rufus/rufus-sixjo/lib'
    # all of this is now done in test/test_paths
 
  t.test_files = FileList['test/test.rb']
  t.verbose = true
end
 
 
#
# VERSION
 
task :change_version do
 
  version = ARGV.pop
  `sedip "s/VERSION = '.*'/VERSION = '#{version}'/" Rakefile`
  `sedip "s/VERSION = '.*'/VERSION = '#{version}'/" lib/ruote_rest.rb`
  exit 0 # prevent rake from triggering other tasks
end
 
 
#
# other tasks
 
Dir.new('tasks').entries.each { |e| load("tasks/#{e}") if e.match(/\.rake$/) }
 
 
#
# packaging
 
#
# source package
#
Rake::PackageTask.new('ruote-rest', RUOTE_REST_VERSION) do |pkg|
 
  pkg.need_zip = true
  pkg.package_files = FileList[
    'Rakefile',
    '*.txt',
    'conf/**/*',
    'lib/**/*',
    'public/**/*',
    'tools/**/*',
    'tasks/**/*',
    'test/**/*',
    'views/**/*'
  ].to_a
  pkg.package_files.delete('todo.txt')
  class << pkg
    def package_name
      "#{@name}-#{@version}-src"
    end
  end
end
 
#
# bin distribution
#
desc "packages a 'distribution' of ruote-rest"
task :distribute do
 
  pk = "ruote-rest-#{RUOTE_REST_VERSION}"
  dest = "pkg/#{pk}"
 
  rm_r(dest) if File.exist?(dest)
 
  mkdir_p dest
  files = %w{
Rakefile conf lib public tools tasks test views
}
  %w{ LICENSE CREDITS README CHANGELOG }.each { |t| files << "#{t}.txt" }
  files.each do |src|
    cp_r src, dest
    puts "copied #{src}"
  end
 
  chdir dest do
    sh 'rake ruote:get_from_github'
  end
  chdir 'pkg' do
    sh "jar cvf #{pk}.zip #{pk}"
  end
end