labelary 0.4.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/.github/workflows/rubygems.yml +0 -2
- data/README.md +1 -0
- data/labelary.gemspec +3 -2
- data/lib/labelary/client.rb +1 -0
- data/lib/labelary/configuration.rb +3 -1
- data/lib/labelary/version.rb +1 -1
- data/lib/labelary.rb +3 -1
- metadata +24 -16
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/labelary.gemspec
CHANGED
|
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
|
25
25
|
spec.add_development_dependency 'rake'
|
|
26
26
|
spec.add_development_dependency 'pry'
|
|
27
27
|
|
|
28
|
-
spec.add_dependency 'faraday', '>= 0.9', '<
|
|
29
|
-
spec.add_dependency '
|
|
28
|
+
spec.add_dependency 'faraday', '>= 0.9', '< 3'
|
|
29
|
+
spec.add_dependency 'faraday-multipart'
|
|
30
|
+
spec.add_dependency 'activesupport'
|
|
30
31
|
end
|
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,10 +27,11 @@ 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
|
|
32
|
-
@index =
|
|
34
|
+
@index = ''
|
|
33
35
|
@content_type = 'image/png'
|
|
34
36
|
@font = ''
|
|
35
37
|
end
|
data/lib/labelary/version.rb
CHANGED
data/lib/labelary.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
|
-
autorequire:
|
|
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
|
|
@@ -61,7 +61,7 @@ dependencies:
|
|
|
61
61
|
version: '0.9'
|
|
62
62
|
- - "<"
|
|
63
63
|
- !ruby/object:Gem::Version
|
|
64
|
-
version: '
|
|
64
|
+
version: '3'
|
|
65
65
|
type: :runtime
|
|
66
66
|
prerelease: false
|
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -71,27 +71,35 @@ dependencies:
|
|
|
71
71
|
version: '0.9'
|
|
72
72
|
- - "<"
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '
|
|
74
|
+
version: '3'
|
|
75
75
|
- !ruby/object:Gem::Dependency
|
|
76
|
-
name:
|
|
76
|
+
name: faraday-multipart
|
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
|
78
78
|
requirements:
|
|
79
79
|
- - ">="
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '0
|
|
82
|
-
- - "<"
|
|
83
|
-
- !ruby/object:Gem::Version
|
|
84
|
-
version: '2'
|
|
81
|
+
version: '0'
|
|
85
82
|
type: :runtime
|
|
86
83
|
prerelease: false
|
|
87
84
|
version_requirements: !ruby/object:Gem::Requirement
|
|
88
85
|
requirements:
|
|
89
86
|
- - ">="
|
|
90
87
|
- !ruby/object:Gem::Version
|
|
91
|
-
version: '0
|
|
92
|
-
|
|
88
|
+
version: '0'
|
|
89
|
+
- !ruby/object:Gem::Dependency
|
|
90
|
+
name: activesupport
|
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
93
94
|
- !ruby/object:Gem::Version
|
|
94
|
-
version: '
|
|
95
|
+
version: '0'
|
|
96
|
+
type: :runtime
|
|
97
|
+
prerelease: false
|
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: '0'
|
|
95
103
|
description: Ruby Gem to interact with the Labelary.com ZPL Web Service
|
|
96
104
|
email:
|
|
97
105
|
- github@robert.net.nz
|
|
@@ -118,7 +126,7 @@ homepage: https://github.com/rjocoleman/labelary
|
|
|
118
126
|
licenses:
|
|
119
127
|
- MIT
|
|
120
128
|
metadata: {}
|
|
121
|
-
post_install_message:
|
|
129
|
+
post_install_message:
|
|
122
130
|
rdoc_options: []
|
|
123
131
|
require_paths:
|
|
124
132
|
- lib
|
|
@@ -133,8 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
133
141
|
- !ruby/object:Gem::Version
|
|
134
142
|
version: '0'
|
|
135
143
|
requirements: []
|
|
136
|
-
rubygems_version: 3.
|
|
137
|
-
signing_key:
|
|
144
|
+
rubygems_version: 3.5.9
|
|
145
|
+
signing_key:
|
|
138
146
|
specification_version: 4
|
|
139
147
|
summary: Ruby Gem to interact with the Labelary.com ZPL Web Service
|
|
140
148
|
test_files: []
|