This repository has been archived by the owner on Dec 16, 2021. It is now read-only.
/
Rakefile
48 lines (41 loc) · 1.44 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
require 'rubygems'
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
warn e.message
warn "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'rake'
require 'juwelier'
Juwelier::Tasks.new do |gem|
gem.name = 'find_or_create_on_scopes'
gem.summary = %(find_or_create-type methods on ActiveRecord scopes)
gem.description = %(Adds methods to ActiveRecord for conditionally finding, creating, or updating records.)
gem.email = 'git@timothymorgan.info'
gem.homepage = 'http://github.com/riscfuture/find_or_create_on_scopes'
gem.authors = ["Tim Morgan"]
gem.required_ruby_version = '>= 1.9'
gem.files = %w[lib/**/* README.md LICENSE find_or_create_on_scopes.gemspec]
end
Juwelier::RubygemsDotOrgTasks.new
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
require 'yard'
# bring sexy back (sexy == tables)
module YARD::Templates::Helpers::HtmlHelper
def html_markup_markdown(text)
markup_class(:markdown).new(text, :gh_blockcode, :fenced_code, :autolink, :tables, :no_intraemphasis).to_html
end
end
YARD::Rake::YardocTask.new('doc') do |doc|
doc.options << '-m' << 'markdown'
doc.options << '-M' << 'redcarpet'
doc.options << '--protected' << '--no-private'
doc.options << '-r' << 'README.md'
doc.options << '-o' << 'doc'
doc.options << '--title' << 'find_or_create_on_scopes Documentation'
doc.files = %w[lib/**/* README.md]
end
task(default: :spec)