frontgo 0.2.0 → 0.3.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: 533fb35c0c54d45c9054ccf59fc3a49e2244b2f1e1b91dad113f4dcc1ceda88a
4
- data.tar.gz: baabc43b1d1328aaf3dc24c2bd38fd3104bab62c288f3a1a9ad6642ca1f1a101
3
+ metadata.gz: 1acebbf64df6b9761673ad035eb8c09be631e329f2453f91fbd10bf65629eb53
4
+ data.tar.gz: 05db32a4e8c7d44e5e07a808e10fbf86901922fc3fc70be311d5b7e5106c90a8
5
5
  SHA512:
6
- metadata.gz: a60f1d44f769fb474695f7a1829c1fc2b06e057a307f108b470151ab2369e0985e5ad8128acb0693a647ee03e06c99b5ee05c1fafe8a00106178666665416290
7
- data.tar.gz: c6e8b549cec6bc37b8613acdbad1f02afa49487cdc228a86204401bf62ca333f948269875cb54fff35f62007afd6072ef2c86dab21c2c9e70194affaf5004f15
6
+ metadata.gz: a288cceb6bc9d4fa65354ade6bbd45675cda0ee370f3505e87b84e848e46a94b6e7cd1a73202fdba431ff8d55e4f28828725e8e2bef13ab18416bf709f793664
7
+ data.tar.gz: fa2b1fd2b8ee7e549d2b58f93527a0f0e8df275061bdacb9d171c918fe524e0cf977b9af35051e42cbc7633077165dc4a2c0aade725c35ba964022206119a320
data/CHANGELOG.md CHANGED
@@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [0.2.0] - 2024-12-19
8
+ ## [0.3.0]
9
+
10
+ ### Changed
11
+ - Stop raising on API HTTP errors (4xx/5xx)
12
+
13
+ ## [0.2.0]
9
14
 
10
15
  ### Added
11
16
  - Support for multiple FrontPayment API environments (production and demo)
@@ -18,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
23
  - Default environment is now production (`https://apigo.frontpayment.no/api/v1`)
19
24
  - Demo environment available at `https://demo-api.frontpayment.no/api/v1/` when `demo: true` is passed
20
25
 
21
- ## [0.1.1] - 2024-12-19
26
+ ## [0.1.1]
22
27
 
23
28
  ### Added
24
29
  - Test coverage for `Order.get_order_status_by_uuid` method
@@ -27,7 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
27
32
  - All Standard Ruby style guide violations
28
33
  - Class naming conventions - renamed to singular form for better Ruby conventions
29
34
 
30
- ## [0.1.0] - 2024-12-19
35
+ ## [0.1.0]
31
36
 
32
37
  ### Added
33
38
  - Initial release of the Frontgo gem
data/README.md CHANGED
@@ -29,8 +29,21 @@ client.create_session_for_one_time_payment_link({
29
29
 
30
30
  # Get order status
31
31
  client.get_order_status_by_uuid("ODR123456789")
32
- ```
33
32
 
33
+ # With all the recommended error handling
34
+ begin
35
+ response = client.get_order_status_by_uuid("ODR123")
36
+ if response.success?
37
+ # handle success
38
+ else
39
+ # handle non-2xx response
40
+ end
41
+ rescue Faraday::TimeoutError, Faraday::ConnectionFailed, Faraday::SSLError => e
42
+ warn "Network error: #{e.class}: #{e.message}"
43
+ rescue Faraday::ParsingError => e
44
+ warn "Parsing error: #{e.message}"
45
+ end
46
+ ```
34
47
  ## Development
35
48
 
36
49
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Frontgo
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
data/lib/frontgo.rb CHANGED
@@ -37,7 +37,6 @@ module Frontgo
37
37
  conn.headers["Authorization"] = "Bearer #{key}"
38
38
  conn.request :json
39
39
  conn.response :json
40
- conn.response :raise_error
41
40
  end
42
41
  end
43
42
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frontgo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav (Stas) Katkov
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-08-11 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: faraday
@@ -57,7 +56,6 @@ metadata:
57
56
  homepage_uri: https://github.com/skatkov/frontgo
58
57
  source_code_uri: https://github.com/skatkov/frontgo
59
58
  changelog_uri: https://github.com/skatkov/frontgo/blob/master/CHANGELOG.md
60
- post_install_message:
61
59
  rdoc_options: []
62
60
  require_paths:
63
61
  - lib
@@ -72,8 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
70
  - !ruby/object:Gem::Version
73
71
  version: '0'
74
72
  requirements: []
75
- rubygems_version: 3.4.19
76
- signing_key:
73
+ rubygems_version: 3.6.9
77
74
  specification_version: 4
78
75
  summary: Ruby client for FrontPayment API
79
76
  test_files: []