Fetching contributors…
Cannot retrieve contributors at this time
56 lines (42 sloc) 1.66 KB
require 'rubygems'
require 'rbconfig' do |spec| = 'globegit-postgresql-plruby'
spec.version = '0.5.4'
spec.authors = ['Akinori MUSHA', 'Guy Decoux']
spec.license = 'Ruby' = ''
spec.homepage = ''
spec.summary = 'Enable Ruby for use as a procedural language within PostgreSQL'
spec.test_files = Dir['test/test*']
spec.extensions = ['extconf.rb']
spec.files = Dir['**/*'].reject{ |f| f.include?('git') || f.include?('tmp') }
spec.rubyforge_project = 'plruby'
spec.extra_rdoc_files = [
] + Dir['ext/*.c']
spec.description = <<-EOF
PL/Ruby is a loadable procedural language for the PostgreSQL database
system that enables the Ruby language to create functions and trigger
plruby_bin = 'plruby.' + Config::CONFIG['DLEXT']
plruby_dir = File.join( + '-' + spec.version.to_s, 'src')
path_to_binary = File.join(Gem.dir, 'gems', plruby_dir, plruby_bin)
possible_paths ={ |path|
File.join(path, 'gems', plruby_dir, plruby_bin)
spec.post_install_message = <<-EOF
Now run the following commands from within a postgresql shell in order
to create the plruby language on in database server:
create function plruby_call_handler() returns language_handler
as '#{path_to_binary}'
language 'C';
create trusted language 'plruby'
handler plruby_call_handler;
NOTE: Your actual path to #{plruby_bin} may be different. Possible
paths to the plruby binary are:
#{possible_paths.join("\n ")}