Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update MIT liscense

clean up prawn_rails.rb
  • Loading branch information...
commit 5c045384bc205eb5d57ab8d58d40cd544070682d 1 parent 277a061
Walton Hoops authored October 21, 2010
2  .gitignore
... ...
@@ -0,0 +1,2 @@
  1
+.redcar/*
  2
+*.gem
2  MIT-LICENSE
... ...
@@ -1,4 +1,4 @@
1  
-Copyright (c) 2010 [name of plugin creator]
  1
+Copyright (c) 2010 Walton Hoops
2 2
 
3 3
 Permission is hereby granted, free of charge, to any person obtaining
4 4
 a copy of this software and associated documentation files (the
1  install.rb
... ...
@@ -1 +0,0 @@
1  
-# Install hook code here
14  lib/prawn_rails.rb
... ...
@@ -1,23 +1,33 @@
1 1
 require 'prawn'
2 2
 require 'prawn/layout'
3 3
 require 'prawn/security'
  4
+
4 5
 module Prawn
5 6
   module Rails
  7
+    
6 8
     module PrawnHelper
  9
+      
7 10
       def prawn_document(opts={})
8  
-        pdf=Prawn::Document.new(opts)
  11
+        pdf = Prawn::Document.new(opts)
9 12
         yield pdf
  13
+        
10 14
         pdf
11 15
       end
  16
+      
12 17
     end
  18
+    
13 19
     class TemplateHandler < ActionView::Template::Handler
14  
-      self.default_format= :pdf
  20
+      self.default_format = :pdf
  21
+      
15 22
       def self.call(template)
16 23
         "#{template.source}.render"        
17 24
       end
  25
+      
18 26
     end
  27
+    
19 28
   end
20 29
 end
  30
+
21 31
 Mime::Type.register_alias "application/pdf", :pdf
22 32
 ActionView::Template.register_template_handler(:prawn, Prawn::Rails::TemplateHandler)
23 33
 ActionView::Base.send(:include, Prawn::Rails::PrawnHelper)
8  test/prawn_rails_test.rb
... ...
@@ -1,8 +0,0 @@
1  
-require 'test_helper'
2  
-
3  
-class PrawnRailsTest < ActiveSupport::TestCase
4  
-  # Replace this with your real tests.
5  
-  test "the truth" do
6  
-    assert true
7  
-  end
8  
-end
3  test/test_helper.rb
... ...
@@ -1,3 +0,0 @@
1  
-require 'rubygems'
2  
-require 'test/unit'
3  
-require 'active_support'
1  uninstall.rb
... ...
@@ -1 +0,0 @@
1  
-# Uninstall hook code here

0 notes on commit 5c04538

Please sign in to comment.
Something went wrong with that request. Please try again.