populate-me 0.0.29 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/populate_me/mongo/mutation.rb +7 -0
- data/populate-me.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8a0503aa342368e87b91e82ea97c168ccc6a055
|
4
|
+
data.tar.gz: 0355dc2cc114f8e09f85be3a4d384729cec3a33f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dadb124e949a891c7dc25f9a0d3fc9daee4f8939d0509f75c02c6e9e2075768c14765790bcc9a52e9caefbbac872906368456a1f15a902633ab2f54f5c9c16d3
|
7
|
+
data.tar.gz: cbd5bb137f28cbf71db9a463ccd0b81d36f12982171623742eadd6ebcbff2e4aed61f725576b363ae17f29e519bd71f4fe751a779cb69d21df5914a7affd94b8
|
@@ -38,6 +38,13 @@ module PopulateMe
|
|
38
38
|
def find(selector={},opts={})
|
39
39
|
selector.update(opts.delete(:selector)||{})
|
40
40
|
opts = {:sort=>self.sorting_order}.update(opts)
|
41
|
+
if opts.key?(:fields)
|
42
|
+
opts[:projection] = opts[:fields].inject({}) do |h, f|
|
43
|
+
h[f.to_sym] = 1
|
44
|
+
h
|
45
|
+
end
|
46
|
+
opts.delete(:fields)
|
47
|
+
end
|
41
48
|
cur = collection.find(selector,opts)
|
42
49
|
cur.instance_variable_set('@mutant_class', self)
|
43
50
|
cur.extend(CursorMutation)
|
data/populate-me.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'populate-me'
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.30"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.summary = "ALPHA !!! Populate Me is relatively complete but simple CMS"
|
6
6
|
s.description = "ALPHA !!! Populate Me is relatively complete but simple CMS. It includes a Rack middleware for putting in your Rack stack, and a bespoke MongoDB ODM. But Populate Me is not really finished yet."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: populate-me
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mickael Riga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack-golem
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
188
|
+
rubygems_version: 2.6.11
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: ALPHA !!! Populate Me is relatively complete but simple CMS
|