paraxial 1.4.4 → 1.4.5

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: b3206160ed62f0ae982fa82322d02fb097be5261b245e889dc0e3252f1c60006
4
- data.tar.gz: 2b2ba464bbfc69f37d680fe257cfa705827f222f126aab01eb0f5a49b9022162
3
+ metadata.gz: e50a89bbe7acfcde6a930484e7b5677610c32b362fdd637065dfe83a87cdb63a
4
+ data.tar.gz: 1704c13f2d06ba9acab0e9ebd4ff26a5e0921bd399adb23e1b85ee9116e9e1ec
5
5
  SHA512:
6
- metadata.gz: 873b0f6c3d9347e02bac6aa040ed2343d2fec5ddb04eb1952a9fa9e4e94028dd8f4befa446bddc0dfba488c71a9db9a8d170f0510b6d91b24440168c144026f0
7
- data.tar.gz: c14072cc7a5f02e6e6dfd1c8da1eb36fcc280d5aa5c65352ef12ff645762a93cdc6592ade346924a137233a91cae87fa43e0aac1abbddda49ffeb2ec2cbba002
6
+ metadata.gz: ab969b9f63404b14bfa56ac8460edbaf28d0ecc82a540035538140a45edf1ad19b27dd641c78bad1dff3f8c5d8822ac60f91a8f2d9d164324106a803c5c8271e
7
+ data.tar.gz: 4fb2cb21157c34ec9bda2946dcd4fe05aab39d47a33aeb831e8c09b774f5cce70bfce40d4394c680ac69955d25ad53495095db4d6474ab058d256c1fc5de3db4
@@ -13,6 +13,7 @@ module Paraxial
13
13
  get_abr
14
14
  sleep(10)
15
15
  flush_buffer
16
+ break if Paraxial::FreeTier.is_free_tier
16
17
  end
17
18
  end
18
19
  end
@@ -7,7 +7,7 @@ module Paraxial
7
7
  attr_reader :is_free_tier
8
8
 
9
9
  def initialize
10
- @is_free_tier = true
10
+ @is_free_tier = false
11
11
  check_free_tier_status
12
12
  end
13
13
 
@@ -22,7 +22,17 @@ module Paraxial
22
22
  r = Net::HTTP.post(uri, body.to_json, headers)
23
23
  result = JSON.parse(r.body)
24
24
  # Assume the API response contains a field `free_tier` (true/false)
25
- @is_free_tier = result['free_tier']
25
+ # Response Body: {"error":"api_key not valid"}
26
+ if result['free_tier'] == true
27
+ puts "[Paraxial] Free tier site, some functionality is disabled"
28
+ @is_free_tier = true
29
+ elsif result['free_tier'] == false
30
+ puts "[Paraxial] Account active, all features available"
31
+ @is_free_tier = false
32
+ else
33
+ puts "[Paraxial] Account check failed, some functionality is disabled"
34
+ @is_free_tier = true
35
+ end
26
36
  rescue StandardError => e
27
37
  # Handle any errors (network issues, parsing errors, etc.)
28
38
  puts "Error fetching free tier status: #{e.message}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paraxial
4
- VERSION = '1.4.4'
4
+ VERSION = '1.4.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paraxial
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Lubas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-17 00:00:00.000000000 Z
11
+ date: 2025-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec