Sha256: 8caa2c65a667e78db71c2757c8fe86c0bcf18c3fc739c72b11a0552c994d5882

Contents?: true

Size: 833 Bytes

Versions: 4

Compression:

Stored size: 833 Bytes

Contents

# encoding: utf-8

puts "Prawn specs: Running on Ruby Version: #{RUBY_VERSION}"

require "rubygems"
require "test/spec"                                                
require "mocha"
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') 

require "prawn"
require "prawn/layout"
$LOAD_PATH << File.join(Prawn::BASEDIR, 'vendor','pdf-inspector','lib')

Prawn.debug = true

gem 'pdf-reader', ">=0.7.3"
require "pdf/reader"          
require "pdf/inspector"

def create_pdf(klass=Prawn::Document)
  @pdf = klass.new(:left_margin   => 0,
                   :right_margin  => 0,
                   :top_margin    => 0,
                   :bottom_margin => 0)
end    

def width_table_for( pdf, hpad, fs, cells )
  cells.inject( 2 * cells.size * hpad ) do |ret, cell|
    ret + pdf.width_of( cell, :size => fs ).ceil
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
jerryvos-prawn-layout-0.2.0.4 spec/spec_helper.rb
prawn-flexible-table-0.1.2 spec/spec_helper.rb
prawn-flexible-table-0.1.1 spec/spec_helper.rb
prawn-flexible-table-0.1 spec/spec_helper.rb