barkibu-kb 0.19.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yaml +1 -1
- data/CHANGELOG.md +9 -1
- data/Gemfile.lock +4 -4
- data/lib/kb/client.rb +6 -2
- data/lib/kb/models/base_model.rb +4 -0
- data/lib/kb/models/pet_parent.rb +1 -1
- data/lib/kb/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b723feb1e9ff962d66e087b0652afab384418c3b0d231aa1afd4a571f894dc11
|
4
|
+
data.tar.gz: 4cec0f34fda77670d81369dbaa1b01db62358dd020e5c2f21b97e7468e9569a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b98f52f1d5b9ffff20fe469fb6fbd3365c05baabcb1f1a121b7abfa8e457c9669a7225a0e69498a6e9088ccc1233c0f90b40124267d694a0632ce5d6992d969
|
7
|
+
data.tar.gz: 87cb8b45461565a143c9aac34f048b68166dd4e0176802f11c682266c5fa11b3d466d84dc1bf3e7284272153cf53d1cde2313eea0446c3df2fa68f1116b8fcce
|
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
git config user.name 'Barkibot'
|
16
16
|
git config user.email 'dev+bot@barkibu.com'
|
17
17
|
- name: Release Gem
|
18
|
-
uses:
|
18
|
+
uses: discourse/publish-rubygems-action@v2
|
19
19
|
env:
|
20
20
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
21
21
|
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [unreleased]
|
9
|
+
- See diff: https://github.com/barkibu/kb-ruby/compare/v0.21.0...HEAD
|
10
|
+
|
11
|
+
## [0.21.0]
|
12
|
+
- Add city attribute to PetParent model
|
13
|
+
|
14
|
+
## [0.20.0]
|
15
|
+
- Expose cache clearing API on client/model
|
16
|
+
|
8
17
|
## [0.19.0]
|
9
18
|
- Remove useless double splat argument usage on concern causing problem for ruby version >= 3
|
10
19
|
|
@@ -209,7 +218,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
209
218
|
|
210
219
|
- Init Version: Breeds and limited PetParents/Consultations
|
211
220
|
|
212
|
-
[unreleased]: https://github.com/barkibu/kb-ruby/compare/v0.10.0...HEAD
|
213
221
|
[0.10.0]: https://github.com/barkibu/kb-ruby/compare/v0.9.0...0.10.0
|
214
222
|
[0.9.0]: https://github.com/barkibu/kb-ruby/compare/v0.8.0...0.9.0
|
215
223
|
[0.8.0]: https://github.com/barkibu/kb-ruby/compare/v0.7.2...0.8.0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
barkibu-kb (0.
|
4
|
+
barkibu-kb (0.21.0)
|
5
5
|
activemodel (>= 4.0.2)
|
6
6
|
activerecord
|
7
7
|
activesupport (>= 3.0.0)
|
@@ -10,8 +10,8 @@ PATH
|
|
10
10
|
faraday-http
|
11
11
|
faraday_middleware
|
12
12
|
i18n
|
13
|
-
barkibu-kb-fake (0.
|
14
|
-
barkibu-kb (= 0.
|
13
|
+
barkibu-kb-fake (0.21.0)
|
14
|
+
barkibu-kb (= 0.21.0)
|
15
15
|
countries
|
16
16
|
sinatra
|
17
17
|
webmock
|
@@ -178,4 +178,4 @@ DEPENDENCIES
|
|
178
178
|
webmock
|
179
179
|
|
180
180
|
BUNDLED WITH
|
181
|
-
|
181
|
+
2.4.12
|
data/lib/kb/client.rb
CHANGED
@@ -37,12 +37,12 @@ module KB
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def update(key, attributes)
|
40
|
-
|
40
|
+
clear_cache_for(key)
|
41
41
|
connection.patch(key.to_s, attributes_to_json(attributes)).body
|
42
42
|
end
|
43
43
|
|
44
44
|
def destroy(key)
|
45
|
-
|
45
|
+
clear_cache_for(key)
|
46
46
|
connection.delete(key.to_s).body
|
47
47
|
end
|
48
48
|
|
@@ -50,6 +50,10 @@ module KB
|
|
50
50
|
connection.put('', attributes_to_json(attributes)).body
|
51
51
|
end
|
52
52
|
|
53
|
+
def clear_cache_for(key)
|
54
|
+
KB::Cache.delete("#{@base_url}/#{key}")
|
55
|
+
end
|
56
|
+
|
53
57
|
private
|
54
58
|
|
55
59
|
def headers
|
data/lib/kb/models/base_model.rb
CHANGED
data/lib/kb/models/pet_parent.rb
CHANGED
@@ -42,7 +42,7 @@ module KB
|
|
42
42
|
private_class_method :attributes_from_response
|
43
43
|
|
44
44
|
STRING_FIELDS = %i[key partner_name first_name last_name prefix_phone_number
|
45
|
-
phone_number email country address zip_code nif affiliate_code].freeze
|
45
|
+
phone_number email country address zip_code nif affiliate_code city].freeze
|
46
46
|
DATE_FIELDS = %i[birth_date deleted_at].freeze
|
47
47
|
BOOLEAN_FIELDS = %i[phone_number_verified email_verified].freeze
|
48
48
|
FIELDS = [*STRING_FIELDS, *DATE_FIELDS, *BOOLEAN_FIELDS].freeze
|
data/lib/kb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barkibu-kb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Léo Figea
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -319,7 +319,7 @@ licenses:
|
|
319
319
|
- MIT
|
320
320
|
metadata:
|
321
321
|
homepage_uri: https://app.barkibu.com
|
322
|
-
post_install_message:
|
322
|
+
post_install_message:
|
323
323
|
rdoc_options: []
|
324
324
|
require_paths:
|
325
325
|
- lib
|
@@ -334,8 +334,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
334
|
- !ruby/object:Gem::Version
|
335
335
|
version: '0'
|
336
336
|
requirements: []
|
337
|
-
rubygems_version: 3.1.
|
338
|
-
signing_key:
|
337
|
+
rubygems_version: 3.1.6
|
338
|
+
signing_key:
|
339
339
|
specification_version: 4
|
340
340
|
summary: Barkibu's Knowledge Base API sdk
|
341
341
|
test_files: []
|