forked from Ruleby/ruleby
/
Rakefile
128 lines (96 loc) · 3.02 KB
/
Rakefile
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
121
122
123
124
125
126
127
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/testtask'
#
# GEM SPEC
spec = Gem::Specification.new do |s|
s.name = "ruleby"
s.version = "0.5"
s.authors = [ "Joe Kutner", "Matt Smith" ]
s.email = 'matt@ruleby.org'
s.homepage = "http://ruleby.org"
s.platform = Gem::Platform::RUBY
s.summary = "Rete based Ruby Rule Engine"
s.required_ruby_version = '>= 1.8.2'
#s.license = "GPL3"
s.require_paths = [ "lib" ]
s.test_file = "tests/test.rb"
s.has_rdoc = true
s.rubyforge_project = 'ruleby'
s.description = <<EOF
Ruleby is a rule engine written in the Ruby language. It is a system for executing a set
of IF-THEN statements known as production rules. These rules are matched to objects using
the forward chaining Rete algorithm. Ruleby provides an internal Domain Specific Language
(DSL) for building the productions that make up a Ruleby program.
Release Notes for Version 0.5
* reset the TerminalNode.counter when initializing the RootNode. Thanks to Shashank for the patch.
* added InitialFact so that NotPatterns can be put at the front of a rule [#1 status:resolved]
* Improved rule assertion so that rules can be added after facts have been asserted [#9 state:resolved]
* Added retrieve method to engine, and a unit-test for it
EOF
#s.extra_rdoc_files = [ 'README.txt' ]
#[ 'other-gem', 'yet-another-gem' ].each do |d|
# s.requirements << d
# s.add_dependency d
#end
files = FileList[ "{lib}/**/*" ]
#files.exclude "rdoc"
s.files = files.to_a
end
#
# tasks
CLEAN.include("pkg", "rdoc")
task :default => [ :clean, :repackage ]
#
# TESTING
Rake::TestTask.new(:test) do |t|
t.libs << "tests"
t.test_files = FileList['tests/test.rb']
t.verbose = true
end
#
# PACKAGING
Rake::GemPackageTask.new(spec) do |pkg|
#pkg.need_tar = true
end
Rake::PackageTask.new(spec.name, spec.version) do |pkg|
pkg.need_zip = true
pkg.package_files = FileList[
"Rakefile",
"*.txt",
"lib/**/*",
"tests/**/*"
].to_a
#pkg.package_files.delete("MISC.txt")
class << pkg
def package_name
"#{@name}-#{@version}-src"
end
end
end
#
# DOCUMENTATION
#ALLISON=`allison --path`
#ALLISON="/Library/Ruby/Gems/1.8/gems/allison-2.0.3/lib/allison.rb"
Rake::RDocTask.new do |rd|
#rd.main = "README.txt"
#rd.rdoc_dir = "html/rufus-verbs"
rd.rdoc_files.include(
"LICENSE.txt",
"lib/**/*.rb")
rd.title = "ruleby rdoc"
rd.options << '-N' # line numbers
rd.options << '-S' # inline source
#rd.template = ALLISON if File.exist?(ALLISON)
end
#
# WEBSITE
#task :upload_website => [ :clean, :rdoc ] do
# account = "whoever@rubyforge.org"
# webdir = "/var/www/gforge-projects/ruleby"
# sh "rsync -azv -e ssh html/source #{account}:#{webdir}/"
#end