plucky 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/plucky.rb CHANGED
@@ -20,7 +20,11 @@ module Plucky
20
20
  elsif value.is_a?(BSON::ObjectId)
21
21
  value
22
22
  else
23
- BSON::ObjectId.from_string(value.to_s)
23
+ if BSON::ObjectId.legal?(value.to_s)
24
+ BSON::ObjectId.from_string(value.to_s)
25
+ else
26
+ value
27
+ end
24
28
  end
25
29
  end
26
30
  end
@@ -129,6 +129,8 @@ module Plucky
129
129
  when Hash
130
130
  value.each { |k, v| value[k] = normalized_value(key, k, v) }
131
131
  value
132
+ when Regexp
133
+ Regexp.new(value)
132
134
  else
133
135
  value
134
136
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Plucky
3
- Version = '0.3.6'
3
+ Version = '0.3.7'
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plucky
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 6
10
- version: 0.3.6
9
+ - 7
10
+ version: 0.3.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Nunemaker
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-11 00:00:00 -04:00
18
+ date: 2011-02-27 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency