labelzoom 1.0.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb5cacebc8dce60a6d1202a23295d51237e834593f029aa10b4ce32d1c9f32e9
4
- data.tar.gz: 329926fc32ac63622ef6e24fe530241c7771dc231b0bf24b45c16a20e2c73ff4
3
+ metadata.gz: 5e53e116fcc4a539a05767bbcfc41b5183bbc35b543c0d44734c39e9794294f6
4
+ data.tar.gz: 6427d841493c957056db56ec7f6e6427936ad2cb96b0f461001e9928c08b6a9e
5
5
  SHA512:
6
- metadata.gz: d8faac862c608c291a469f0f7657911abd74df7504d3882cac124bb2de9bb914cece3a3ac121ae5effcd5f3d4ad80b50050d504a8b4ccd4d399f253af247ced9
7
- data.tar.gz: 6fe2f0af475e5844c217e6df13cc1f799af72e0ccaf17034590f81040fa5e10622f8b8bc23d4c99f6c102a0112da1d7d8bc8fe1ebc24b8283317c4b214564cd3
6
+ metadata.gz: b5372753204ddfc8140831d11dc18be68794b54058bccec6a124d82d97d55294037c426d1a915726ae3273850b8dc667dcf7f10b38ce68f600cbec87c4f5724e
7
+ data.tar.gz: d80dff949a0d5da898caea170a44401a381349fa4099911f8d483859bc1c51944252c0ce5eeb0474193a173e7b29414f53eea866bef8b4f2eefeb678b3fe061a
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # LabelZoom Ruby SDK
4
4
 
5
5
  Official Ruby client for the [LabelZoom API](https://api.labelzoom.com). Converts barcode labels
6
- between ZPL, EPL, TSPL, DPL, PDF, LabelZoom XML/JSON, and raster images.
6
+ between ZPL, EPL, IPL, TSPL, DPL, SBPL, PDF, LabelZoom XML/JSON, and raster images.
7
7
 
8
8
  Ruby 3.1+. **No runtime dependencies** — `net/http`, `json`, `uri` and `openssl` are all standard
9
9
  library.
@@ -56,10 +56,11 @@ empty string — forces the free tier and suppresses that fallback.
56
56
 
57
57
  ## Formats
58
58
 
59
- **Sources (13):** `:zpl` `:epl` `:tspl` `:dpl` `:xml` `:json` `:pdf` `:png` `:bmp` `:gif` `:jpeg`
60
- `:jpg` `:url`
59
+ **Sources:** `:zpl` `:epl` `:ipl` `:tspl` `:dpl` `:sbpl` `:xml` `:json` `:pdf` `:png` `:bmp`
60
+ `:gif` `:jpeg` `:jpg` `:url`
61
61
 
62
- **Targets (11):** `:zpl` `:epl` `:tspl` `:dpl` `:xml` `:json` `:pdf` `:png` `:bmp` `:gif` `:jpeg`
62
+ **Targets:** `:zpl` `:epl` `:ipl` `:tspl` `:dpl` `:sbpl` `:xml` `:json` `:pdf` `:png` `:bmp`
63
+ `:gif` `:jpeg`
63
64
 
64
65
  `:jpg` is an input spelling that normalizes to `jpeg` on the wire, and `:url` tells the server to
65
66
  go fetch a document rather than naming a format — so neither is a target. The statically typed
@@ -67,8 +68,9 @@ SDKs make that a compile error; Ruby raises `LabelZoom::ValidationError` (an `Ar
67
68
  the call, before any request goes out.
68
69
 
69
70
  The printer languages round-trip: `pdf`→`epl` and `zpl`→`tspl` are real conversions. Their output
70
- is `text/plain`, but EPL's `GW` and TSPL's `BITMAP` commands inline raw binary, so read
71
- `result.bytes` rather than `result.text` whenever a label might carry graphics.
71
+ is `text/plain`, but every printer language can inline raw binary (EPL's `GW` and TSPL's `BITMAP`,
72
+ for example), so read `result.bytes` rather than `result.text` whenever a label might carry
73
+ graphics.
72
74
 
73
75
  ## Options
74
76
 
@@ -4,9 +4,10 @@ module LabelZoom
4
4
  # The outcome of a successful conversion.
5
5
  #
6
6
  # {#bytes} is authoritative. PDF, PNG, BMP, GIF and JPEG targets are binary, so treating
7
- # the response as text would silently corrupt five of the eleven targets -- and EPL and
8
- # TSPL reach the same hazard through a +text/plain+ response, because their +GW+ and
9
- # +BITMAP+ commands inline a raw 1-bpp payload.
7
+ # the response as text would silently corrupt five of the thirteen targets -- and every
8
+ # printer language reaches the same hazard through a +text/plain+ response: EPL's +GW+ and
9
+ # TSPL's +BITMAP+ inline a raw 1-bpp payload, IPL frames commands in +STX+/+ETX+ around
10
+ # packed bitmap columns, and SBPL embeds inline graphics between +ESC+ commands.
10
11
  class ConversionResult
11
12
  # @return [String] the response body as binary (ASCII-8BIT), exactly as the server
12
13
  # sent it. Note this is a String of bytes, not String#bytes' Array of Integers.
@@ -10,20 +10,23 @@ module LabelZoom
10
10
  # Every accepted source, in the contract's order. +:jpg+ is an input spelling that
11
11
  # normalizes to +:jpeg+ on the wire; +:url+ tells the server to go fetch a document
12
12
  # rather than naming a format.
13
- SOURCE_FORMATS = %i[zpl epl tspl dpl xml json pdf png bmp gif jpeg jpg url].freeze
13
+ SOURCE_FORMATS = %i[zpl epl ipl tspl dpl sbpl xml json pdf png bmp gif jpeg jpg url].freeze
14
14
 
15
15
  # Every accepted target. There is no +:url+ -- it is a fetch instruction, not an output
16
16
  # format -- and no +:jpg+, which is a source-side spelling only.
17
17
  #
18
18
  # The printer languages round-trip: +:epl+, +:tspl+ and +:dpl+ became targets in
19
- # contract 1.1.0, when the printer-language writers shipped.
20
- TARGET_FORMATS = %i[zpl epl tspl dpl xml json pdf png bmp gif jpeg].freeze
19
+ # contract 1.1.0, when the printer-language writers shipped, and +:ipl+ and +:sbpl+
20
+ # joined them in 1.2.0 with the Intermec and SATO adapters.
21
+ TARGET_FORMATS = %i[zpl epl ipl tspl dpl sbpl xml json pdf png bmp gif jpeg].freeze
21
22
 
22
23
  MEDIA_TYPES = {
23
24
  zpl: "text/plain",
24
25
  epl: "text/plain",
26
+ ipl: "text/plain",
25
27
  tspl: "text/plain",
26
28
  dpl: "text/plain",
29
+ sbpl: "text/plain",
27
30
  xml: "application/xml",
28
31
  json: "application/json",
29
32
  pdf: "application/pdf",
@@ -3,5 +3,5 @@
3
3
  module LabelZoom
4
4
  # The gem version. It appears in the User-Agent of every request, so the release
5
5
  # workflow asserts that it matches the `ruby/vX.Y.Z` tag being published.
6
- VERSION = "1.0.0"
6
+ VERSION = "1.1.0"
7
7
  end
data/lib/labelzoom.rb CHANGED
@@ -9,7 +9,7 @@ require_relative "labelzoom/client"
9
9
 
10
10
  # Official Ruby client for the LabelZoom API.
11
11
  #
12
- # LabelZoom converts barcode labels between printer languages (ZPL, EPL, TSPL, DPL),
12
+ # LabelZoom converts barcode labels between printer languages (ZPL, EPL, IPL, TSPL, DPL, SBPL),
13
13
  # LabelZoom's own XML/JSON model, PDF, and raster images. Almost everything the API does
14
14
  # happens at one endpoint:
15
15
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: labelzoom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RJF Technology Solutions LLC
@@ -9,8 +9,8 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
- description: Converts barcode labels between ZPL, EPL, TSPL, DPL, PDF, LabelZoom XML/JSON,
13
- and raster images via the LabelZoom API.
12
+ description: Converts barcode labels between ZPL, EPL, IPL, TSPL, DPL, SBPL, PDF,
13
+ LabelZoom XML/JSON, and raster images via the LabelZoom API.
14
14
  email:
15
15
  - support@labelzoom.com
16
16
  executables: []