noodall-core 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/lib/noodall/core/version.rb +1 -1
- data/lib/noodall/tagging.rb +5 -1
- data/noodall-core.gemspec +2 -1
- data/spec/component_spec.rb +2 -0
- data/spec/factories/node.rb +7 -0
- metadata +63 -17
data/Gemfile
CHANGED
data/lib/noodall/core/version.rb
CHANGED
data/lib/noodall/tagging.rb
CHANGED
@@ -14,7 +14,11 @@ module Noodall
|
|
14
14
|
))
|
15
15
|
tags_map = collection.map_reduce(tag_cloud_map, tag_cloud_reduce, {:query => query.criteria.to_hash, :out => "#{self.collection_name}_tags" })
|
16
16
|
if tags_map.count > 0
|
17
|
-
tags
|
17
|
+
# Strange scoping issue means tags needs to be defined outside of the find block
|
18
|
+
tags = nil
|
19
|
+
tags_map.find({}, query.options.merge(:timeout => false).to_hash) do |cursor|
|
20
|
+
tags = cursor.map { |hash| Tag.new(hash['_id'], hash['value']) }
|
21
|
+
end
|
18
22
|
tags
|
19
23
|
else
|
20
24
|
[]
|
data/noodall-core.gemspec
CHANGED
@@ -14,7 +14,8 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.required_rubygems_version = ">= 1.3.6"
|
16
16
|
|
17
|
-
s.add_dependency(%q<mongo_mapper>, ["~> 0.
|
17
|
+
s.add_dependency(%q<mongo_mapper>, ["~> 0.11.0"])
|
18
|
+
s.add_dependency(%q<activemodel>, ["~> 3.1.0"]) # Because 3.3 breaks ramdiv-mongo_mapper_acts_as_tree
|
18
19
|
s.add_dependency(%q<ramdiv-mongo_mapper_acts_as_tree>, ["~> 0.1.1"])
|
19
20
|
s.add_dependency(%q<mm-multi-parameter-attributes>, ["~> 0.2.1"])
|
20
21
|
s.add_dependency(%q<canable>, ["~> 0.1.1"])
|
data/spec/component_spec.rb
CHANGED
data/spec/factories/node.rb
CHANGED
@@ -9,6 +9,13 @@ class LandingPage < Noodall::Node
|
|
9
9
|
root_template!
|
10
10
|
end
|
11
11
|
|
12
|
+
# And a factory to build it
|
13
|
+
Factory.define :home do |node|
|
14
|
+
node.title { Faker::Lorem.words(3).join(' ') }
|
15
|
+
node.body { Faker::Lorem.paragraph }
|
16
|
+
node.published_at { Time.now }
|
17
|
+
end
|
18
|
+
|
12
19
|
# And a factory to build it
|
13
20
|
Factory.define :page do |node|
|
14
21
|
node.title { Faker::Lorem.words(3).join(' ') }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,43 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-11-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mongo_mapper
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.11.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.11.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: activemodel
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 3.1.0
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 3.1.0
|
25
46
|
- !ruby/object:Gem::Dependency
|
26
47
|
name: ramdiv-mongo_mapper_acts_as_tree
|
27
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
28
49
|
none: false
|
29
50
|
requirements:
|
30
51
|
- - ~>
|
@@ -32,10 +53,15 @@ dependencies:
|
|
32
53
|
version: 0.1.1
|
33
54
|
type: :runtime
|
34
55
|
prerelease: false
|
35
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.1.1
|
36
62
|
- !ruby/object:Gem::Dependency
|
37
63
|
name: mm-multi-parameter-attributes
|
38
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
39
65
|
none: false
|
40
66
|
requirements:
|
41
67
|
- - ~>
|
@@ -43,10 +69,15 @@ dependencies:
|
|
43
69
|
version: 0.2.1
|
44
70
|
type: :runtime
|
45
71
|
prerelease: false
|
46
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 0.2.1
|
47
78
|
- !ruby/object:Gem::Dependency
|
48
79
|
name: canable
|
49
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
50
81
|
none: false
|
51
82
|
requirements:
|
52
83
|
- - ~>
|
@@ -54,10 +85,15 @@ dependencies:
|
|
54
85
|
version: 0.1.1
|
55
86
|
type: :runtime
|
56
87
|
prerelease: false
|
57
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 0.1.1
|
58
94
|
- !ruby/object:Gem::Dependency
|
59
95
|
name: mm-versionable
|
60
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
61
97
|
none: false
|
62
98
|
requirements:
|
63
99
|
- - ~>
|
@@ -65,10 +101,15 @@ dependencies:
|
|
65
101
|
version: 0.2.5
|
66
102
|
type: :runtime
|
67
103
|
prerelease: false
|
68
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 0.2.5
|
69
110
|
- !ruby/object:Gem::Dependency
|
70
111
|
name: ruby-stemmer
|
71
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
72
113
|
none: false
|
73
114
|
requirements:
|
74
115
|
- - ! '>='
|
@@ -76,7 +117,12 @@ dependencies:
|
|
76
117
|
version: '0'
|
77
118
|
type: :runtime
|
78
119
|
prerelease: false
|
79
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
80
126
|
description: Core data objects for Noodall
|
81
127
|
email:
|
82
128
|
- steve@wearebeef.co.uk
|
@@ -123,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
169
|
version: '0'
|
124
170
|
segments:
|
125
171
|
- 0
|
126
|
-
hash: -
|
172
|
+
hash: -2543369303682078174
|
127
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
174
|
none: false
|
129
175
|
requirements:
|
@@ -132,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
178
|
version: 1.3.6
|
133
179
|
requirements: []
|
134
180
|
rubyforge_project:
|
135
|
-
rubygems_version: 1.8.
|
181
|
+
rubygems_version: 1.8.24
|
136
182
|
signing_key:
|
137
183
|
specification_version: 3
|
138
184
|
summary: Core data objects for Noodall
|