Skip to content

Commit

Permalink
Use extracted prawn-manual_builder code
Browse files Browse the repository at this point in the history
The functionality of the manual should stay the same,
we now just depend on an external gem rather than bundling
the manual building code directly with Prawn.

In theory, this will allow for the manual building code
to be used by other extensions. In practice, some
extra effort may be needed before that's practical.
  • Loading branch information
practicingruby committed May 27, 2014
1 parent 4d1afa9 commit 488c129
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 689 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -32,7 +32,7 @@ desc "Generate the 'Prawn by Example' manual"
task :manual do
puts "Building manual..."
require File.expand_path(File.join(File.dirname(__FILE__),
%w[manual manual manual]))
%w[manual manifest]))
puts "The Prawn manual is available at manual.pdf. Happy Prawning!"
end

Expand Down
Binary file added manual/absolute_position.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions manual/basic_concepts/basic_concepts.rb
Expand Up @@ -2,10 +2,10 @@
#
# Examples for Prawn basic concepts.
#
require File.expand_path(File.join(File.dirname(__FILE__),
%w[.. example_helper]))

Prawn::Example.generate("basic_concepts.pdf", :page_size => "FOLIO") do
require_relative "../example_helper"

Prawn::ManualBuilder::Example.generate("basic_concepts.pdf", :page_size => "FOLIO") do

package "basic_concepts" do |p|

Expand Down
6 changes: 3 additions & 3 deletions manual/manual/cover.rb → manual/cover.rb
Expand Up @@ -2,11 +2,11 @@
#
# Prawn manual how to read this manual page.
#
require File.expand_path(File.join(File.dirname(__FILE__),
%w[.. example_helper]))

require_relative "example_helper"

filename = File.basename(__FILE__).gsub('.rb', '.pdf')
Prawn::Example.generate(filename) do
Prawn::ManualBuilder::Example.generate(filename) do
move_down 200

image "#{Prawn::DATADIR}/images/prawn.png",
Expand Down
111 changes: 0 additions & 111 deletions manual/example_file.rb

This file was deleted.

0 comments on commit 488c129

Please sign in to comment.