easyzpl 0.2.5 → 0.2.6

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: 0cce1e37d7699ce5e0b48dbce06911ea5b34144c
4
- data.tar.gz: 03ab6428bdd2b8f22ac4a7d9ed02eac013ab7988
3
+ metadata.gz: ef8ad2ea61a36f82d5d1fec32ff292b6106e4a79
4
+ data.tar.gz: f0da9e778f7a121f3e308470ca02a89efffc38e0
5
5
  SHA512:
6
- metadata.gz: a028a84b52aaaf05d189cc2c79a2da9be2eff41041eb6e190f738dfcb3bdc7ab2a94709d826ef9720b684397dcb7f8f8b2a47e80d396e6a68a35934efe544e1c
7
- data.tar.gz: 6a28160fc30123c11c053ca9dcd373289968188d7d75835c9a276c3768bd8cd9b19db7febeaccfa47dbd662f38546193fe253e5f20af9c40a22ad6d486f28e06
6
+ metadata.gz: 1b0df0d107bf75a08c801c806d7b85ae765f5731bde307706aabf33777f4ffe3ca2910463ce5dcb4a0750297661b8d7093ec0f51e725878d63276b654d1ee38b
7
+ data.tar.gz: a4430ecf71b870b326c5b50b62bbf90664bf7450fb181a62fa9cb5658936ecc6c67cb7372df3fbcc5e5cb9718e4352badfa9a51c6f2403e2a87c05d9ef57f0ac
data/lib/easyzpl/label.rb CHANGED
@@ -63,6 +63,7 @@ module Easyzpl
63
63
  options[:height].to_s + ',' + options[:width].to_s +
64
64
  '^FD' + text + '^FS')
65
65
 
66
+ return unless label_height > 0 && label_width > 0
66
67
  pdf.text_box text,
67
68
  at: [x, label_width - y -
68
69
  Integer(options[:height] / 10)],
@@ -44,6 +44,7 @@ module Easyzpl
44
44
  options[:height].to_s + ',' + options[:width].to_s +
45
45
  '^FN' + variable_fields_count.to_s + '^FS')
46
46
 
47
+ return unless label_height > 0 && label_width > 0
47
48
  pdf.text_box '{Variable Field ' + variable_fields_count.to_s + '}',
48
49
  at: [x, label_width - y - Integer(options[:height] / 10)],
49
50
  size: options[:height] if label_height && label_width
@@ -33,7 +33,8 @@ module Easyzpl
33
33
  self.variable_fields_count += 1
34
34
 
35
35
  # Add the field
36
- label_data.push('^FN' + variable_fields_count.to_s + '^FD' + value + '^FS')
36
+ label_data.push('^FN' + variable_fields_count.to_s +
37
+ '^FD' + value + '^FS')
37
38
  end
38
39
  end
39
40
  end
@@ -1,4 +1,4 @@
1
1
  # Section holds the version number of the Gem
2
2
  module Easyzpl
3
- VERSION = '0.2.5'
3
+ VERSION = '0.2.6'
4
4
  end
data/spec/easyzpl_spec.rb CHANGED
@@ -26,7 +26,7 @@ describe 'Testing easyzpl Gem' do
26
26
  label.draw_border(0, 0, 400, 300)
27
27
  label.variable_text_field(10, 10)
28
28
  label.variable_bar_code_39(10, 30)
29
- expect(label.to_s).to eq('^XA^DFTemplate1^FS^LH30,30^FO0,0^GB400,300,1^FS^FO10,10^FN1^FS^FO10,30^B3N,Y,20,N,N^FN2^FS^PQ1^XZ')
29
+ expect(label.to_s).to eq('^XA^DFTemplate1^FS^LH30,30^FO0,0^GB400,300,1^FS^FO10,10^AFN,10,10^FN1^FS^FO10,30^B3N,Y,20,N,N^FN2^FS^PQ1^XZ')
30
30
  end
31
31
  end
32
32
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easyzpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Grigajtis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-17 00:00:00.000000000 Z
11
+ date: 2014-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler