fortnox-api 0.8.1 → 0.8.2
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 +7 -0
- data/lib/fortnox/api/types/model.rb +1 -0
- data/lib/fortnox/api/version.rb +1 -1
- data/spec/fortnox/api/types/model_spec.rb +20 -0
- 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: 345228c827e624083ca2557504b5c426f3e4719a9252e35bb31d87e44fe9f7f7
|
4
|
+
data.tar.gz: 3b9fc903f0f5dc8b7e98ae5610af503dd09c6cc218af6c7339e197de23c39e08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f74bbe0e82253b3addac22a96fc2cde1892ff8b2d0a48bab032b3b7306bb6e215646b2e365622f9671eeecc90167531b7fa9dc92227b83e4dfd6aaefe04f202
|
7
|
+
data.tar.gz: 0f1f3b7a1702950973bdd23d4bda90fdfb03ac2532031067f15f84d4abf6d2f629a7bda54cc2a405e868629627785a722c4f32dd5d719f3f6f36d5593cbc39da
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to
|
7
7
|
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
8
8
|
|
9
|
+
## [0.8.2]
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
- Restored undocumented support for string keys in model attributes,
|
13
|
+
which was inadvertently removed in `v0.8.1`.
|
14
|
+
|
9
15
|
## [0.8.1]
|
10
16
|
|
11
17
|
### Fixed
|
@@ -74,6 +80,7 @@ and this project adheres to
|
|
74
80
|
|
75
81
|
- Model attribute `url` is no longer null
|
76
82
|
|
83
|
+
[0.8.2]: https://github.com/accodeing/fortnox-api/compare/v0.8.1...v0.8.2
|
77
84
|
[0.8.1]: https://github.com/accodeing/fortnox-api/compare/v0.8.0...v0.8.1
|
78
85
|
[0.8.0]: https://github.com/accodeing/fortnox-api/compare/v0.7.2...v0.8.0
|
79
86
|
[0.7.2]: https://github.com/accodeing/fortnox-api/compare/v0.7.1...v0.7.2
|
data/lib/fortnox/api/version.rb
CHANGED
@@ -50,4 +50,24 @@ RSpec.describe Fortnox::API::Types::Model do
|
|
50
50
|
it { is_expected.to be nil }
|
51
51
|
end
|
52
52
|
end
|
53
|
+
|
54
|
+
context 'with required keys' do
|
55
|
+
before do
|
56
|
+
stub_const('Types::Age', Dry::Types['strict.integer'].constrained(gt: 18).is(:required))
|
57
|
+
|
58
|
+
test_class = Class.new(Fortnox::API::Types::Model) do
|
59
|
+
attribute :age, Types::Age
|
60
|
+
end
|
61
|
+
|
62
|
+
stub_const('Model', test_class)
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'does not raise error' do
|
66
|
+
expect { Model.new(age: 20) }.not_to raise_error
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'supports string keys' do
|
70
|
+
expect { Model.new('age' => 20) }.not_to raise_error
|
71
|
+
end
|
72
|
+
end
|
53
73
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fortnox-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Schubert Erlandsson
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-01-
|
14
|
+
date: 2024-01-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: countries
|