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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 865d4e2694bbdadfd473db6464100f268393559d
4
- data.tar.gz: b676c75f27251e94c18c654213f27129a6be0651
3
+ metadata.gz: 4c8c7b27e645de962baf5ff8f13ec9d7bc49f99b
4
+ data.tar.gz: 122627edb665db07dd980bab718b6d5478f74938
5
5
  SHA512:
6
- metadata.gz: e89088463acbd0e5f6f90d599e9d6c8ab2fbc6ef35f9c6f5a12f41c68e5f2a2a471a710ccbc7172568faf750f0cd124abb79a0907b9d4bb9c9d12e3addbd72fa
7
- data.tar.gz: f4a6d18309f9874329f7d3ec927ec10ea46bfb19e90d2c73fd5c09009c2735294a01eede5f858531fdeae52748ccc3e2b47c25880ddebae619e41862c02b3837
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
@@ -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
@@ -31,7 +31,7 @@ module ROM
31
31
  # @api private
32
32
  attr_reader :meta
33
33
 
34
- # Return attribute class for a give meta hash
34
+ # Return attribute class for a given meta hash
35
35
  #
36
36
  # @param [Hash] meta hash with type information and optional transformation info
37
37
  #
@@ -91,7 +91,7 @@ module ROM
91
91
  # @api private
92
92
  def visit_attribute(attribute)
93
93
  if attribute.typed?
94
- t(:map_key, attribute.name, t(:"to_#{attribute.type}"))
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(:map_key, attribute.name, row_proc)
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(:map_key, attribute.name, t(:map_array, row_proc))
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(:map_key, name, visit_group(attr, true)))
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(:map_hash, mapping) if header.aliased?
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
@@ -1,3 +1,3 @@
1
1
  module ROM
2
- VERSION = '0.6.1'.freeze
2
+ VERSION = '0.6.2'.freeze
3
3
  end
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.1', '>= 0.1.2'
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'
@@ -40,5 +40,9 @@ describe 'ROM::CommandRegistry' do
40
40
 
41
41
  expect(result.value).to be(nil)
42
42
  end
43
+
44
+ it 'allows checking if a command is available using respond_to?' do
45
+ expect(users).to respond_to(:create)
46
+ end
43
47
  end
44
48
  end
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.1
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-04 00:00:00.000000000 Z
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.1'
19
+ version: '0.2'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.1.2
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.1'
29
+ version: '0.2'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.1.2
32
+ version: 0.2.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: equalizer
35
35
  requirement: !ruby/object:Gem::Requirement