rom 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/rom/command_registry.rb +7 -0
- data/lib/rom/header/attribute.rb +1 -1
- data/lib/rom/processor/transproc.rb +5 -5
- data/lib/rom/version.rb +1 -1
- data/rom.gemspec +1 -1
- data/spec/unit/rom/command_registry_spec.rb +4 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c8c7b27e645de962baf5ff8f13ec9d7bc49f99b
|
4
|
+
data.tar.gz: 122627edb665db07dd980bab718b6d5478f74938
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2f9fa00b8f6d7d577a3cc30b415bba53f02b3820a29795f940bcd81025ef858524518580d603956fbf753b7de3c66b7b541e3b0f786383eff0e9f06eec29fb5
|
7
|
+
data.tar.gz: d73cecf26ac256e6112e8a736f53a9e1621ec4faf7272214da4b229251d83b1636902b1d9ea92085bf971b449791e04e3c1c654270bd7b1d1495c4fb764d7987
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## v0.6.2 2015-04-14
|
2
|
+
|
3
|
+
### Changed
|
4
|
+
|
5
|
+
* Updated to transproc 0.2.0 (solnic)
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
* `CommandRegistry#respond_to_missing?` behavior (hecrj)
|
10
|
+
|
11
|
+
[Compare v0.6.1...v0.6.2](https://github.com/rom-rb/rom/compare/v0.6.1...v0.6.2)
|
12
|
+
|
1
13
|
## v0.6.1 2015-04-04
|
2
14
|
|
3
15
|
### Added
|
data/lib/rom/command_registry.rb
CHANGED
@@ -109,6 +109,13 @@ module ROM
|
|
109
109
|
|
110
110
|
private
|
111
111
|
|
112
|
+
# Allow checking if a certain command is available using dot-notation
|
113
|
+
#
|
114
|
+
# @api private
|
115
|
+
def respond_to_missing?(name, include_private = false)
|
116
|
+
registry.key?(name) || super
|
117
|
+
end
|
118
|
+
|
112
119
|
# Allow retrieving commands using dot-notation
|
113
120
|
#
|
114
121
|
# @api private
|
data/lib/rom/header/attribute.rb
CHANGED
@@ -91,7 +91,7 @@ module ROM
|
|
91
91
|
# @api private
|
92
92
|
def visit_attribute(attribute)
|
93
93
|
if attribute.typed?
|
94
|
-
t(:
|
94
|
+
t(:map_value, attribute.name, t(:"to_#{attribute.type}"))
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
@@ -102,7 +102,7 @@ module ROM
|
|
102
102
|
# @api private
|
103
103
|
def visit_hash(attribute)
|
104
104
|
with_row_proc(attribute) do |row_proc|
|
105
|
-
t(:
|
105
|
+
t(:map_value, attribute.name, row_proc)
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
@@ -113,7 +113,7 @@ module ROM
|
|
113
113
|
# @api private
|
114
114
|
def visit_array(attribute)
|
115
115
|
with_row_proc(attribute) do |row_proc|
|
116
|
-
t(:
|
116
|
+
t(:map_value, attribute.name, t(:map_array, row_proc))
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
@@ -156,7 +156,7 @@ module ROM
|
|
156
156
|
ops << t(:group, name, keys)
|
157
157
|
|
158
158
|
ops << other.map { |attr|
|
159
|
-
t(:map_array, t(:
|
159
|
+
t(:map_array, t(:map_value, name, visit_group(attr, true)))
|
160
160
|
}
|
161
161
|
end
|
162
162
|
else
|
@@ -171,7 +171,7 @@ module ROM
|
|
171
171
|
# @api private
|
172
172
|
def initialize_row_proc
|
173
173
|
@row_proc = compose do |ops|
|
174
|
-
ops << t(:
|
174
|
+
ops << t(:rename_keys, mapping) if header.aliased?
|
175
175
|
ops << header.map { |attr| visit(attr) }
|
176
176
|
ops << t(-> tuple { model.new(tuple) }) if model
|
177
177
|
end
|
data/lib/rom/version.rb
CHANGED
data/rom.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.test_files = `git ls-files -- {spec}/*`.split("\n")
|
16
16
|
gem.license = 'MIT'
|
17
17
|
|
18
|
-
gem.add_runtime_dependency 'transproc', '~> 0.
|
18
|
+
gem.add_runtime_dependency 'transproc', '~> 0.2', '>= 0.2.0'
|
19
19
|
gem.add_runtime_dependency 'equalizer', '~> 0.0', '>= 0.0.9'
|
20
20
|
|
21
21
|
gem.add_development_dependency 'rake', '~> 10.3'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.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: 2015-04-
|
11
|
+
date: 2015-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: transproc
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.2'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.2.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.2'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: 0.2.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: equalizer
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|