printr 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/printr.rb +13 -1
- data/printr.gemspec +1 -1
- metadata +3 -3
data/lib/printr.rb
CHANGED
@@ -136,7 +136,19 @@ module Printr
|
|
136
136
|
Printr.log "[Printr] Failed to open #{key} #{Printr.printrs[key]} as a File."
|
137
137
|
end
|
138
138
|
end
|
139
|
-
|
139
|
+
#
|
140
|
+
def direct_write(file_path,text)
|
141
|
+
begin
|
142
|
+
File.open(file_path,'w:ISO8859-15') do |f|
|
143
|
+
Printr.log "[Printr] Writing text."
|
144
|
+
text.force_encoding 'ISO-8859-15'
|
145
|
+
f.write text
|
146
|
+
end
|
147
|
+
rescue Exception => e
|
148
|
+
Printr.log "[Printr] Failed to open #{file_path} as a File. #{e.inspect}"
|
149
|
+
end
|
150
|
+
end
|
151
|
+
#
|
140
152
|
def method_missing(sym, *args, &block)
|
141
153
|
Printr.log "[Printr] Called with: #{sym}"
|
142
154
|
if Printr.printrs[sym] then
|
data/printr.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: printr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-02-
|
13
|
+
date: 2012-02-29 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: This engine allows you to define printers and templates.
|
16
16
|
email:
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
62
|
rubyforge_project: printr
|
63
|
-
rubygems_version: 1.8.
|
63
|
+
rubygems_version: 1.8.17
|
64
64
|
signing_key:
|
65
65
|
specification_version: 3
|
66
66
|
summary: An engine for interfacing with printers.
|