euston-projections 1.0.6-java → 1.0.9-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'euston-projections'
3
- s.version = '1.0.6'
3
+ s.version = '1.0.9'
4
4
  s.platform = RUBY_PLATFORM.to_s == 'java' ? 'java' : Gem::Platform::RUBY
5
5
  s.authors = ['Lee Henson', 'Guy Boertje']
6
6
  s.email = ['lee.m.henson@gmail.com', 'guyboertje@gmail.com']
@@ -16,16 +16,15 @@ module Euston
16
16
  end
17
17
  end
18
18
 
19
- def if_unhandled_or_new document_type, id, headers
19
+ def if_unhandled_or_new document_type, id, headers, new_document_attributes = {}
20
20
  if id.respond_to? :call
21
21
  query = id
22
- attributes = {}
23
22
  else
24
23
  query = ->() { document_type.find(id) }
25
- attributes = { _id: id }
24
+ new_document_attributes = { _id: id }
26
25
  end
27
26
 
28
- document = query.call || document_type.new(attributes)
27
+ document = query.call || document_type.new(new_document_attributes)
29
28
 
30
29
  if_unhandled document, headers do
31
30
  yield document
@@ -1,5 +1,5 @@
1
1
  module Euston
2
2
  module Projections
3
- VERSION = "1.0.6"
3
+ VERSION = "1.0.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: euston-projections
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.6
5
+ version: 1.0.9
6
6
  platform: java
7
7
  authors:
8
8
  - Lee Henson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-12-08 00:00:00.000000000Z
13
+ date: 2012-03-05 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 1.8.9
119
+ rubygems_version: 1.8.15
120
120
  signing_key:
121
121
  specification_version: 3
122
122
  summary: Default projection classes for Euston.