my_data 0.12.5 → 0.12.6

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: e41ed3c1d612f7f3b759a09e85af28a907de3ba053338cb02390320682773666
4
- data.tar.gz: 94af4536d7891239ec4b6feaf8ee2048eda060f2c2998ed418a3f335c8dde65f
3
+ metadata.gz: e49c225820f9e3df339434b1b8e5343a18d74f6935ef483eb7bfe2ed95afc8ee
4
+ data.tar.gz: 21ab60c70820b5fb84d0ece4dacde561c61dbc76e00112ad9d8fc56b1075d3d5
5
5
  SHA512:
6
- metadata.gz: '067118ee40110cffd52c5c3c24522613f420039dee8c73745d54f4fae68b75e26237473e94be38f28a6c6d6a935345c1d424a16b02f22faa8e14a64bd3fd696b'
7
- data.tar.gz: 684252d5b8c5401a3d79b1abd81adf8d87fee760f35cdc2f6108d332a3847de3852374e1879a7095f8345fc61d0293da0f541ec39a89a48e51cee08c4834a003
6
+ metadata.gz: 1eb2ad6ef5a701cc805416a2891bc19d7802f9d1bccc04800687a8ba336e582b1654244aca86d5f299a9a265c584420cf3bdabecfed54fba0869e23a4c173376
7
+ data.tar.gz: 76882d790f38c4bcc7a2b6cbccc80fddb4c6bbd13a12b3fcb186ba04fc9092b361df97069d4947a3465eaf3d489d0fe84052d487f02d6aa22ea2cf7384f593af
@@ -10,7 +10,7 @@ module MyData
10
10
  def initialize(user_id:, subscription_key:, environment:)
11
11
  @user_id = user_id
12
12
  @subscription_key = subscription_key
13
- @environment = environment
13
+ @environment = environment.to_sym
14
14
  end
15
15
 
16
16
  def send_invoices(doc:)
@@ -55,6 +55,14 @@ module MyData
55
55
 
56
56
  private
57
57
 
58
+ def production?
59
+ @environment == :production
60
+ end
61
+
62
+ def sandbox?
63
+ @environment == :sandbox
64
+ end
65
+
58
66
  def base_request_docs(endpoint:, mark:, next_partition_key:, next_row_key:)
59
67
  params = { mark: mark }
60
68
 
@@ -72,8 +80,7 @@ module MyData
72
80
  end
73
81
 
74
82
  def connection
75
- verify = @environment == 'production'
76
- @connection ||= Faraday.new(BASE_URL[@environment], ssl: { verify: verify }) do |conn|
83
+ @connection ||= Faraday.new(BASE_URL[@environment], ssl: { verify: production? }) do |conn|
77
84
  conn.headers = headers
78
85
  end
79
86
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MyData
4
- VERSION = "0.12.5"
4
+ VERSION = "0.12.6"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.5
4
+ version: 0.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michalis Zamparas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-12 00:00:00.000000000 Z
11
+ date: 2023-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel