printr 0.6.1 → 0.6.2

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.
Files changed (3) hide show
  1. data/lib/printr.rb +13 -1
  2. data/printr.gemspec +1 -1
  3. metadata +3 -3
@@ -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
@@ -4,7 +4,7 @@ require "printr/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "printr"
7
- s.version = '0.6.1'
7
+ s.version = '0.6.2'
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Michael Franzl","Jason Martin"]
10
10
  s.email = ["jason@jason-knight-martin.com"]
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.1
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-01 00:00:00.000000000Z
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.15
63
+ rubygems_version: 1.8.17
64
64
  signing_key:
65
65
  specification_version: 3
66
66
  summary: An engine for interfacing with printers.