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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12e8a02422e6d233bd7b370895442a3dd04b20c0004bc7e3dc96e8090dc0fc56
4
- data.tar.gz: 3c13dd1d60c7a8d031f8aa9b20d3dfd7731ca5b14d45c7920292d45157acba67
3
+ metadata.gz: 96702196f98695a062bcdb7a44b2c96b1ffa69f6fa96ca04a8eb54a15623a4f6
4
+ data.tar.gz: badc883cc549bbcdca02e4e8271e79bd83e3083432ba90604963e3866d4cfca4
5
5
  SHA512:
6
- metadata.gz: 9d6f51635c1880fcee1e5561c3aef06b91b5884388d77018c10c95371cded7b653a10cf0fb04afa2e260a8ef4ea1fcce6cc344ecd6307e0b86dc569fdfe296d6
7
- data.tar.gz: f04a7b8bf11c13ec40e1013fd57bd903703e69c7b83bf5868e9efa4f56314f70b1c3f2c289bfca8c1be7f3b91fa84fadc9fdd7fba663b662048157f134602ced
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Labelary
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
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.5.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: 2023-03-02 00:00:00.000000000 Z
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.3.7
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