Permalink
Browse files

Fixed regexp, documentation

  • Loading branch information...
averell23 committed Nov 4, 2009
1 parent f15d1d7 commit d0cda3e01399b0e381b69d023aa1ea8017151d4c
Showing with 30 additions and 60 deletions.
  1. 0 README → README.rdoc
  2. +28 −58 Rakefile
  3. +2 −2 lib/active_rdf/queryengine/query.rb
View
File renamed without changes.
View
@@ -1,12 +1,9 @@
require 'rubygems'
-require 'meta_project'
require 'rake'
require 'rake/testtask'
require 'rake/clean'
-require 'rake/gempackagetask'
require 'rake/rdoctask'
-require 'rake/contrib/xforge'
require 'tools/rakehelp'
require 'fileutils'
include FileUtils
@@ -30,23 +27,35 @@ Rake::RDocTask.new do |rdoc|
rdoc.options << '--line-numbers' << '--inline-source'
end
-# default task: install
-desc 'test and package gem'
-task :default => :install
-# GEMNAME="#{NAME}-#{ActiveRdfVersion}.gem"
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |s|
+ s.name = 'activerdf_net7'
+ s.summary = 'Offers object-oriented access to RDF (with adapters to several datastores). Version of the Talia project.'
+ s.description = s.summary + ' THIS IS NOT THE OFFICIAL VERSION.'
+ s.authors = ['Eyal Oren', 'The Talia Team']
+ s.email = 'hahn@netseven.it'
+ s.homepage = 'http://www.activerdf.org'
+ s.platform = Gem::Platform::RUBY
+ s.autorequire = 'active_rdf'
+ s.add_dependency('gem_plugin', '>= 0.2.1')
+ s.files = FileList["{lib}/**/*", "{activerdf}*/**/*"]
+ s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "LICENSE"]
+ s.add_dependency('grit', '>= 1.1.1')
+ end
+ Jeweler::GemcutterTasks.new
+rescue LoadError
+ puts "Jeweler (or a dendency) is not available. Install with: gem install jeweler"
+end
-# define package task
-setup_gem("activerdf",$version) do |spec|
- spec.summary = 'Offers object-oriented access to RDF (with adapters to several datastores).'
- spec.description = spec.summary
- spec.author = 'Eyal Oren'
- spec.email = 'eyal.oren@deri.org'
- spec.homepage = 'http://www.activerdf.org'
- spec.platform = Gem::Platform::RUBY
- spec.autorequire = 'active_rdf'
- spec.add_dependency('gem_plugin', '>= 0.2.1')
-# spec.add_dependency('activerdf_sparql')
+begin
+ require 'gokdok'
+ Gokdok::Dokker.new do |gd|
+ gd.remote_path = '' # Put into the root directory
+ end
+rescue LoadError
+ puts "Gokdok is not available. Install with: gem install gokdok"
end
begin
@@ -56,50 +65,11 @@ begin
t.verbose = true
end
rescue LoadError
+ puts 'Rcov or dependency is not available'
end
# define test_all task
Rake::TestTask.new do |t|
t.name = :test_all
t.test_files = FileList["test/**/*.rb", "activerdf-*/test/**/*.rb"]
end
-
-task :verify_rubyforge do
- raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
- raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
-end
-
-desc "release #$name-#$version gem on RubyForge"
-task :release => [ :clean, :verify_rubyforge, :package ] do
- $project = MetaProject::Project::XForge::RubyForge.new('activerdf')
- release_files = FileList["pkg/#$distdir.gem"]
- Rake::XForge::Release.new($project) do |release|
- release.user_name = ENV['RUBYFORGE_USER']
- release.password = ENV['RUBYFORGE_PASSWORD']
- release.files = release_files.to_a
- release.release_name = "#$name #$version"
- release.package_name = "activerdf"
- release.release_notes = ""
-
- changes = []
- File.open("CHANGELOG") do |file|
- current = true
-
- file.each do |line|
- line.chomp!
- if current and line =~ /^==/
- current = false; next
- end
- break if line.empty? and not current
- changes << line
- end
- end
- release.release_changes = changes.join("\n")
- end
-end
-
-desc "release gem on RubyForge and build documentation"
-task :release_docs => [ :release, :rdoc ]
-
-desc "CruiseControl Task"
-task :cruise => ['rdoc', 'test']
@@ -107,9 +107,9 @@ def filter *s
# regular expression
def filter_regexp(variable, regexp)
raise(ActiveRdfError, "variable must be a symbol") unless variable.is_a? Symbol
- raise(ActiveRdfError, "regexp must be a ruby regexp") unless regexp.is_a? Regexp
+ regexp = regexp.source if(regexp.is_a?(Regexp))
- filter "regex(str(?#{variable}), #{regexp.inspect.gsub('/','"')})"
+ filter "regex(str(?#{variable}), #{regexp})"
end
alias :filter_regex :filter_regexp

0 comments on commit d0cda3e

Please sign in to comment.