wolf_core 1.0.38 → 1.0.40

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: 8d5650824d55efc12a8127874b262a4e7a3d4b0304d6975e7e967f458bcfa5d9
4
- data.tar.gz: 1b29e9db43c0e24a1edf039c67942ab9a782e8ea26659f406fe33ecec6637902
3
+ metadata.gz: 72f385d95554b49bbcd5c0807f43d32ab7923c93ebbac30f53a61ea21ce076d1
4
+ data.tar.gz: 69a246974641da28de1c38d0657514c468c91fb05de4a0d7e0c68f5efab4b1f6
5
5
  SHA512:
6
- metadata.gz: c336ac3176d231e35724164d0975679b7f29405a16b78fe76ef5e8cad8875f6b37f9f02c6a0f093d21682c2b1879393ecfd4b368f35a6c06aff3b798b905a53e
7
- data.tar.gz: a0acdf3e1f333e39a29006cbefb498c16cb1da8834791d148ef98af959c33aa5f5f6aba274600be8d9513f0f8777a2ad7f12877a27fb78a53e5e3ffb8a2404c8
6
+ metadata.gz: 0ae845f5508f3f6bb5d742e5937b62df0682fe9b55f6929f1a9b5d5edf5cb5c526ba102401200625ca72ae4230848105f0311bc803671adaee03815bf45afddb
7
+ data.tar.gz: 915e777cd79e5cc657a93a8649dff67ec457470e9e0f33833c8d69c6747f2261b144fea5654bddda23663b4b25141c1e51af65ca28ac7ae161487b069723cd8c
@@ -26,6 +26,7 @@ module WolfCore
26
26
  'barton/import/reference' => 'BartonImportReference',
27
27
  'barton/export/disclosure' => 'BartonExportDisclosure',
28
28
  'barton/import/disclosure' => 'BartonImportDisclosure',
29
+ 'barton/export/jobseeker_order_applications' => 'BartonExportJobseekerOrderApplications',
29
30
  }
30
31
 
31
32
  def route_event_request(path:, body:)
@@ -17,5 +17,11 @@ module WolfCore
17
17
  body = body&.to_json if headers['Content-Type'] == 'application/json'
18
18
  HTTParty.put(url, headers: headers, query: query, body: body)
19
19
  end
20
+
21
+ def http_patch(url:, headers: {}, query: nil, body: nil)
22
+ headers['Content-Type'] ||= 'application/json'
23
+ body = body&.to_json if headers['Content-Type'] == 'application/json'
24
+ HTTParty.patch(url, headers: headers, query: query, body: body)
25
+ end
20
26
  end
21
27
  end
@@ -96,6 +96,36 @@ module WolfCore
96
96
  WolfCore::HttpDataSource.http_put(url: url, headers: headers, query: query, body: body)
97
97
  end
98
98
 
99
+ def parsed_http_patch(url:, headers: {}, query: nil)
100
+ response = http_patch(url: url, headers: headers, query: query)
101
+ parse_http_response(response)
102
+ end
103
+
104
+ def async_http_patch(**args)
105
+ log_object "starting async_http_patch"
106
+ log_object args, title: "async_http_patch args are"
107
+ run_async do
108
+ response = http_patch(**args)
109
+ log_object parse_http_response(response), title: "async_http_patch response is"
110
+ end
111
+ end
112
+
113
+ def safe_http_patch(url:, headers: {}, query: nil, error_message: nil, title: nil)
114
+ response = http_patch(url: url, headers: headers, query: query)
115
+ response = parse_http_response(response)
116
+
117
+ log_object response, title: title if title.present?
118
+
119
+ error_message ||= "Error on safe_http_patch"
120
+ validate_http_response(response: response, message: error_message)
121
+
122
+ response
123
+ end
124
+
125
+ def http_patch(url:, headers: {}, query: nil)
126
+ WolfCore::HttpDataSource.http_patch(url: url, headers: headers, query: query)
127
+ end
128
+
99
129
  def validate_http_response(response:, message:, error_data: nil)
100
130
  return if response.code == 200
101
131
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.38"
4
+ VERSION = "1.0.40"
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.38
4
+ version: 1.0.40
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-11-21 00:00:00.000000000 Z
11
+ date: 2024-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty