Sha256: 5b4f3c9ffd6eb04555a0ca7e7e66913ef19ced6e912be45c92a7d5d97b17cf84
Contents?: true
Size: 1.61 KB
Versions: 3
Compression:
Stored size: 1.61 KB
Contents
require 'date' require 'rake/clean' require 'rake/extensiontask' require 'digest/md5' task :default => :test # ========================================================== # Ruby Extension # ========================================================== Rake::ExtensionTask.new('rinku') # ========================================================== # Testing # ========================================================== require 'rake/testtask' Rake::TestTask.new('test') do |t| t.test_files = FileList['test/*_test.rb'] t.ruby_opts += ['-rubygems'] if defined? Gem end task 'test' => [:compile] # PACKAGING ================================================================= require 'rubygems' $spec = eval(File.read('rinku.gemspec')) def package(ext='') "pkg/rinku-#{$spec.version}" + ext end desc 'Build packages' task :package => package('.gem') desc 'Build and install as local gem' task :install => package('.gem') do sh "gem install #{package('.gem')}" end desc 'Update the gemspec' task :update_gem => file('rinku.gemspec') directory 'pkg/' file package('.gem') => %w[pkg/ rinku.gemspec] + $spec.files do |f| sh "gem build rinku.gemspec" mv File.basename(f.name), f.name end # GEMSPEC HELPERS ========================================================== task :gather => 'sundown:checkout' do |t| files = FileList[ 'sundown/src/{buffer,autolink}.h', 'sundown/src/{buffer,autolink}.c', ] cp files, 'ext/rinku/', :preserve => true, :verbose => true end task 'sundown:checkout' do |t| unless File.exists?('sundown/src/markdown.h') sh 'git submodule init' sh 'git submodule update' end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
zendesk-rinku-1.7.2.1 | Rakefile |
rinku-1.7.3 | Rakefile |
rinku-1.7.2 | Rakefile |