forked from google/gumbo-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
50 lines (43 loc) · 1.16 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
require 'rubygems/package_task'
require 'rake/clean'
task 'default' => 'test'
file 'Makefile' => 'ext/extconf.rb' do
Dir.chdir 'ext' do
ruby 'extconf.rb'
end
end
task 'test' => 'Makefile' do
Dir.chdir 'ext' do
sh 'make -s'
end
ruby 'test-gumbo.rb'
end
CLEAN.include('ext/*.o', 'ext/*.so', 'ext/*.log', 'ext/Makefile', 'pkg')
MANIFEST = %w(
ext/extconf.rb
ext/gumbo-parser.c
lib/gumbo-parser.rb
Rakefile
README.md
)
SPEC = Gem::Specification.new do |gem|
gem.name = 'gumbo-parser'
gem.version = '0.2'
gem.email = 'rubys@intertwingly.net'
gem.homepage = 'https://github.com/rubys/gumbo-parser/tree/master/ruby#readme'
gem.summary = 'Ruby bindings for Gumbo HTML5 parser'
gem.files = MANIFEST
gem.extensions = 'ext/extconf.rb'
gem.author = 'Sam Ruby'
gem.add_dependency 'nokogiri'
gem.license = 'Apache 2.0'
gem.description = %q(
At the moment, this is a proof of concept, allowing a Ruby
program to invoke the Gumbo HTML5 parser and access the result as a Nokogiri
parsed document.).strip.gsub(/\s+/, ' ')
end
task 'gem' => 'test'
Gem::PackageTask.new(SPEC) do |pkg|
pkg.need_tar = true
pkg.need_zip = true
end