rom-mapper 1.0.2 → 1.1.0

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: 6caa4a1e68f6319fe78447667f5ac101afb45856
4
- data.tar.gz: 6a4690c2aca907e101a78d170244dbb457a714c1
3
+ metadata.gz: 5eb225274818fe1f0c8b28f4ee6b4637425b2737
4
+ data.tar.gz: f3998ff9d212dc4be99f92bd391d37d5b0f8d37b
5
5
  SHA512:
6
- metadata.gz: eb21053ac9000e51fbe7c6d3a5caf077b6fd90f792fbca0cf1b45b6b514f816c29f17675caf0a3dedbaeb539325ba6cdc58ed9c9c002913d61b363d20f9f620a
7
- data.tar.gz: 9c08645178ee72d423c4d068f358a041be1edaed2757f03477776906daeaa7712c74bec4af159d5cec5bf02edd1fdb81c53025cf3e5ac9b1c5cdb3167c334154
6
+ metadata.gz: d22010132f1513a500a37f6e3129e1b4f4d8af3f6f60a4c5e450b8cdb2568587648c66266e1478581d25d58fc3dd73a2c00cfa0fe5fa3e7f901b8ecda4a14dff
7
+ data.tar.gz: 88861915365bca292927e001358735a4d805987c215fd86f3293b7d6c058662d8f9594d49d34c0da0be13539a5eebdf70e7c457b39ddf898abcca1a6f263a2bb
@@ -1,3 +1,13 @@
1
+ # 1.1.0 2017-11-17
2
+
3
+ ### Fixed
4
+
5
+ * Aliased attributes are handled correctly by mapper compiler (solnic)
6
+
7
+ ### Changed
8
+
9
+ * Mapper compiler no longer handles wrapped attributes in an SQL-specific way (solnic)
10
+
1
11
  # 1.0.2 2017-11-02
2
12
 
3
13
  ### Fixed
data/README.md CHANGED
@@ -11,7 +11,7 @@ backends. It is the default mapper in ROM.
11
11
 
12
12
  Resources:
13
13
 
14
- - [API documentation](http://rubydoc.info/gems/rom-mapper)
14
+ * [API documentation](http://api.rom-rb.org/rom/)
15
15
 
16
16
  ## License
17
17
 
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  class Mapper
3
- VERSION = '1.0.2'.freeze
3
+ VERSION = '1.1.0'.freeze
4
4
  end
5
5
  end
@@ -61,8 +61,8 @@ module ROM
61
61
  def visit_attribute(node)
62
62
  name, _, meta = node
63
63
 
64
- if meta[:wrapped]
65
- [name, from: meta[:alias]]
64
+ if meta[:alias]
65
+ [meta[:alias], from: name]
66
66
  else
67
67
  [name]
68
68
  end
@@ -1,4 +1,4 @@
1
- require 'dry/core/inflector'
1
+ require 'rom/support/inflector'
2
2
 
3
3
  module ROM
4
4
  # Model builders can be used to build model classes for mappers
@@ -54,7 +54,7 @@ module ROM
54
54
 
55
55
  @namespace =
56
56
  if parts.any?
57
- Dry::Core::Inflector.constantize(parts.join('::'))
57
+ Inflector.constantize(parts.join('::'))
58
58
  else
59
59
  Object
60
60
  end
@@ -1,4 +1,4 @@
1
- require 'dry/core/inflector'
1
+ require 'rom/support/inflector'
2
2
  require 'dry/core/class_builder'
3
3
  require 'dry/types/compiler'
4
4
 
@@ -104,7 +104,7 @@ module ROM
104
104
 
105
105
  # @api private
106
106
  def class_name(name)
107
- Dry::Core::Inflector.classify(Dry::Core::Inflector.singularize(name))
107
+ Inflector.classify(Inflector.singularize(name))
108
108
  end
109
109
  end
110
110
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rom-mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-02 00:00:00.000000000 Z
11
+ date: 2017-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-equalizer