plucky 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plucky/options_hash.rb +5 -1
- data/lib/plucky/query.rb +4 -0
- data/lib/plucky/version.rb +1 -1
- metadata +21 -7
data/lib/plucky/options_hash.rb
CHANGED
@@ -76,7 +76,11 @@ module Plucky
|
|
76
76
|
return nil if value.respond_to?(:empty?) && value.empty?
|
77
77
|
case value
|
78
78
|
when Array
|
79
|
-
value.
|
79
|
+
if value.size == 1 && value.first.is_a?(Hash)
|
80
|
+
value.first
|
81
|
+
else
|
82
|
+
value.flatten
|
83
|
+
end
|
80
84
|
when Symbol
|
81
85
|
[value]
|
82
86
|
when String
|
data/lib/plucky/query.rb
CHANGED
@@ -182,6 +182,10 @@ module Plucky
|
|
182
182
|
criteria.to_hash.merge(options.to_hash)
|
183
183
|
end
|
184
184
|
|
185
|
+
def explain
|
186
|
+
collection.find(criteria.to_hash, options.to_hash).explain
|
187
|
+
end
|
188
|
+
|
185
189
|
def inspect
|
186
190
|
as_nice_string = to_hash.collect do |key, value|
|
187
191
|
" #{key}: #{value.inspect}"
|
data/lib/plucky/version.rb
CHANGED
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:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 4
|
10
|
+
version: 0.3.4
|
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-08-
|
18
|
+
date: 2010-08-11 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 25
|
30
30
|
segments:
|
31
31
|
- 1
|
32
32
|
- 0
|
33
|
-
-
|
34
|
-
version: 1.0.
|
33
|
+
- 7
|
34
|
+
version: 1.0.7
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -82,6 +82,20 @@ dependencies:
|
|
82
82
|
version: 0.9.8
|
83
83
|
type: :development
|
84
84
|
version_requirements: *id004
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: log_buddy
|
87
|
+
prerelease: false
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
hash: 3
|
94
|
+
segments:
|
95
|
+
- 0
|
96
|
+
version: "0"
|
97
|
+
type: :development
|
98
|
+
version_requirements: *id005
|
85
99
|
description:
|
86
100
|
email:
|
87
101
|
- nunemaker@gmail.com
|