wolf_core 1.0.6 → 1.0.8

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: 0c7897679b1a29f38652e90e2023e12a0959759bbff7142d2a9e8da65c16715f
4
- data.tar.gz: 46753cc5d2f6896bd44a0e435ebb172d378f221cf0bdd60808356d9ef3f45391
3
+ metadata.gz: dd280a5a5d9495d83774c3f8b0b42ab48875c8a8dd854acf43acb923435d03c2
4
+ data.tar.gz: 89bafdc7352bbd1267c86215dde996e2915953100dfb10f890bc8d902b0f618a
5
5
  SHA512:
6
- metadata.gz: 01043ab0fb6d14d87613bf8f85dd79aa7c33320790aaab8205d80418088893e7996bb1c687cea965d3580c979f1139bcb783cfcbf68aafca7c3738a28d4066d5
7
- data.tar.gz: 1000de72032d73ba9f9032d1db2a23a1e8a8745398540e53236ea1d10402d5a9f0ce39a6cce2008054684fce0e845e291a3a575072b2dd04fc7608244b1275ff
6
+ metadata.gz: 72fd7482aa549de335f735bfe45acaf5fde74614ac723cd781b24ff86f9965dc7fe66d35061bbeef9d1dc556951c300f40cd10473177c57bce02b318cec9533c
7
+ data.tar.gz: 051ed5a7340309cc4908573cee67f3e17f8011da0a5391e9e42fe9ecfe4c42debf2d3b3fba2dea9d115f947be510e85a1ac16779abdb589c3c4286597f9d43be
@@ -153,7 +153,7 @@ module WolfCore
153
153
  end
154
154
 
155
155
  def map_display_pay_rate_unit(value)
156
- DISPLAY_PAY_RATE_UNIT_MAP[value] || value
156
+ DISPLAY_PAY_RATE_UNIT_MAP[value&.downcase] || value
157
157
  end
158
158
 
159
159
  def revert_map_display_pay_rate_unit(value)
@@ -46,7 +46,9 @@ module WolfCore
46
46
  end
47
47
 
48
48
  def encode_file_to_base64_from_url(url)
49
- bytes = bytes_from_url(url)
49
+ response = download_file_from_url(url)
50
+ bytes = response.body
51
+
50
52
  encoded_file = Base64.strict_encode64(bytes)
51
53
 
52
54
  content_disposition = response['content-disposition']
@@ -68,10 +70,14 @@ module WolfCore
68
70
  end
69
71
 
70
72
  def bytes_from_url(url)
73
+ download_file_from_url(url).body
74
+ end
75
+
76
+ def download_file_from_url(url)
71
77
  uri = URI.parse(url)
72
78
  response = Net::HTTP.get_response(uri)
73
79
  raise_service_error({ message: 'Failed to download file', url: url }) unless response.is_a?(Net::HTTPSuccess)
74
- response.body
80
+ response
75
81
  end
76
82
  end
77
83
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.6"
4
+ VERSION = "1.0.8"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-22 00:00:00.000000000 Z
11
+ date: 2024-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty