rom-relation 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Changelog.md
ADDED
data/lib/rom-relation.rb
CHANGED
data/lib/rom/relation.rb
CHANGED
data/lib/rom/version.rb
CHANGED
data/rom-relation.gemspec
CHANGED
@@ -22,5 +22,5 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.add_dependency 'abstract_type', '~> 0.0.6'
|
23
23
|
gem.add_dependency 'adamantium', '~> 0.1'
|
24
24
|
gem.add_dependency 'axiom', '~> 0.1.1'
|
25
|
-
gem.add_dependency 'axiom-optimizer', '~> 0.1.
|
25
|
+
gem.add_dependency 'axiom-optimizer', '~> 0.1.1'
|
26
26
|
end
|
@@ -46,10 +46,10 @@ describe Mapping, '.build' do
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
context 'when custom mapper is
|
49
|
+
context 'when custom mapper is injected' do
|
50
50
|
subject { env }
|
51
51
|
|
52
|
-
|
52
|
+
let(:test_mapper) { TestMapper.new(header, model) }
|
53
53
|
|
54
54
|
before do
|
55
55
|
custom_mapper = test_mapper
|
@@ -57,11 +57,7 @@ describe Mapping, '.build' do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
it 'sets the custom mapper' do
|
60
|
-
stub(test_mapper).call(relation) { relation }
|
61
|
-
|
62
60
|
expect(subject[:users].mapper).to be(test_mapper)
|
63
|
-
|
64
|
-
expect(test_mapper).to have_received.call(relation)
|
65
61
|
end
|
66
62
|
end
|
67
63
|
|
@@ -5,15 +5,16 @@ require 'spec_helper'
|
|
5
5
|
describe Relation, '.build' do
|
6
6
|
subject { described_class.build(relation, mapper) }
|
7
7
|
|
8
|
-
fake(:relation)
|
9
|
-
fake(:
|
10
|
-
|
11
|
-
|
8
|
+
fake(:relation) { Axiom::Relation }
|
9
|
+
fake(:mapped) { Axiom::Relation }
|
10
|
+
fake(:optimized) { Axiom::Relation }
|
11
|
+
fake(:mapper) { Mapper }
|
12
12
|
|
13
13
|
before do
|
14
|
-
stub(mapper).call(relation) {
|
14
|
+
stub(mapper).call(relation) { mapped }
|
15
|
+
stub(mapped).optimize { optimized }
|
15
16
|
end
|
16
17
|
|
17
|
-
its(:relation) { should be(
|
18
|
+
its(:relation) { should be(optimized) }
|
18
19
|
its(:mapper) { should be(mapper) }
|
19
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-relation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
requirements:
|
137
137
|
- - ~>
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 0.1.
|
139
|
+
version: 0.1.1
|
140
140
|
type: :runtime
|
141
141
|
prerelease: false
|
142
142
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -144,7 +144,7 @@ dependencies:
|
|
144
144
|
requirements:
|
145
145
|
- - ~>
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
version: 0.1.
|
147
|
+
version: 0.1.1
|
148
148
|
description: Relation schema with mapping for ROM
|
149
149
|
email: piotr.solnica@gmail.com
|
150
150
|
executables: []
|
@@ -157,6 +157,7 @@ files:
|
|
157
157
|
- .ruby-version
|
158
158
|
- .travis.yml
|
159
159
|
- .yardopts
|
160
|
+
- Changelog.md
|
160
161
|
- Gemfile
|
161
162
|
- Gemfile.devtools
|
162
163
|
- Guardfile
|