47 lines
1.4 KiB
Ruby
47 lines
1.4 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rubygems'
|
|
require 'bundler'
|
|
begin
|
|
Bundler.setup(:default, :development)
|
|
rescue Bundler::BundlerError => e
|
|
$stderr.warn e.message
|
|
$stderr.warn 'Run `bundle install` to install missing gems'
|
|
exit e.status_code
|
|
end
|
|
require 'rake'
|
|
require 'juwelier'
|
|
require_relative './version'
|
|
Juwelier::Tasks.new do |gem|
|
|
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
|
gem.name = 'pg_searchable_regex'
|
|
gem.homepage = ''
|
|
gem.license = 'Nonstandard'
|
|
gem.summary = 'A simple ActiveModel concern that can be added to do fulltext search with postgres databases'
|
|
gem.description = 'A simple ActiveModel concern that can be added to do fulltext search with postgres databases'
|
|
gem.email = 'dev@outfrontmedia.com'
|
|
gem.authors = ['Outfront Media']
|
|
gem.files.include('lib/**/*.rb')
|
|
gem.version = Version.to_s
|
|
|
|
# dependencies defined in Gemfile
|
|
end
|
|
Juwelier::RubygemsDotOrgTasks.new
|
|
require 'rspec/core/rake_task'
|
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
|
t.pattern = Dir.glob('spec/**/*_spec.rb')
|
|
t.rspec_opts = '--format documentation'
|
|
end
|
|
|
|
task default: :spec
|
|
|
|
require 'rdoc/task'
|
|
Rake::RDocTask.new do |rdoc|
|
|
version = File.exist?('VERSION') ? File.read('VERSION') : ''
|
|
|
|
rdoc.rdoc_dir = 'rdoc'
|
|
rdoc.title = "pg_searchable #{version}"
|
|
rdoc.rdoc_files.include('README*')
|
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
end
|