Skip to content

Commit 712b0c5

Browse files
olabiniwhy the lucky stiff
authored and
why the lucky stiff
committed
Add CSS pieces
Signed-off-by: why the lucky stiff <[email protected]>
1 parent fc9e97b commit 712b0c5

File tree

6 files changed

+1008
-13
lines changed

6 files changed

+1008
-13
lines changed

Rakefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ desc "Generates the Java scanner code using the Ragel table-driven code generati
164164
task :ragel_java => [:ragel_version] do
165165
if @ragel_v >= 6.1
166166
puts "compiling with ragel version #{@ragel_v}"
167+
sh %{ragel -J -o ext/hpricot_scan/HpricotCss.java ext/hpricot_scan/hpricot_css.java.rl}
167168
sh %{ragel -J -o ext/hpricot_scan/HpricotScanService.java ext/hpricot_scan/hpricot_scan.java.rl}
168169
else
169170
STDERR.puts "Ragel 6.1 or greater is required."
@@ -205,20 +206,20 @@ def java_classpath_arg
205206
classpath ? "-cp #{classpath}" : ""
206207
end
207208

208-
def compile_java(filename, jarname)
209-
sh %{javac -source 1.5 -target 1.5 #{java_classpath_arg} #{filename}}
209+
def compile_java(filenames, jarname)
210+
sh %{javac -source 1.5 -target 1.5 #{java_classpath_arg} #{filenames.join(" ")}}
210211
sh %{jar cf #{jarname} *.class}
211212
end
212213

213214
task :hpricot_scan_java => [:ragel_java] do
214215
Dir.chdir "ext/hpricot_scan" do
215-
compile_java("HpricotScanService.java", "hpricot_scan.jar")
216+
compile_java(["HpricotScanService.java", "HpricotCss.java"], "hpricot_scan.jar")
216217
end
217218
end
218219

219220
task :fast_xs_java do
220221
Dir.chdir "ext/fast_xs" do
221-
compile_java("FastXsService.java", "fast_xs.jar")
222+
compile_java(["FastXsService.java"], "fast_xs.jar")
222223
end
223224
end
224225

TODO

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11

2-
- Update hpricot_scan
32
- Port hpricot_css
4-
- Check fast_xs
5-
- Make tests work

0 commit comments

Comments
 (0)