attributor 5.2.0 → 5.2.1

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
  SHA1:
3
- metadata.gz: f5472909b262b07126ca30d760aadb3f5bc0d362
4
- data.tar.gz: 9e66f91088af8389b60d088dd4d7599acfd74d9a
3
+ metadata.gz: f21ff68c8d3b97d5bd413de360b51354d76f0d8a
4
+ data.tar.gz: 16456c473b8c88245f4b3fcbaf680f33a19c5101
5
5
  SHA512:
6
- metadata.gz: a7c963afb8460167b7714ae4dd4ae74f273ef703b11059e354f33f2356adfba3e9433dad3bc4497612beacfcaf67c727249a6e0143b5e45a0219b95e9c61ace0
7
- data.tar.gz: ef1e2720295ee7456b08cd2c003e044f686958cb4e6ef3738f617d042c1ed2da0f1180e1cc5e11d0b97e0b74046eeead54f4a5b8f6bd843d4e092ab6662baa2b
6
+ metadata.gz: 815f1587432ebd0b83b91e30492e6e0abcce14e2fb11a805e0db1eefda29fc1f83b436b520b0b5d21c394f50c37b49a119e0da23a7221f9bf2f42ad68e203584
7
+ data.tar.gz: fa09b6421c691f5dfff2795e8c568e59a2238597e5e0d35ea3295aba58564af838f9c4789a0621382eb81875c7deff0b96462e0638a2589990d55d66e0bcbf27
data/.travis.yml CHANGED
@@ -5,7 +5,6 @@ rvm:
5
5
  - 2.3.1
6
6
  script:
7
7
  - bundle exec rspec spec
8
- - bundle exec rubocop --format=clang
9
8
  branches:
10
9
  only:
11
10
  - master
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## next
4
4
 
5
+ ## 5.2.1 (25/082019)
6
+
7
+ * Propertly pass options down when dumping an Model
8
+
5
9
  ## 5.2 (12/09/2017)
6
10
 
7
11
  * Fixed describing `Hash` with no keys defined, to still use a given example (no example outputted before this)
@@ -192,7 +192,7 @@ module Attributor
192
192
  next
193
193
  end
194
194
 
195
- hash[name.to_sym] = attribute.dump(value, context: context + [name])
195
+ hash[name.to_sym] = attribute.dump(value, context: context + [name], **_opts)
196
196
  end
197
197
  ensure
198
198
  @dumping = false
@@ -1,3 +1,3 @@
1
1
  module Attributor
2
- VERSION = '5.2.0'.freeze
2
+ VERSION = '5.2.1'.freeze
3
3
  end
@@ -413,6 +413,17 @@ describe Attributor::Model do
413
413
  expect(person.address.person).to be(person)
414
414
  expect(output[:address][:person]).to eq(Attributor::Model::CIRCULAR_REFERENCE_MARKER)
415
415
  end
416
+
417
+ it 'passes kwargs' do
418
+ person.class.attributes.values.each do |attr|
419
+ expect(attr).to receive(:dump).with(
420
+ anything,
421
+ context: anything,
422
+ custom_arg: :custom_value
423
+ )
424
+ end
425
+ person.dump(custom_arg: :custom_value)
426
+ end
416
427
  end
417
428
  end
418
429
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attributor
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep M. Blanquer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-12-09 00:00:00.000000000 Z
12
+ date: 2019-08-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hashie
@@ -421,7 +421,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
421
421
  version: '0'
422
422
  requirements: []
423
423
  rubyforge_project:
424
- rubygems_version: 2.6.12
424
+ rubygems_version: 2.6.14
425
425
  signing_key:
426
426
  specification_version: 4
427
427
  summary: A powerful attribute and type management library for Ruby