api_six_client 1.2.7 → 1.2.9

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: 8bfbceb10eeb9fe5ff0b89133ff1d16ee45671c45a757a929f71d487b96d0012
4
- data.tar.gz: a7a65d05bca68a0b0f6e3ad5aea84a27978639b14ff828299a8fd435c755dd34
3
+ metadata.gz: 61c958a1e5ae851bf3fbdf7c0a93dc815339a2ef753e6f55bdaa38c9a7b9f236
4
+ data.tar.gz: fc788555757739cd9a02766f633e66fafcef15d1a9bf8a8d9b16990026a9f4ad
5
5
  SHA512:
6
- metadata.gz: 9b9afec5b840b25e8c00c8bef8ae4598c5e1f8ddb69d0ea6a3a3f70da768912bc4dc7e24c974080d31af6b009863d3d2bf472e8398c124ff26b84f85adc4b210
7
- data.tar.gz: efd6677661042707e037ded4afc609eec3820cee11fd9d9bd7bf7d39eaa1566a8908a464e50159ac85eb51b53068e1156beb3d4c8aed7e567a8be42905f6253c
6
+ metadata.gz: 283a828131eef56f0d6ec58b4cc350c2318e4939215db70ec979eddbaf6c01e7ecd3d2618ded2479ac0c3a34e0331280c80e2bc4c7fbfc054f6e47ac69b831b9
7
+ data.tar.gz: ba5e3957d31582c21ff2c0eec9bdd63ed7d318e0ecbe2a0989b4cadf3e5d3cd1f70c440de006c19be155c035ca821a1c0a3aef90d5ab99f2ca0a2a354176e94e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- api_six_client (1.2.7)
4
+ api_six_client (1.2.9)
5
5
  faraday (~> 1)
6
6
 
7
7
  GEM
@@ -38,6 +38,10 @@ module ApiSixClient
38
38
 
39
39
  protected
40
40
 
41
+ def deprecation_msg
42
+ Rails.logger.warn("#{self.class} is deprecated") if defined?(Rails)
43
+ end
44
+
41
45
  def override_defaults
42
46
  @endpoint ||= ApiSixClient.config.endpoint
43
47
  @auth_token ||= ApiSixClient.config.auth_token
@@ -55,7 +59,15 @@ module ApiSixClient
55
59
  end
56
60
 
57
61
  def request(method, path, params = {}, headers = {})
58
- response = connection.run_request(method, "#{endpoint}/#{service_path}/#{path}", params.to_json, headers)
62
+ deprecation_msg
63
+
64
+ response = nil
65
+ begin
66
+ response = connection.run_request(method, "#{endpoint}/#{service_path}/#{path}", params.to_json, headers)
67
+ rescue Faraday::Error => e
68
+ raise Errors::FaradayError.new("#{e.to_s} by #{self.class.name}##{path}")
69
+ end
70
+
59
71
  res = JSON.parse(response.body)
60
72
 
61
73
  return res.with_indifferent_access if res.is_a?(Hash)
@@ -4,6 +4,9 @@ module ApiSixClient
4
4
  class BaseInt < Base
5
5
  protected
6
6
 
7
+ def deprecation_msg
8
+ end
9
+
7
10
  def override_defaults
8
11
  @endpoint = ApiSixClient.config.endpoint_int
9
12
  @auth_token = ApiSixClient.config.auth_token_int
@@ -4,5 +4,6 @@ module ApiSixClient
4
4
  module Errors
5
5
  class EndpointIsEmpty < StandardError; end
6
6
  class AuthTokenIsEmpty < StandardError; end
7
+ class FaradayError < StandardError; end
7
8
  end
8
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApiSixClient
4
- VERSION = "1.2.7"
4
+ VERSION = "1.2.9"
5
5
  end
@@ -20,7 +20,6 @@ module ApiSixClient
20
20
  class Brg < Base; end
21
21
  class Gbk < Base; end
22
22
  class Mat < Base; end
23
- class Val < Base; end
24
23
  class Prj < Base; end
25
24
  class Fin < Base; end
26
25
  class Olc < Base; end
@@ -32,14 +31,15 @@ module ApiSixClient
32
31
 
33
32
  class OlcInt < BaseInt; end
34
33
  class PrjInt < BaseInt; end
35
-
36
- class AuthInt < BaseV2Int; end
37
- class UasInt < BaseV2Int; end
38
- class NtfInt < BaseV2Int; end
39
- class MatInt < BaseV2Int; end
40
- class FinnInt < BaseV2Int; end
41
- class LyrInt < BaseV2Int; end
42
- class BrgInt < BaseV2Int; end
34
+ class UasInt < BaseInt; end
35
+ class BrgInt < BaseInt; end
36
+ class CadInt < BaseInt; end
37
+ class AuthInt < BaseInt; end
38
+ class NtfInt < BaseInt; end
39
+ class MatInt < BaseInt; end
40
+ class FinnInt < BaseInt; end
41
+ class LyrInt < BaseInt; end
42
+ class Val < BaseInt; end
43
43
  end
44
44
 
45
45
  A6C = ApiSixClient
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_six_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Dobrorodnov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-02 00:00:00.000000000 Z
11
+ date: 2023-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday