barkibu-kb 0.17.0 → 0.18.0
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +22 -26
- data/lib/kb/models/base_model.rb +10 -0
- data/lib/kb/models/pet_contract.rb +3 -3
- data/lib/kb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ee4b2ec349cc4d1291d0e8ec58b55040ef144eb3f4524bfe9b7c3fe118225d9
|
4
|
+
data.tar.gz: 70983b7aaf88044333e7b42ab691519f97db4d42f8aa4feeb7bfd729a07e143f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b02676cc615a82d5a24e7dd447613d046f6f68a24ba76885797685adb88f4e6e19b1731218a657255c6d1ec37e41a435bd2e753e4f9144b06872b0c6ccde21e
|
7
|
+
data.tar.gz: 536d9e36b1ed11df391ea22c851d3effcd90fe5edc4950847ec524cda9f726d7777fa1a7de732f787620e4ba7f7f15fe7ee46657a444e8ae60283784f47df47b
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@ 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
|
+
## [0.18.0]
|
9
|
+
|
10
|
+
- add support for `payment_interval_months` attribute on `PetContract`
|
11
|
+
- add active-record like comparison for models
|
12
|
+
|
8
13
|
## [0.17.0]
|
9
14
|
|
10
15
|
- add `KB::Referral` model to create a referral on a PetParent
|
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.18.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.18.0)
|
14
|
+
barkibu-kb (= 0.18.0)
|
15
15
|
countries
|
16
16
|
sinatra
|
17
17
|
webmock
|
@@ -19,12 +19,12 @@ PATH
|
|
19
19
|
GEM
|
20
20
|
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
activemodel (7.0.3)
|
23
|
-
activesupport (= 7.0.3)
|
24
|
-
activerecord (7.0.3)
|
25
|
-
activemodel (= 7.0.3)
|
26
|
-
activesupport (= 7.0.3)
|
27
|
-
activesupport (7.0.3)
|
22
|
+
activemodel (7.0.3.1)
|
23
|
+
activesupport (= 7.0.3.1)
|
24
|
+
activerecord (7.0.3.1)
|
25
|
+
activemodel (= 7.0.3.1)
|
26
|
+
activesupport (= 7.0.3.1)
|
27
|
+
activesupport (7.0.3.1)
|
28
28
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
29
29
|
i18n (>= 1.6, < 2)
|
30
30
|
minitest (>= 5.1)
|
@@ -34,8 +34,7 @@ GEM
|
|
34
34
|
ast (2.4.2)
|
35
35
|
byebug (11.1.3)
|
36
36
|
concurrent-ruby (1.1.10)
|
37
|
-
countries (5.
|
38
|
-
i18n_data (~> 0.16.0)
|
37
|
+
countries (5.1.2)
|
39
38
|
sixarm_ruby_unaccent (~> 1.1)
|
40
39
|
crack (0.4.5)
|
41
40
|
rexml
|
@@ -46,9 +45,9 @@ GEM
|
|
46
45
|
dry-configurable (0.15.0)
|
47
46
|
concurrent-ruby (~> 1.0)
|
48
47
|
dry-core (~> 0.6)
|
49
|
-
dry-core (0.
|
48
|
+
dry-core (0.8.1)
|
50
49
|
concurrent-ruby (~> 1.0)
|
51
|
-
faraday (1.10.
|
50
|
+
faraday (1.10.2)
|
52
51
|
faraday-em_http (~> 1.0)
|
53
52
|
faraday-em_synchrony (~> 1.0)
|
54
53
|
faraday-excon (~> 1.1)
|
@@ -89,23 +88,21 @@ GEM
|
|
89
88
|
http-cookie (1.0.5)
|
90
89
|
domain_name (~> 0.5)
|
91
90
|
http-form_data (2.3.0)
|
92
|
-
i18n (1.
|
91
|
+
i18n (1.12.0)
|
93
92
|
concurrent-ruby (~> 1.0)
|
94
|
-
i18n_data (0.16.0)
|
95
|
-
simple_po_parser (~> 1.1)
|
96
93
|
llhttp-ffi (0.4.0)
|
97
94
|
ffi-compiler (~> 1.0)
|
98
95
|
rake (~> 13.0)
|
99
|
-
minitest (5.16.
|
96
|
+
minitest (5.16.3)
|
100
97
|
multipart-post (2.2.3)
|
101
|
-
mustermann (
|
98
|
+
mustermann (2.0.2)
|
102
99
|
ruby2_keywords (~> 0.0.1)
|
103
100
|
parallel (1.21.0)
|
104
101
|
parser (3.0.2.0)
|
105
102
|
ast (~> 2.4.1)
|
106
103
|
public_suffix (4.0.7)
|
107
|
-
rack (2.2.
|
108
|
-
rack-protection (2.2.
|
104
|
+
rack (2.2.4)
|
105
|
+
rack-protection (2.2.2)
|
109
106
|
rack
|
110
107
|
rainbow (3.0.0)
|
111
108
|
rake (13.0.6)
|
@@ -139,21 +136,20 @@ GEM
|
|
139
136
|
rubocop (~> 1.19)
|
140
137
|
ruby-progressbar (1.11.0)
|
141
138
|
ruby2_keywords (0.0.5)
|
142
|
-
simple_po_parser (1.1.6)
|
143
139
|
simplecov (0.21.2)
|
144
140
|
docile (~> 1.1)
|
145
141
|
simplecov-html (~> 0.11)
|
146
142
|
simplecov_json_formatter (~> 0.1)
|
147
143
|
simplecov-html (0.12.3)
|
148
144
|
simplecov_json_formatter (0.1.3)
|
149
|
-
sinatra (2.2.
|
150
|
-
mustermann (~>
|
145
|
+
sinatra (2.2.2)
|
146
|
+
mustermann (~> 2.0)
|
151
147
|
rack (~> 2.2)
|
152
|
-
rack-protection (= 2.2.
|
148
|
+
rack-protection (= 2.2.2)
|
153
149
|
tilt (~> 2.0)
|
154
150
|
sixarm_ruby_unaccent (1.2.0)
|
155
|
-
tilt (2.0.
|
156
|
-
tzinfo (2.0.
|
151
|
+
tilt (2.0.11)
|
152
|
+
tzinfo (2.0.5)
|
157
153
|
concurrent-ruby (~> 1.0)
|
158
154
|
unf (0.1.4)
|
159
155
|
unf_ext
|
data/lib/kb/models/base_model.rb
CHANGED
@@ -26,6 +26,16 @@ module KB
|
|
26
26
|
@persisted = true
|
27
27
|
end
|
28
28
|
|
29
|
+
# Copy-paste of ActiveRecord equality logic
|
30
|
+
# https://github.com/rails/rails/blob/main/activerecord/lib/active_record/core.rb
|
31
|
+
def ==(other)
|
32
|
+
super ||
|
33
|
+
(other.instance_of?(self.class) &&
|
34
|
+
!key.nil? &&
|
35
|
+
other.key == key)
|
36
|
+
end
|
37
|
+
alias eql? ==
|
38
|
+
|
29
39
|
def self.define_attribute_methods(*fields)
|
30
40
|
super
|
31
41
|
fields.each do |field|
|
@@ -23,11 +23,11 @@ module KB
|
|
23
23
|
conversion_utm_source conversion_utm_term
|
24
24
|
conversion_utm_adgroup_id conversion_utm_campaign_id].freeze
|
25
25
|
DATE_FIELDS = %i[policy_start_date policy_expiration_date].freeze
|
26
|
-
INTEGER_FIELDS = %i[
|
26
|
+
INTEGER_FIELDS = %i[
|
27
|
+
price_yearly price_monthly price_discount_yearly payment_interval_months
|
28
|
+
].freeze
|
27
29
|
FIELDS = [*STRING_FIELDS, *DATE_FIELDS, *INTEGER_FIELDS].freeze
|
28
30
|
|
29
|
-
IMMUTABLE_FIELDS = (FIELDS - %i[status contract_document policy_expiration_date]).freeze
|
30
|
-
|
31
31
|
define_attribute_methods(*FIELDS)
|
32
32
|
|
33
33
|
STRING_FIELDS.each do |field|
|
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.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Léo Figea
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|