rom-mapper 1.0.1 → 1.0.2

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: 5edeeae7ea863cc980a169ade44c9fae877a460c
4
- data.tar.gz: 8abb8101a8208f952c697e6e9709640d88b4fb8e
3
+ metadata.gz: 6caa4a1e68f6319fe78447667f5ac101afb45856
4
+ data.tar.gz: 6a4690c2aca907e101a78d170244dbb457a714c1
5
5
  SHA512:
6
- metadata.gz: 0dc48c676e67eb105893f25a81be3a62b64e3ceb4e76725e8a0c532ea5791f1e5778cdfb9c60263a315aa74eb080a85b318131432c15d60467efec834162528a
7
- data.tar.gz: 2c4c442538ea5af534a035a99c1be8ad4e8f0fd7941a1b80d99b54df121d735a10b06b262358ae4c0c8d87f1ec0d3fbe1bada924c0bd1200aa05e69f2ea2994a
6
+ metadata.gz: eb21053ac9000e51fbe7c6d3a5caf077b6fd90f792fbca0cf1b45b6b514f816c29f17675caf0a3dedbaeb539325ba6cdc58ed9c9c002913d61b363d20f9f620a
7
+ data.tar.gz: 9c08645178ee72d423c4d068f358a041be1edaed2757f03477776906daeaa7712c74bec4af159d5cec5bf02edd1fdb81c53025cf3e5ac9b1c5cdb3167c334154
@@ -1,3 +1,9 @@
1
+ # 1.0.2 2017-11-02
2
+
3
+ ### Fixed
4
+
5
+ * Missing dependency on `dry-struct` was added (solnic)
6
+
1
7
  # 1.0.1 2017-10-22
2
8
 
3
9
  ### Added
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  class Mapper
3
- VERSION = '1.0.1'.freeze
3
+ VERSION = '1.0.2'.freeze
4
4
  end
5
5
  end
@@ -70,7 +70,16 @@ module ROM
70
70
  #
71
71
  # @api public
72
72
  class Struct < Dry::Struct
73
- MissingAttribute = Class.new(NameError)
73
+ MissingAttribute = Class.new(NameError) do
74
+ def initialize(&block)
75
+ super
76
+ @message_proc = block
77
+ end
78
+
79
+ def message
80
+ @message_proc.call
81
+ end
82
+ end
74
83
 
75
84
  # Returns a short string representation
76
85
  #
@@ -90,16 +99,9 @@ module ROM
90
99
  __send__(name)
91
100
  end
92
101
 
93
- if RUBY_VERSION < '2.3'
94
- # @api private
95
- def respond_to?(*)
96
- super
97
- end
98
- else
99
- # @api private
100
- def respond_to_missing?(*)
101
- super
102
- end
102
+ # @api private
103
+ def respond_to_missing?(*)
104
+ super
103
105
  end
104
106
 
105
107
  private
@@ -107,7 +109,7 @@ module ROM
107
109
  def method_missing(*)
108
110
  super
109
111
  rescue NameError => error
110
- raise MissingAttribute.new("#{ error.message } (not loaded attribute?)")
112
+ raise MissingAttribute.new { "#{ error.message } (attribute not loaded?)" }
111
113
  end
112
114
  end
113
115
  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.1
4
+ version: 1.0.2
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-10-22 00:00:00.000000000 Z
11
+ date: 2017-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-equalizer
@@ -44,6 +44,20 @@ dependencies:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 0.3.1
47
+ - !ruby/object:Gem::Dependency
48
+ name: dry-struct
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.3'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '0.3'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: transproc
49
63
  requirement: !ruby/object:Gem::Requirement