prometheus-client 4.2.5 → 5.0.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: caf799f0812d86692c1bffadf545075cf5d7fd84b6016e2a5a6ca9658a9e7c82
4
- data.tar.gz: 90ed16b1cfc49d43ec365cf5b28b389f4f33f278884638436d1c7673fdc564fb
3
+ metadata.gz: 703b8174a3ae4a293a02b4ca8bcb86f27917de2b65fd0620ddb60db98734c18d
4
+ data.tar.gz: 898b39b3aeb2f74428c0601e311eec09bc823145e7c1ac55d6d57ac3967918c3
5
5
  SHA512:
6
- metadata.gz: c5ac30c94703ad68e7f4bd9c62b2e7e873dfdc9fdf965fa40d9f459cc389203ee1673b6a38256baebedc779d4b5776a01e17ec5e19fda5f0246a1a46286ca18c
7
- data.tar.gz: 32efbccac72367c4176a40289d2a4ef8aa3c7870aceac05ae3936a0a013ac753425042f5844f990941bf7d4d68552eb68f1ffa340e22d1ddf61e5bb2945a26c5
6
+ metadata.gz: 46056bc9e84a2fed451eb80f80bb79b253d8f7a24f082390d3b88d11e0048431319c4ac34b4109c66244f6d0fefce799ccb3f700c439069ee198bed31bd8dd6c
7
+ data.tar.gz: a4d2c9c470b07bf9ed6e46ecff048be472dc8c0c7f41ff04e8eacbfbcc9dd88a01b7f7a1cf52213676d6fcee6399337dd6bd4f4f0d5db6193526accf8ef0b529
data/README.md CHANGED
@@ -5,7 +5,7 @@ through a HTTP interface. Intended to be used together with a
5
5
  [Prometheus server][1].
6
6
 
7
7
  [![Gem Version][4]](http://badge.fury.io/rb/prometheus-client)
8
- [![Build Status][3]](https://circleci.com/gh/prometheus/client_ruby/tree/main.svg?style=svg)
8
+ [![Build Status][3]](https://github.com/prometheus/client_ruby/actions/workflows/ci.yml)
9
9
 
10
10
  ## Usage
11
11
 
@@ -504,7 +504,7 @@ rake
504
504
 
505
505
  [1]: https://github.com/prometheus/prometheus
506
506
  [2]: http://rack.github.io/
507
- [3]: https://circleci.com/gh/prometheus/client_ruby/tree/main.svg?style=svg
507
+ [3]: https://github.com/prometheus/client_ruby/actions/workflows/ci.yml/badge.svg
508
508
  [4]: https://badge.fury.io/rb/prometheus-client.svg
509
509
  [8]: https://github.com/prometheus/pushgateway
510
510
  [9]: lib/prometheus/middleware/exporter.rb
@@ -1,5 +1,5 @@
1
1
  require 'fileutils'
2
- require "cgi"
2
+ require "uri"
3
3
 
4
4
  module Prometheus
5
5
  module Client
@@ -133,12 +133,9 @@ module Prometheus
133
133
  begin
134
134
  store = FileMappedDict.new(file_path, true)
135
135
  store.all_values.each do |(labelset_qs, v, ts)|
136
- # Labels come as a query string, and CGI::parse returns arrays for each key
137
- # "foo=bar&x=y" => { "foo" => ["bar"], "x" => ["y"] }
138
- # Turn the keys back into symbols, and remove the arrays
139
- label_set = CGI::parse(labelset_qs).map do |k, vs|
140
- [k.to_sym, vs.first]
141
- end.to_h
136
+ # Labels come as a query string
137
+ # "foo=bar&x=y" => { foo: "bar", x: "y" }
138
+ label_set = URI.decode_www_form(labelset_qs).to_h.transform_keys(&:to_sym)
142
139
 
143
140
  stores_data[label_set] << [v, ts]
144
141
  end
@@ -165,7 +162,7 @@ module Prometheus
165
162
  labels[:pid] = process_id
166
163
  end
167
164
 
168
- labels.to_a.sort.map{|k,v| "#{CGI::escape(k.to_s)}=#{CGI::escape(v.to_s)}"}.join('&')
165
+ URI.encode_www_form(labels.to_a.sort)
169
166
  end
170
167
 
171
168
  def internal_store
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Prometheus
4
4
  module Client
5
- VERSION = '4.2.5'
5
+ VERSION = '5.0.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.5
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Kochie
@@ -9,7 +9,7 @@ authors:
9
9
  - Daniel Magliola
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-07-05 00:00:00.000000000 Z
12
+ date: 2026-08-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: base64