da_funk 1.11.2 → 1.12.0

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: 0cd645ecc38090b918d342b45affe2f994a70d7c
4
- data.tar.gz: f5833766fd1c1f394c23b14d63356cabb1711351
3
+ metadata.gz: 304644f5bc16cc540923f89bc9dd7f1d8a090270
4
+ data.tar.gz: a5411ee364ae02046de4cbd86d261f6011f9182b
5
5
  SHA512:
6
- metadata.gz: 304b68218ff4b457f13447d51df5d16438152c544fec5089a28a65db2fd566638878bfa0a268b73f3fc26b1f5ceb8bf914ed1655be82138cf2e81375e50c2367
7
- data.tar.gz: 70d42d12f295d2498af8ffbf55c429d367300cd1e4d5b3724fd774ce14c56ee69a71b9d86eceb6f2edc2e1e3c28ea2404194d4f941b3f1dc21c94ab0b9362bea
6
+ metadata.gz: 1cce1204ac44af751958a89a654975bc49cb20bc2eac8cf1dd52549564454eca988a77e6e4c397a02a3c8669cbec6f74b9d8fe5b1bd3912c0c37e7c557e1e24a
7
+ data.tar.gz: 3ab98b4965d982db7592742bb4a8ca66039b65c9ccd9b780ce57ac21e0d76a12d39d0155fb471d08371770f2d7e94c9475145deb0bc231d01e7266597b0e6446
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- da_funk (1.11.2)
4
+ da_funk (1.12.0)
5
5
  archive-zip (~> 0.5)
6
6
  bundler
7
7
  cloudwalk_handshake
@@ -19,7 +19,7 @@ GEM
19
19
  bundler
20
20
  rake
21
21
  cloudwalk_handshake (0.12.0)
22
- funky-emv (0.17.0)
22
+ funky-emv (0.17.2)
23
23
  funky-tlv (~> 0.2)
24
24
  funky-simplehttp (0.5.0)
25
25
  funky-tlv (0.2.3)
@@ -27,7 +27,7 @@ GEM
27
27
  parallel (1.12.1)
28
28
  parser (2.5.1.0)
29
29
  ast (~> 2.4.0)
30
- posxml_parser (2.3.4)
30
+ posxml_parser (2.6.0)
31
31
  funky-emv (~> 0.3)
32
32
  powerpack (0.1.1)
33
33
  rainbow (3.0.0)
data/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # DaFunk
2
2
 
3
+ ### 1.12.0 - 2018-08-09
4
+
5
+ - Do not raise exception when bitmap to be display doesn’t exists.
6
+ - Implement Device::Priter.print_barcode.
7
+
3
8
  ### 1.11.2 - 2018-07-02
4
9
 
5
10
  - Fix ISO8583 bitmap parse when greater than 64 bytes.
@@ -1,4 +1,4 @@
1
1
  module DaFunk
2
- VERSION="1.11.2"
2
+ VERSION="1.12.0"
3
3
  end
4
4
 
@@ -31,8 +31,11 @@ class Device
31
31
  # @param column [Fixnum] Column to start display.
32
32
  # @return [NilClass] nil.
33
33
  def self.print_bitmap(path, row = 0, column = 0)
34
- raise(File::FileError, path) unless File.exists?(path)
35
- adapter.display_bitmap(path, row, column)
34
+ if File.exists?(path)
35
+ adapter.display_bitmap(path, row, column)
36
+ else
37
+ false
38
+ end
36
39
  end
37
40
 
38
41
  # Clean display
@@ -182,11 +182,21 @@ class Device
182
182
  #
183
183
  # @param path [String] Path to bmp file.
184
184
  #
185
- # @return [NilClass] Allways returns nil.
185
+ # @return [Integer] 0 success.
186
186
  def self.print_bmp(path)
187
187
  self.adapter.print_bmp(path)
188
188
  end
189
189
 
190
+ # Print barcode as bmp image
191
+ #
192
+ # @param code [String] barcode number
193
+ #
194
+ # @return [Integer] 0 Success
195
+ # @return [Integer] -1 Fail
196
+ def self.print_barcode(code)
197
+ self.adapter.print_barcode(code)
198
+ end
199
+
190
200
  # Check printer status, useful for paper check.
191
201
  #
192
202
  # @return [Fixnum] RET_OK Success.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: da_funk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.2
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Scalone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-02 00:00:00.000000000 Z
11
+ date: 2018-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake