labelary 0.5.0 → 0.6.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/README.md +1 -0
- data/lib/labelary/client.rb +1 -0
- data/lib/labelary/configuration.rb +2 -0
- data/lib/labelary/version.rb +1 -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: 96702196f98695a062bcdb7a44b2c96b1ffa69f6fa96ca04a8eb54a15623a4f6
|
|
4
|
+
data.tar.gz: badc883cc549bbcdca02e4e8271e79bd83e3083432ba90604963e3866d4cfca4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3d20adef05c8b7b7ecc695020dc46ab0e77884b646e36e5128943c566b50a4710936e6a7e7b9e0dce3edbed6fc7d7c312c9cbd859ab452b8737afbb69f9dde2
|
|
7
|
+
data.tar.gz: afdfd2691165f58cf1e14f29a14aba96ab8bdbd42888b04a6c7aa6368634b5a94b5b014735a2cb795234a3272a14fa69e0f076f5f7c71c69560a1c4b2f3031c5
|
data/README.md
CHANGED
|
@@ -45,6 +45,7 @@ Labelary.configure do |config|
|
|
|
45
45
|
config.index = 0 # optional, for picking a label when multiple are present in the ZPL (usually 0)
|
|
46
46
|
config.content_type = 'image/png' # or 'application/pdf', specifies the content type of the returned label
|
|
47
47
|
config.url = 'http://api.labelary.com' # optional (for self hosted)
|
|
48
|
+
config.api_key = 'api_key' # optional (for Labelary Business Saas, requires url to be set for the Paid API endpoint)
|
|
48
49
|
end
|
|
49
50
|
```
|
|
50
51
|
|
data/lib/labelary/client.rb
CHANGED
|
@@ -8,6 +8,7 @@ module Labelary
|
|
|
8
8
|
@connection ||= Faraday.new(url: config.url) do |faraday|
|
|
9
9
|
faraday.request :multipart
|
|
10
10
|
faraday.response :json, content_type: /\bjson$/
|
|
11
|
+
faraday.headers['X-API-Key'] = config.api_key if config.api_key
|
|
11
12
|
|
|
12
13
|
faraday.adapter config.http_adapter
|
|
13
14
|
end
|
|
@@ -14,6 +14,7 @@ module Labelary
|
|
|
14
14
|
class Configuration
|
|
15
15
|
attr_accessor *[
|
|
16
16
|
:url,
|
|
17
|
+
:api_key,
|
|
17
18
|
:http_adapter,
|
|
18
19
|
:dpmm,
|
|
19
20
|
:width,
|
|
@@ -26,6 +27,7 @@ module Labelary
|
|
|
26
27
|
def initialize
|
|
27
28
|
@url = 'http://api.labelary.com'
|
|
28
29
|
@http_adapter = Faraday.default_adapter
|
|
30
|
+
@api_key = nil
|
|
29
31
|
@dpmm = nil
|
|
30
32
|
@width = nil
|
|
31
33
|
@height = nil
|
data/lib/labelary/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: labelary
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Coleman
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-05-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
141
141
|
- !ruby/object:Gem::Version
|
|
142
142
|
version: '0'
|
|
143
143
|
requirements: []
|
|
144
|
-
rubygems_version: 3.
|
|
144
|
+
rubygems_version: 3.5.9
|
|
145
145
|
signing_key:
|
|
146
146
|
specification_version: 4
|
|
147
147
|
summary: Ruby Gem to interact with the Labelary.com ZPL Web Service
|