This repository has been archived by the owner on Nov 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Rakefile
54 lines (48 loc) · 1.46 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
begin
# Try to require the preresolved locked set of gems.
require File.expand_path('../.bundle/environment', __FILE__)
rescue LoadError
# Fall back on doing an unlocked resolve at runtime.
require "rubygems"
require "bundler"
Bundler.setup
end
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'lib')
require 'prism'
require 'rake'
task :default => :test
require 'rake/testtask'
Rake::TestTask.new do |t|
t.libs << "test"
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "prism"
gemspec.summary = "Ruby microformat parser and HTML toolkit"
gemspec.description = "A Ruby microformat parser and HTML toolkit powered by Nokogiri"
gemspec.version = Prism::VERSION
gemspec.homepage = "http://github.com/mwunsch/prism"
gemspec.authors = ["Mark Wunsch"]
gemspec.email = ["mark@markwunsch.com"]
gemspec.add_dependency 'nokogiri'
gemspec.add_development_dependency "bundler", ">= 0.9.7"
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
end
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = 'Prism'
rdoc.main = 'README.md'
rdoc.rdoc_files.include('README.*', 'lib/**/*.rb', 'LICENSE')
rdoc.options << '--inline-source'
end
desc "Open an irb session preloaded with this library"
task :console do
sh "irb -rubygems -I lib -r prism"
end