patch_retention 0.1.0 → 0.1.2

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: 39372fa6c5337b7ee0b824d3a9b717cf6f3b62486ed6da883feb7eb394e7e0ee
4
- data.tar.gz: 4a91fb7072ef27462f7b191801aa2ca44150a41c4f750d7935f48645a40ef2ac
3
+ metadata.gz: fadb1c62a03723e009e23b6e20980f4d1e345497c03f1bdceb327e589ffdac22
4
+ data.tar.gz: 2667403dfe8ede9f30573e9384d42d2b5c89d51b69b9d851a6a87a9090cce8ed
5
5
  SHA512:
6
- metadata.gz: a2d9e50653fa49e3a025825e79d6b7aea605489c512c4610a547a90c7d9ec692ce2ec18b9b220994de7cf8a072b779be5348edb158d7e6fad68fd1e65a19597a
7
- data.tar.gz: 53d290e59bb4a343948d64b6b65e706f89b413868c787f73d2f35c843d57f50c143ac95eaf126e72a711badf604efb18d23542fb484c5a6867ba01f46e00dae8
6
+ metadata.gz: 8b8b7f12cbcdc4b1ad2e2d9cc371ac6919b6430ee4b829a116ec6e1cba01e71919c5bd06e6fc78eca419c07c1378ef3c102f08871e41200725536bb5cdb32e67
7
+ data.tar.gz: 8439450f9ee0fcb12daa2045acc6716c6f6e45cb2c4ce6ae7b2bfead467b6e044eb9a538dfb5d8a39c0e46329d432a8de914e40d5d85122f577ab8c41988e849
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ### [0.1.3] - 2024-02-05
4
+
5
+ - Support proxying to a different host
6
+ - Submit responses with JSON format and headers to preserve data types
7
+
3
8
  ## [0.1.0] - 2023-12-03
4
9
 
5
10
  - Initial release
@@ -2,12 +2,13 @@
2
2
 
3
3
  module PatchRetention # rubocop:disable Style/ClassAndModuleChildren
4
4
  class Configuration
5
- attr_accessor :api_url, :client_id, :client_secret
5
+ attr_accessor :api_url, :proxy_url, :client_id, :client_secret
6
6
 
7
7
  def initialize
8
8
  @api_url = ENV.fetch("PATCH_RETENTION_API_URL", "https://api.patchretention.com/v2")
9
9
  @client_id = ENV.fetch("PATCH_RETENTION_CLIENT_ID", nil)
10
10
  @client_secret = ENV.fetch("PATCH_RETENTION_CLIENT_SECRET", nil)
11
+ @proxy_url = ENV.fetch("PATCH_RETENTION_PROXY_URL", nil)
11
12
  end
12
13
  end
13
14
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PatchRetention::Contacts::Delete
4
- include PatchRetention::Utils
4
+ include PatchRetention::Util
5
5
  extend self
6
6
 
7
7
  def call(id)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PatchRetention
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -24,11 +24,14 @@ module PatchRetention
24
24
  def connection
25
25
  Faraday.new(
26
26
  url: configuration.api_url,
27
+ proxy: configuration.proxy_url,
27
28
  headers: {
28
29
  "Authorization" => "Bearer #{configuration.client_secret}",
29
30
  "X-Account-Id" => configuration.client_id
30
31
  }
31
- )
32
+ ) do |builder|
33
+ builder.request :json
34
+ end
32
35
  end
33
36
  end
34
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patch_retention
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Playbypoint
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-12-13 00:00:00.000000000 Z
12
+ date: 2024-02-05 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Patch Retention API wrapper.
15
15
  email: