diff --git a/ext/mkrf_conf.rb b/ext/mkrf_conf.rb new file mode 100644 index 0000000..8e7bf46 --- /dev/null +++ b/ext/mkrf_conf.rb @@ -0,0 +1,9 @@ +require 'rubygems/dependency_installer' + +if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.1.0') + Gem::DependencyInstaller.new.install 'curses', '~> 1.0' +end + +File.open(File.expand_path('../Rakefile', __FILE__), 'w') do |f| + f.puts 'task :default' +end diff --git a/fzf.gemspec b/fzf.gemspec index 9556c0d..2e15c19 100644 --- a/fzf.gemspec +++ b/fzf.gemspec @@ -13,5 +13,5 @@ Gem::Specification.new do |spec| spec.files = %w[fzf.gemspec] spec.executables = 'fzf' - spec.add_runtime_dependency 'curses', '~> 1.0.0' + spec.extensions += ['ext/mkrf_conf.rb'] end