mm_uses_uuid 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module MmUsesUuid
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
data/lib/mm_uses_uuid.rb CHANGED
@@ -52,7 +52,7 @@ class UuidModel
52
52
  end
53
53
 
54
54
  def self.find(*ids)
55
- ids.flatten!.uniq!
55
+ ids = ids.flatten.uniq
56
56
  ids_by_class = ids.each_with_object(Hash.new { |hash, key| hash[key] = [] }) do |id, hsh|
57
57
  lsn = id.to_s[-1].hex
58
58
  klass = @@lsn_class_lookup[lsn]
@@ -66,7 +66,7 @@ class UuidModel
66
66
  end
67
67
 
68
68
  def self.find!(*ids)
69
- ids.flatten!.uniq!
69
+ ids = ids.flatten.uniq
70
70
  raise MongoMapper::DocumentNotFound, "Couldn't find without an ID" if ids.size == 0
71
71
  find(*ids).tap do |result|
72
72
  if result.nil? || ids.size != Array(result).size
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mm_uses_uuid
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.15
5
+ version: 0.0.16
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jonathan Chambers
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-07-22 00:00:00 Z
13
+ date: 2012-07-23 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec