forked from gosu/ashton
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
42 lines (31 loc) · 765 Bytes
/
Copy pathRakefile
File metadata and controls
42 lines (31 loc) · 765 Bytes
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
require 'bundler/setup'
require 'rake/clean'
require 'rspec/core/rake_task'
require 'rake/extensiontask'
require 'yard'
require 'redcloth'
require 'launchy'
begin
require 'devkit' # only used on windows
rescue LoadError
end
spec = Gem::Specification.load Dir['*.gemspec'].first
Gem::PackageTask.new spec do
end
Rake::ExtensionTask.new 'ashton', spec do |ext|
RUBY_VERSION =~ /(\d+.\d+)/
ext.lib_dir = "lib/ashton/#{$1}"
end
YARD::Rake::YardocTask.new
task :default => :spec
task :spec => :compile
RSpec::Core::RakeTask.new do |t|
end
desc "Open yard docs in browser"
task :browse_yard => :yard do
Launchy.open "doc/index.html" rescue nil
end
desc "Create platform-specific compiled gem"
task :native_gem do
Rake::Task["native"].invoke "gem"
end