image-charts 6.1.7 → 6.1.8
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/image-charts.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2e2ba443115c7970e237ef304a93d0f566dab5824642b72e66a4f5cf69f183e1
|
|
4
|
+
data.tar.gz: 5a36bc869a9248beff80de29699f88ddccf3d2e9db4061c03914793c811f2f54
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ea8ad55ed43d75fda58f3a25816059967268f3961ba87f3b78604657ae993e8b8d7716464d2daff3b7884a308b86a00e6e5469e4ac754f09734ab2ec231e7c8
|
|
7
|
+
data.tar.gz: 48b8a3e366d9b74acb9bec9bd250367ed725024d22eb8cc576f2498b4a525871c150aa69feeb7a448f9c9fe721850188e027313fe310a0359de385d2997e3a49
|
data/image-charts.rb
CHANGED
|
@@ -14,7 +14,7 @@ require 'base64'
|
|
|
14
14
|
class ImageCharts
|
|
15
15
|
attr_reader :request_headers, :_protocol, :_host, :_port, :_pathname, :_timeout, :_query
|
|
16
16
|
|
|
17
|
-
def initialize(secret: nil, protocol: 'https', host: 'image-charts.com', port: 443, timeout: 5000, previous: nil)
|
|
17
|
+
def initialize(secret: nil, protocol: 'https', host: 'image-charts.com', port: 443, timeout: 5000, user_agent: nil, previous: nil)
|
|
18
18
|
@_protocol = protocol
|
|
19
19
|
@_host = host
|
|
20
20
|
@_port = port
|
|
@@ -22,6 +22,7 @@ class ImageCharts
|
|
|
22
22
|
@_timeout = timeout
|
|
23
23
|
@_query = if previous then previous else Hash.new(0) end
|
|
24
24
|
@_secret = secret
|
|
25
|
+
@_user_agent = user_agent
|
|
25
26
|
end
|
|
26
27
|
|
|
27
28
|
#
|
|
@@ -46,7 +47,8 @@ class ImageCharts
|
|
|
46
47
|
def to_blob()
|
|
47
48
|
|
|
48
49
|
spec = Gem.loaded_specs["image-charts"]
|
|
49
|
-
|
|
50
|
+
default_user_agent = "ruby-image-charts/" + (if spec then spec.version.to_s else 'latest' end) + (if @_query.has_key?('icac') then " (#{@_query['icac']})" else '' end)
|
|
51
|
+
@request_headers = {"user-agent" => (@_user_agent || default_user_agent)}
|
|
50
52
|
|
|
51
53
|
http = Net::HTTP.new(@_host, @_port)
|
|
52
54
|
|
|
@@ -544,6 +546,7 @@ class ImageCharts
|
|
|
544
546
|
port: @_port,
|
|
545
547
|
timeout: @_timeout,
|
|
546
548
|
secret: @_secret,
|
|
549
|
+
user_agent: @_user_agent,
|
|
547
550
|
previous: add)
|
|
548
551
|
end
|
|
549
552
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: image-charts
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.1.
|
|
4
|
+
version: 6.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Francois-Guillaume Ribreau
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|