pos-printer 0.0.10 → 0.1.0
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.
- checksums.yaml +4 -4
 - data/lib/pos/printer.rb +10 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 98919ecf4df5acf0ada18f7d0a2b4aecdd4acf3ccf587cea2c98ca71355c6c97
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 36fc1946d73fcfe1cf007f95ad42aa5c2a535abf7a7aa36f317ea39bd21cfc00
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 404351ae8c620eedd824d4a4e47f448983360a233e216589bb600f09ff143860adad3af5770e47cc88b7f2716b7c77765c448c662c4991103035ea451a9c6e93
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 1b7c91d6122389e88e3eebf016a416f2f1c8591f4ea0189af351beb8509ab4af582a36c239cca8f1cb078d4807d6005218c9a02943c384e6e600cb6a3d7a7210
         
     | 
    
        data/lib/pos/printer.rb
    CHANGED
    
    | 
         @@ -61,6 +61,15 @@ module POS 
     | 
|
| 
       61 
61 
     | 
    
         
             
                  add_command "\x1cp\1\0"
         
     | 
| 
       62 
62 
     | 
    
         
             
                end
         
     | 
| 
       63 
63 
     | 
    
         | 
| 
      
 64 
     | 
    
         
            +
                def barcode(str, dpi = 162, width = 3)
         
     | 
| 
      
 65 
     | 
    
         
            +
                  add_command "\x1D\x48\x00"
         
     | 
| 
      
 66 
     | 
    
         
            +
                  add_command "\x1B\x61\x01"
         
     | 
| 
      
 67 
     | 
    
         
            +
                  add_command "\x1D\x68#{dpi.chr}"
         
     | 
| 
      
 68 
     | 
    
         
            +
                  add_command "\x1D\x77#{width.chr}"
         
     | 
| 
      
 69 
     | 
    
         
            +
                  add_command "\x1D\x6B\x49#{str.size.chr}"
         
     | 
| 
      
 70 
     | 
    
         
            +
                  add_command str
         
     | 
| 
      
 71 
     | 
    
         
            +
                end
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
       64 
73 
     | 
    
         
             
                def qr_code(str)
         
     | 
| 
       65 
74 
     | 
    
         
             
                  qr_size = 4
         
     | 
| 
       66 
75 
     | 
    
         
             
                  s = str.size + 3
         
     | 
| 
         @@ -105,7 +114,7 @@ module POS 
     | 
|
| 
       105 
114 
     | 
    
         
             
                  when :usa
         
     | 
| 
       106 
115 
     | 
    
         
             
                    0
         
     | 
| 
       107 
116 
     | 
    
         
             
                  when :katakana
         
     | 
| 
       108 
     | 
    
         
            -
                    1 
     | 
| 
      
 117 
     | 
    
         
            +
                    1
         
     | 
| 
       109 
118 
     | 
    
         
             
                  when :multilingual
         
     | 
| 
       110 
119 
     | 
    
         
             
                    2
         
     | 
| 
       111 
120 
     | 
    
         
             
                  when :portuguese
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: pos-printer
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Yusent Chig
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-12-03 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       13 
13 
     | 
    
         
             
            description: Library for printing using ESC/POS (thermal) printers using CUPS.
         
     | 
| 
       14 
14 
     | 
    
         
             
            email: yusent@protonmail.com
         
     | 
| 
         @@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       37 
37 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       38 
38 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       39 
39 
     | 
    
         
             
            requirements: []
         
     | 
| 
       40 
     | 
    
         
            -
            rubygems_version: 3.0. 
     | 
| 
      
 40 
     | 
    
         
            +
            rubygems_version: 3.0.3.1
         
     | 
| 
       41 
41 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       42 
42 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       43 
43 
     | 
    
         
             
            summary: Library for printing using ESC/POS (thermal) printers using CUPS.
         
     |