escper 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,7 +3,3 @@ pkg/*
3
3
  .bundle
4
4
  *.*~
5
5
  *~
6
- debian/ruby-escper
7
- *.log
8
- files
9
- *.substvars
@@ -2,9 +2,9 @@ module Escper
2
2
  class Printer
3
3
  # mode can be local or sass
4
4
  # vendor_printers can either be a single VendorPrinter object, or an Array of VendorPrinter objects, or an ActiveRecord Relation containing VendorPrinter objects.
5
- def initialize(mode='local', vendor_printers=nil, subdomain=nil)
5
+ def initialize(mode='local', vendor_printers=nil, subdirectory=nil)
6
6
  @mode = mode
7
- @subdomain = subdomain
7
+ @subdirectory = subdirectory
8
8
  @open_printers = Hash.new
9
9
  @codepages_lookup = YAML::load(File.read(Escper.codepage_file))
10
10
  @file_mode = 'wb'
@@ -99,7 +99,8 @@ module Escper
99
99
 
100
100
  if Escper.use_safe_device_path == true
101
101
  sanitized_path = path.gsub(/[\/\s'"\&\^\$\#\!;\*]/,'_').gsub(/[^\w\/\.\-@]/,'')
102
- path = File.join(Escper.safe_device_path, @subdomain, "#{sanitized_path}.bill")
102
+ path = File.join(Escper.safe_device_path, @subdirectory, "escpos", "#{sanitized_path}.bill")
103
+ FileUtils.mkdir_p(File.dirname(path)) unless File.exists?(File.dirname(path))
103
104
  @file_mode = 'ab'
104
105
  end
105
106
 
@@ -1,3 +1,3 @@
1
1
  module Escper
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: escper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-17 00:00:00.000000000 Z
12
+ date: 2013-07-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rmagick
@@ -57,13 +57,6 @@ files:
57
57
  - Gemfile
58
58
  - README.md
59
59
  - Rakefile
60
- - debian/changelog
61
- - debian/compat
62
- - debian/control
63
- - debian/copyright
64
- - debian/ruby-escper.docs
65
- - debian/rules
66
- - debian/source/format
67
60
  - escper.gemspec
68
61
  - lib/escper.rb
69
62
  - lib/escper/asciifier.rb
@@ -1,35 +0,0 @@
1
- ruby-escper (1.1.8-1) unstable; urgency=low
2
-
3
- * fix: distinciton between VendorPrinter and ::VendorPrinter
4
- * new version
5
-
6
- -- Michael Franzl <office@michaelfranzl.com> Wed, 13 Mar 2013 16:35:01 +0100
7
-
8
- ruby-escper (1.1.7-1) unstable; urgency=low
9
-
10
- * fix
11
- * new version
12
- * unfix
13
- * fix, new version
14
-
15
- -- Michael Franzl <office@michaelfranzl.com> Tue, 12 Mar 2013 14:18:40 +0100
16
-
17
- ruby-escper (1.1.6-2) unstable; urgency=low
18
-
19
- * dependencies
20
-
21
- -- Michael Franzl <office@michaelfranzl.com> Thu, 07 Mar 2013 13:51:50 +0100
22
-
23
- ruby-escper (1.1.6-1) unstable; urgency=low
24
-
25
- * changed to Expat license
26
- * new version 1.1.6
27
- * new version 1.1.6
28
-
29
- -- Michael Franzl <office@michaelfranzl.com> Thu, 07 Mar 2013 10:38:07 +0100
30
-
31
- ruby-escper (1.1.5-1) UNRELEASED; urgency=low
32
-
33
- * Initial release (Closes: #702246)
34
-
35
- -- Michael Franzl <office@michaelfranzl.com> Sun, 03 Mar 2013 20:25:20 +0100
@@ -1 +0,0 @@
1
- 7
@@ -1,19 +0,0 @@
1
- Source: ruby-escper
2
- Section: ruby
3
- Priority: optional
4
- Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
5
- Uploaders: Michael Franzl <office@michaelfranzl.com>
6
- DM-Upload-Allowed: yes
7
- Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.13~)
8
- Standards-Version: 3.9.2
9
- Vcs-Git: https://github.com/michaelfranzl/Escper
10
- Vcs-Browser: https://github.com/michaelfranzl/Escper
11
- Homepage: https://github.com/michaelfranzl/Escper
12
- XS-Ruby-Versions: all
13
-
14
- Package: ruby-escper
15
- Architecture: all
16
- XB-Ruby-Versions: ${ruby:Versions}
17
- Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-serialport, ruby-rmagick
18
- Description: Easy printing to serial thermal ESCPOS printers
19
-
@@ -1,25 +0,0 @@
1
- Format: http://dep.debian.net/deps/dep5
2
- Upstream-Name: escper
3
- Source: http://github.com/michaelfranzl/Escper
4
-
5
- Files: *
6
- Copyright: 2013 Michael Franzl <office@michaelfranzl.com>
7
- License: Expat
8
- Permission is hereby granted, free of charge, to any person obtaining
9
- a copy of this software and associated documentation files (the
10
- "Software"), to deal in the Software without restriction, including
11
- without limitation the rights to use, copy, modify, merge, publish,
12
- distribute, sublicense, and/or sell copies of the Software, and to
13
- permit persons to whom the Software is furnished to do so, subject to
14
- the following conditions:
15
- .
16
- The above copyright notice and this permission notice shall be included
17
- in all copies or substantial portions of the Software.
18
- .
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +0,0 @@
1
- README.md
@@ -1,15 +0,0 @@
1
- #!/usr/bin/make -f
2
- #export DH_VERBOSE=1
3
- #
4
- # Uncomment to ignore all test failures (but the tests will run anyway)
5
- #export DH_RUBY_IGNORE_TESTS=all
6
- #
7
- # Uncomment to ignore some test failures (but the tests will run anyway).
8
- # Valid values:
9
- #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems
10
- #
11
- # If you need to specify the .gemspec (eg there is more than one)
12
- #export DH_RUBY_GEMSPEC=gem.gemspec
13
-
14
- %:
15
- dh $@ --buildsystem=ruby --with ruby
@@ -1 +0,0 @@
1
- 3.0 (quilt)