tarpon 0.3.0 → 0.3.1

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: fb8e9e1ad34c8febb6eb35177f3978f6053d520ca4c09b03227c8b73b8b3522c
4
- data.tar.gz: 75672ac651fafdc0f64e3e8813fab2a69d78601ea4fc5426873968ea49ff66af
3
+ metadata.gz: 26bbc91ee368037baee3d85fa6271832140444241e8569fb43b053aa9051a56a
4
+ data.tar.gz: b8d8565264058d8c01df8409264560d44f739f2560a0ecdc39539cea99dfd363
5
5
  SHA512:
6
- metadata.gz: 47fa9a6e62859ae6dceea4dc21e50fc0ce076c30d704ecc3403a962fba8ba74ac71a9a69fe55555034471beb495b16dc5d4591d2a479abca6c2e8c23d4d593fb
7
- data.tar.gz: e441f5e22f50cdd35b574e07aca3c40c31464b5a3440fcc476f1b674b35704b77b99f6c2e3f66d15c7a515728f642158bd1173ed9b8347daca6c777201ca4639
6
+ metadata.gz: 06d81dc83b4a9e21b88a8cd6ccb5740229724d0598cc00a0dd167058a2f14ceb9362ca730c6e0d178d79ac7c19b197da18e6c2406895b9b408c2f0a3368bfbee
7
+ data.tar.gz: 210bbeb7e75b62847d3444862a7a64b8cf81d9f3c47145a93fe71f609ebc3581bf37d160a233f64d054f1cbd15a814026492f74bdae787b99ea4a4a90c877fd1
@@ -17,6 +17,10 @@ module Tarpon
17
17
  def expires_date
18
18
  Time.iso8601(@raw[:expires_date])
19
19
  end
20
+
21
+ def purchase_date
22
+ Time.iso8601(@raw[:purchase_date])
23
+ end
20
24
  end
21
25
  end
22
26
  end
data/lib/tarpon/errors.rb CHANGED
@@ -6,4 +6,5 @@ module Tarpon
6
6
  class InvalidCredentialsError < Error; end
7
7
  class ServerError < Error; end
8
8
  class NotFoundError < Error; end
9
+ class TooManyRequests < Error; end
9
10
  end
@@ -56,6 +56,8 @@ module Tarpon
56
56
  raise Tarpon::ServerError, 'RevenueCat failed to fulfill the request'
57
57
  when 404
58
58
  raise Tarpon::NotFoundError
59
+ when 429
60
+ raise Tarpon::TooManyRequests
59
61
  else
60
62
  create_response(http_response)
61
63
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tarpon
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tarpon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Belo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-29 00:00:00.000000000 Z
11
+ date: 2021-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.0.3
157
+ rubygems_version: 3.1.6
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: A Ruby interface to RevenueCat REST API