Skip to content

Commit bae9d1f

Browse files
authored
Merge pull request #370 from dpep/bigdecimal-2
bigdecimal 2 support
2 parents 7a069e2 + 58584c0 commit bae9d1f

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ rvm:
55
- 2.4.1
66
- 2.5.1
77
- 2.6.0
8+
- 2.7.1
89
env:
910
global:
1011
- CODECLIMATE_REPO_TOKEN=396d4263adb6febf1e6e9b0c0e176fbde35e1a116a3c1ecf8dd4f9384e41979b
@@ -47,6 +48,14 @@ matrix:
4748
gemfile: gemfiles/4.1.gemfile
4849
- rvm: 2.6.0
4950
gemfile: gemfiles/4.2.gemfile
51+
- rvm: 2.7.1
52+
gemfile: gemfiles/3.2.gemfile
53+
- rvm: 2.7.1
54+
gemfile: gemfiles/4.0.gemfile
55+
- rvm: 2.7.1
56+
gemfile: gemfiles/4.1.gemfile
57+
- rvm: 2.7.1
58+
gemfile: gemfiles/4.2.gemfile
5059
# We need to install latest version of bundler, because one in travis
5160
# image is too old to recognize platform => :mri_22 in Gemfile.
5261
before_install:

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
## 1.17.1
6+
- [#370](https://github.com/JsonApiClient/json_api_client/pull/370) - bigdecimal 2 support
7+
58
## 1.17.0
69

710
- [#364](https://github.com/JsonApiClient/json_api_client/pull/364) - Relax faraday and faraday middleware versions

lib/json_api_client/schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def self.cast(value, _)
2929

3030
class Decimal
3131
def self.cast(value, _)
32-
BigDecimal.new(value)
32+
BigDecimal(value)
3333
end
3434
end
3535

lib/json_api_client/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module JsonApiClient
2-
VERSION = "1.17.0"
2+
VERSION = "1.17.1"
33
end

test/unit/coercion_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ def validate_coercion_targets(target)
8888
assert_equal target.integer_me, 2
8989
assert_equal target.string_me, '1.0'
9090
assert_equal target.time_me, Time.parse(TIME_STRING)
91-
assert_equal target.decimal_me, BigDecimal.new('1.5')
91+
assert_equal target.decimal_me, BigDecimal('1.5')
9292
end
9393
end

0 commit comments

Comments
 (0)