Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 27 lines (20 sloc) 0.615 kb
70d5bce @lsegal Add basic Rakefile
authored
1 require 'rubygems'
2 require 'rake/gempackagetask'
ac47a82 @lsegal Add tests
authored
3 require 'rake/testtask'
70d5bce @lsegal Add basic Rakefile
authored
4
88c58e7 @joekhoobyar build fix: windows systems
joekhoobyar authored
5 WINDOWS = (PLATFORM =~ /mingw|win32|cygwin/ ? true : false) rescue false
70d5bce @lsegal Add basic Rakefile
authored
6 SUDO = WINDOWS ? '' : 'sudo'
7
8 desc "Builds the gem"
79b843b @lsegal Make sure ext/ is clean before packaging gem
authored
9 task :gem do
88c58e7 @joekhoobyar build fix: windows systems
joekhoobyar authored
10 sh "cd ext && make clean && rm -f Makefile" and puts if File.exists? './ext/Makefile'
70d5bce @lsegal Add basic Rakefile
authored
11 load 'ripper.gemspec'
12 Gem::Builder.new(SPEC).build
13 end
14
15 desc "Installs the gem"
16 task :install => :gem do
17 sh "#{SUDO} gem install #{SPEC.name}-#{SPEC.version}.gem --no-rdoc --no-ri"
18 end
19
20 desc 'Build the extension'
21 task :build do
22 sh "cd ext && ruby extconf.rb && make clean && make"
23 end
ac47a82 @lsegal Add tests
authored
24
25 Rake::TestTask.new
26
Something went wrong with that request. Please try again.