comgate_ruby 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7882560b8946462a01c78940b5c3f9c1e771418b90123e5de3b4f4e3c8dea2e
4
- data.tar.gz: 47271d5e947abd8f189c42f79e248fd0992d56e3a92eb24b624e3f8559ec09fb
3
+ metadata.gz: d020da6b1614a32495b473b497b9931406275e575a5be5012b70c46313a60041
4
+ data.tar.gz: ff070de8de6f549aaf6482c3a00f07cf7d496e683a6829cbdca7a40854ee8049
5
5
  SHA512:
6
- metadata.gz: 72e412a79248be368f95a76c7a8e3214e7156edb8a2336af3150ac1b652e7d95c2e8614ad1c1e4d1f2a3b7d201a7aa915101a6f05fa6fb7f58497f32dd17fd36
7
- data.tar.gz: 8ce0f483ea79eebd5c25cfac010cc0761b5de48cfd1bb5b36155aabf2621bfc9a834e42428f75dcf4bff89554adec82a6289f34a4af8966ce8e86e2afa841239
6
+ metadata.gz: cde1b8d7a8b37148cfa1af8afd799ca9858b565f52a34d265651233ac49a5dd90879ebc2c602097ed654aa1c79ae4cc764b08af0bda7a2047f9a7e3943a6d16d
7
+ data.tar.gz: 56490bc816c7e2a5afa3b9ca30d36d4603ae388853d157d078b43ffe1e42376e627541e4b8e4b95eb9edccb0d00c96e2304486365f1d286dd7dbbbb01fbab973
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## [0.8.2] - 2023-06-20
2
+ - If ENV["COMGATE_MIN_LOG_LEVEL"] is set, calls and responses to Comgate are logged at that level. Otherwise `:debug` is used.
3
+
1
4
  ## [0.8.1] - 2023-06-13
2
5
  - Allowed `proxy_uri` param for Comgate::Gateway
3
6
 
data/README.md CHANGED
@@ -148,7 +148,9 @@ Maximal mixed version looks like:
148
148
  expiration_time: "10h", # input ( use "m" or "h" or "d", but only one of them; allowed rage "30m".."7d")
149
149
  description: "Some description",
150
150
  reccurrence: { init_transaction_id: "12AD-dfsA-4568",
151
- period: 1 } },
151
+ period: 1,
152
+ cycle: :month, # :on_demand
153
+ valid_to: } },
152
154
  },
153
155
  payer: {
154
156
  email: "payer1@gmail.com", # input/output
@@ -189,6 +191,8 @@ This may be refactored in future.
189
191
  ## One more thing
190
192
  This gem extends `Hash` with methods `deep_symbolize_keys` and `deep_merge` (if needed).
191
193
 
194
+ Every request to Comgate is logged/printout at `:debug` level. You can change the minimal level with ENV variable "COMGATE_MIN_LOG_LEVEL".
195
+
192
196
  ## Development
193
197
 
194
198
  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.
@@ -167,11 +167,13 @@ module Comgate
167
167
  else
168
168
  puts("#{Time.now} [#{forced_log_level(level)}] #{message}")
169
169
  end
170
+ rescue StandardError => e
171
+ puts("#{Time.now} [#{forced_log_level(level)}] #{message} - #{e}")
170
172
  end
171
173
 
172
174
  def forced_log_level(original_level)
173
175
  levels = { debug: 0, info: 1, error: 2 }
174
- minimal_level = :error
176
+ minimal_level = ENV["COMGATE_MIN_LOG_LEVEL"]&.to_sym || :debug
175
177
  levels[original_level] > levels[minimal_level] ? original_level : minimal_level
176
178
  end
177
179
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Comgate
4
- VERSION = "0.8.1"
4
+ VERSION = "0.8.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comgate_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Mlčoch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-13 00:00:00.000000000 Z
11
+ date: 2023-06-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Write a longer description or delete this line.
14
14
  email: