Skip to content
This repository
Browse code

Fixed regexp, documentation

  • Loading branch information...
commit d0cda3e01399b0e381b69d023aa1ea8017151d4c 1 parent f15d1d7
Daniel Hahn authored November 04, 2009
0  README → README.rdoc
Source Rendered
File renamed without changes
86  Rakefile
... ...
@@ -1,12 +1,9 @@
1 1
 require 'rubygems'
2 2
 
3  
-require 'meta_project'
4 3
 require 'rake'
5 4
 require 'rake/testtask'
6 5
 require 'rake/clean'
7  
-require 'rake/gempackagetask'
8 6
 require 'rake/rdoctask'
9  
-require 'rake/contrib/xforge'
10 7
 require 'tools/rakehelp'
11 8
 require 'fileutils'
12 9
 include FileUtils
@@ -30,23 +27,35 @@ Rake::RDocTask.new do |rdoc|
30 27
 	rdoc.options << '--line-numbers' << '--inline-source'
31 28
 end
32 29
 
33  
-# default task: install
34  
-desc 'test and package gem'
35  
-task :default => :install
36 30
 
37  
-# GEMNAME="#{NAME}-#{ActiveRdfVersion}.gem"
  31
+begin
  32
+  require 'jeweler'
  33
+  Jeweler::Tasks.new do |s|
  34
+    s.name = 'activerdf_net7'
  35
+    s.summary = 'Offers object-oriented access to RDF (with adapters to several datastores). Version of the Talia project.'
  36
+    s.description = s.summary + ' THIS IS NOT THE OFFICIAL VERSION.'
  37
+    s.authors = ['Eyal Oren', 'The Talia Team']
  38
+    s.email = 'hahn@netseven.it'
  39
+    s.homepage = 'http://www.activerdf.org'
  40
+    s.platform = Gem::Platform::RUBY
  41
+    s.autorequire = 'active_rdf'
  42
+    s.add_dependency('gem_plugin', '>= 0.2.1')
  43
+    s.files = FileList["{lib}/**/*", "{activerdf}*/**/*"]
  44
+    s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "LICENSE"]
  45
+    s.add_dependency('grit', '>= 1.1.1')
  46
+  end
  47
+  Jeweler::GemcutterTasks.new
  48
+rescue LoadError
  49
+  puts "Jeweler (or a dendency) is not available. Install with: gem install jeweler"
  50
+end
38 51
 
39  
-# define package task
40  
-setup_gem("activerdf",$version) do |spec|
41  
-  spec.summary = 'Offers object-oriented access to RDF (with adapters to several datastores).'
42  
-  spec.description = spec.summary
43  
-  spec.author = 'Eyal Oren'
44  
-  spec.email = 'eyal.oren@deri.org'
45  
-  spec.homepage = 'http://www.activerdf.org'
46  
-  spec.platform = Gem::Platform::RUBY
47  
-  spec.autorequire = 'active_rdf'
48  
-  spec.add_dependency('gem_plugin', '>= 0.2.1')
49  
-#  spec.add_dependency('activerdf_sparql')
  52
+begin
  53
+  require 'gokdok'
  54
+  Gokdok::Dokker.new do |gd|
  55
+    gd.remote_path = '' # Put into the root directory
  56
+  end
  57
+rescue LoadError
  58
+  puts "Gokdok is not available. Install with: gem install gokdok"
50 59
 end
51 60
 
52 61
 begin
@@ -56,6 +65,7 @@ begin
56 65
     t.verbose = true
57 66
   end
58 67
 rescue LoadError
  68
+  puts 'Rcov or dependency is not available'
59 69
 end
60 70
 
61 71
 # define test_all task
@@ -63,43 +73,3 @@ Rake::TestTask.new do |t|
63 73
   t.name = :test_all
64 74
   t.test_files = FileList["test/**/*.rb", "activerdf-*/test/**/*.rb"]
65 75
 end
66  
-
67  
-task :verify_rubyforge do
68  
-  raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
69  
-  raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
70  
-end
71  
-
72  
-desc "release #$name-#$version gem on RubyForge"
73  
-task :release => [ :clean, :verify_rubyforge, :package ] do
74  
-  $project  = MetaProject::Project::XForge::RubyForge.new('activerdf')
75  
-  release_files = FileList["pkg/#$distdir.gem"]
76  
-  Rake::XForge::Release.new($project) do |release|
77  
-    release.user_name     = ENV['RUBYFORGE_USER']
78  
-    release.password      = ENV['RUBYFORGE_PASSWORD']
79  
-    release.files         = release_files.to_a
80  
-    release.release_name  = "#$name #$version"
81  
-    release.package_name  = "activerdf"
82  
-    release.release_notes = ""
83  
-
84  
-    changes = []
85  
-    File.open("CHANGELOG") do |file|
86  
-      current = true
87  
-
88  
-      file.each do |line|
89  
-        line.chomp!
90  
-				if current and line =~ /^==/
91  
-					current = false; next
92  
-				end
93  
-        break if line.empty? and not current
94  
-        changes << line
95  
-      end
96  
-    end
97  
-    release.release_changes = changes.join("\n")
98  
-  end
99  
-end
100  
-
101  
-desc "release gem on RubyForge and build documentation"
102  
-task :release_docs => [ :release, :rdoc ]
103  
-
104  
-desc "CruiseControl Task"
105  
-task :cruise => ['rdoc', 'test']
4  lib/active_rdf/queryengine/query.rb
@@ -107,9 +107,9 @@ def filter *s
107 107
   # regular expression
108 108
   def filter_regexp(variable, regexp)
109 109
     raise(ActiveRdfError, "variable must be a symbol") unless variable.is_a? Symbol
110  
-    raise(ActiveRdfError, "regexp must be a ruby regexp") unless regexp.is_a? Regexp
  110
+    regexp = regexp.source if(regexp.is_a?(Regexp))
111 111
 
112  
-    filter "regex(str(?#{variable}), #{regexp.inspect.gsub('/','"')})"
  112
+    filter "regex(str(?#{variable}), #{regexp})"
113 113
   end
114 114
   alias :filter_regex :filter_regexp
115 115
 

0 notes on commit d0cda3e

Please sign in to comment.
Something went wrong with that request. Please try again.