petail 1.2.0 → 1.4.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: 82c7e568c3fb545b2616eaf3c45c132cc15c9c48b783380ec17a81c82d50656e
4
- data.tar.gz: fbdc7fd59fe0cec06f80909fa98f60baf6c5b7063c46572b2ed9760fc85fefed
3
+ metadata.gz: 24ef92dc268fd8fb544d5f631a3f1b16a5dad34d2ea25b6ed28f3e79b7273a26
4
+ data.tar.gz: e95ced59d292b420ba64cb6019cdc1d4d5efe19c0c4c30c7a14e836ba19d1db2
5
5
  SHA512:
6
- metadata.gz: e322b91c04338f151ea2e7f32238aa09e3f70f53b6f456c6b0a067ab1f836166bcd2c226fae4386d250b85cdfc98db1619bc9e7960aa337a8a5d853e50fbfe65
7
- data.tar.gz: 7d8cd72c90fcc7d3e69b19fbeb87408543a76a734ebeca1b5da445e723b59d521ddc37ae72d1a655df1938e5ff9230b4503973547cd166b3430e3ba50db52f15
6
+ metadata.gz: 4b3a2a17aa494226dc206203ffcf7861e98a6d4b9c22aecaf0c4a116a79d920e05551b11df52ddb79f972bdc6a3b0e390e8864efc81b9f0a1b367062b689f632
7
+ data.tar.gz: 4a9a7586e705de44eae8b0be308c97b83f7572ee396b8cb5906dc7b0572d39c41e4b82fe16b969fa8ee95facf51f00ecca68d110f7e6f3c8f4561a422f74562f
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  = Petail
6
6
 
7
+ ‼️ *This gem is deprecated and will be fully destroyed on 2027-02-05. Please use the link:https://alchemists.io/projects/rfc-api-problem[RFC API Problem] gem instead.* ‼️
8
+
7
9
  Petail is a portmanteau (i.e. `[p]roblem + d[etail] = petail`) that implements link:https://www.rfc-editor.org/rfc/rfc9457[RFC 9457: Problem Details for HTTP APIs]. This allows you to produce HTTP error responses that are structured, machine readable, and consistent.
8
10
 
9
11
  toc::[]
@@ -9,7 +9,7 @@ module Petail
9
9
 
10
10
  # Models the problem details response payload.
11
11
  Payload = Struct.new(*PRIMARY_KEYS, :extensions) do
12
- def self.for(**attributes)
12
+ def self.for **attributes
13
13
  status = attributes.delete(:status).then { Rack::Utils.status_code it if it }
14
14
  title = attributes.delete(:title).then { it || Rack::Utils::HTTP_STATUS_CODES[status] }
15
15
 
@@ -61,7 +61,7 @@ module Petail
61
61
 
62
62
  # :reek:TooManyStatements
63
63
  # :reek:FeatureEnvy
64
- def to_xml(serializer: XML::Serializer, **options)
64
+ def to_xml serializer: XML::Serializer, **options
65
65
  document = REXML::Document.new
66
66
  document.add REXML::XMLDecl.new("1.0", "UTF-8")
67
67
 
data/petail.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "petail"
5
- spec.version = "1.2.0"
5
+ spec.version = "1.4.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/petail"
@@ -19,6 +19,11 @@ Gem::Specification.new do |spec|
19
19
  "source_code_uri" => "https://github.com/bkuhlmann/petail"
20
20
  }
21
21
 
22
+ spec.post_install_message = <<~MESSAGE
23
+ DEPRECATION: The Petail gem is deprecated and will be fully destroyed on 2027-02-05.
24
+ Please use the RFC API Problem gem instead.
25
+ MESSAGE
26
+
22
27
  spec.signing_key = Gem.default_key_path
23
28
  spec.cert_chain = [Gem.default_cert_path]
24
29
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -95,6 +95,9 @@ metadata:
95
95
  label: Petail
96
96
  rubygems_mfa_required: 'true'
97
97
  source_code_uri: https://github.com/bkuhlmann/petail
98
+ post_install_message: |
99
+ DEPRECATION: The Petail gem is deprecated and will be fully destroyed on 2027-02-05.
100
+ Please use the RFC API Problem gem instead.
98
101
  rdoc_options: []
99
102
  require_paths:
100
103
  - lib
@@ -109,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
112
  - !ruby/object:Gem::Version
110
113
  version: '0'
111
114
  requirements: []
112
- rubygems_version: 4.0.10
115
+ rubygems_version: 4.0.19
113
116
  specification_version: 4
114
117
  summary: A RFC 9457 Problem Details for HTTP APIs implementation.
115
118
  test_files: []
metadata.gz.sig CHANGED
Binary file