printr 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/printr.rb +3 -2
- data/printr.gemspec +1 -1
- metadata +2 -2
data/lib/printr.rb
CHANGED
@@ -123,7 +123,7 @@ module Printr
|
|
123
123
|
puts "Could not find #{key} #{Printr.printrs[key].class}"
|
124
124
|
end
|
125
125
|
rescue Exception => e
|
126
|
-
puts "#{e.inspect}"
|
126
|
+
puts "[Printr] Error in print_to: #{e.inspect}"
|
127
127
|
Printr.close
|
128
128
|
end
|
129
129
|
end
|
@@ -146,12 +146,13 @@ module Printr
|
|
146
146
|
text
|
147
147
|
end
|
148
148
|
def template(name,bndng)
|
149
|
-
puts "[Printr] attempting to print with template"
|
149
|
+
puts "[Printr] attempting to print with template #{RAILS_ROOT}/app/views/printr/#{name}.prnt.erb"
|
150
150
|
begin
|
151
151
|
erb = ERB.new(File.new("#{RAILS_ROOT}/app/views/printr/#{name}.prnt.erb",'r').read)
|
152
152
|
rescue Exception => e
|
153
153
|
puts "[Printr] Exception in view: " + e.inspect
|
154
154
|
end
|
155
|
+
puts "[Printr] returning text"
|
155
156
|
text = erb.result(bndng)
|
156
157
|
return text
|
157
158
|
end
|
data/printr.gemspec
CHANGED