File: Rakefile

package info (click to toggle)
ruby-prawn 2.5.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,528 kB
  • sloc: ruby: 17,688; sh: 43; makefile: 20
file content (27 lines) | stat: -rw-r--r-- 722 bytes parent folder | download
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
# frozen_string_literal: true

GEMSPEC = File.expand_path('prawn.gemspec', __dir__)
require 'prawn/dev/tasks'

task default: %i[spec rubocop]

desc "Generate the 'Prawn by Example' manual"
task :manual do
  puts 'Building manual...'
  require_relative 'manual/manual'
  manual_path = File.expand_path('manual/manual.rb', __dir__)
  manual = eval(File.read(manual_path), TOPLEVEL_BINDING, manual_path) # rubocop: disable Security/Eval
  manual.generate('manual.pdf')
  puts 'The Prawn manual is available at manual.pdf. Happy Prawning!'
end

desc 'Run a console with Prawn loaded'
task :console do
  require 'irb'
  require 'irb/completion'
  require_relative 'lib/prawn'
  Prawn.debug = true

  ARGV.clear
  IRB.start
end