active_mappers 1.4.6 → 1.4.7

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
  SHA256:
3
- metadata.gz: ac980b374337decc27f455542605a5aaf6da146ec1a3b96547e69f9287061b44
4
- data.tar.gz: 1df7c23ac090efebb1498bc6ecc8d9944a282edf03179fae71a88c5204c08102
3
+ metadata.gz: d9c952cdc3025177afc55d21f7967db40c7dad0fee5209701332433978d00c65
4
+ data.tar.gz: dae057bb4874202b6534ca59d7c0e11ca3765863ed27c9ddd1b83e64baa4bb41
5
5
  SHA512:
6
- metadata.gz: 40d83c52a139b9f76e7eda851cc071f4435b3a7c8d35a294e632d45a92471c34753b72c5ac0d5b0e600646ad7cce468a7f56ffbca0b39ab8f410a28fea9c1a8e
7
- data.tar.gz: 6aadec0ca9cf96a877df5e534b1be7870cee3417d2332d23410b8bb0e223af1224b6b85a0b4b5f11c319525c8f643f020e1dd98680acfaf7ad861ce622050947
6
+ metadata.gz: 4fae6b5c455eb0c8eb1798a94dfac64b3bcc8cc82df6761f8669e9f574fdc3efc8e51bcfd862abf9a9293601bf28e8ea2642b55e13ba4a17f4af05efde430085
7
+ data.tar.gz: 339571d128963541e8ba5ee0bde89b688b17b409169e03cecdc0afc3787d9b3fe4203a91ec1de32f32a7b87dde75b3d9d3079965934c8383df27f5aaa3b77a13
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'active_mappers'
3
- s.version = '1.4.6'
4
- s.date = '2020-11-10'
3
+ s.version = '1.4.7'
4
+ s.date = '2020-11-12'
5
5
  s.summary = 'Slick, fast view layer for you Rails API.'
6
6
  s.description = 'Fast, simple, declarative way to design your API\'s view layer'
7
7
  s.authors = ['Michaël Villeneuve']
@@ -49,9 +49,9 @@ module ActiveMappers
49
49
  else
50
50
  relation_class_name = resource.class&.reflect_on_association(options[:optional_path] || key)&.class_name
51
51
  raise "undefined relation : #{key.to_s}" if (mapper.nil? && relation_class_name.nil?)
52
- KeyTransformer.resource_class_to_mapper(relation_class_name, self)
52
+ KeyTransformer.resource_class_to_mapper(relation_class_name.dup, self)
53
53
  end
54
-
54
+
55
55
  raise "'#{mapper_to_use.name}' should be a mapper" unless mapper_to_use.ancestors.map(&:to_s).include?("ActiveMappers::Base")
56
56
 
57
57
  { key => mapper_to_use.with(path.to_s.split('.').inject(resource, :try), default_options.merge(options)) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_mappers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michaël Villeneuve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-10 00:00:00.000000000 Z
11
+ date: 2020-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport