udrs 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d3374519f2ed65a926b1a97bd86b802b1768b74
4
- data.tar.gz: 23dd10b0b2cc0198ef2c0f57ab2f063e912fd7a3
3
+ metadata.gz: e4794ca81b2f3ee52215f6f3f87b2cb74cc0f21e
4
+ data.tar.gz: 03107ce7b20b089c42b1a6f4e1f09ce44ba4814f
5
5
  SHA512:
6
- metadata.gz: 8c9f73a59c69fe4e7a6db65d28ef36baa6e9c8cef9f47e378fca833bf24aec3170923ba0faf53615290c211b22c1b7ab5a917a550f44292c3e3ce28621c0e865
7
- data.tar.gz: 280bb5ea53a41c35cb105830983689cb89b97098639bc0f6b7b01428ff38f06c8cd9ed2c6961bfdabc54b6ec51185107f3fc63e849693411d5a870a56380bfa7
6
+ metadata.gz: c2500cb3ff03644a35b1427f548530456b2fe9aa2a4cd79382f0738d35da0745dea0b4bf84ea63f58542bed56048638453c56475fb99b874c3c9de313e19ca0c
7
+ data.tar.gz: 439e27fa7ea467a13c5dd6fca3915459e4f17257893fe7e01783596639cb9d484f18950e1f81b502cfed3c900cf4cc5a08be28a043d38ba0c50deb8a3a1b7f43
@@ -11,7 +11,8 @@ module UDRS
11
11
  Mime::Type.register_alias('application/octet-stream', :escp) if !Mime::Type.lookup_by_extension(:escp)
12
12
 
13
13
  ActionController::MimeResponds::Collector.send(:define_method, 'udrs') do |&block|
14
- return any(*%i(pdf escp), &block)
14
+ pdf(&block)
15
+ escp(&block)
15
16
  end
16
17
  end
17
18
  end
@@ -49,6 +49,7 @@ module UDRS
49
49
  @buffer << "#{ESC}p#{0.chr}#{100.chr}#{100.chr}"
50
50
 
51
51
  # Render the items
52
+ @last_item = :page_end
52
53
  render_item(container)
53
54
  render_page_end(nil)
54
55
 
@@ -68,8 +69,12 @@ module UDRS
68
69
  ##############################
69
70
 
70
71
  def render_page_end(page_end)
72
+ return if @last_item == :page_end
73
+
71
74
  # Cut the paper at page end
72
75
  @buffer << "\n\n\n\n\n\x1DV1\n"
76
+
77
+ @last_item = :page_end
73
78
  end
74
79
 
75
80
  def render_spacer(spacer)
@@ -1,3 +1,3 @@
1
1
  module Udrs
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: udrs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michon van Dooren