noodall-core 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/VERSION +1 -1
- data/lib/noodall/node.rb +1 -1
- data/noodall-core.gemspec +6 -6
- data/spec/factories/node.rb +11 -0
- data/spec/node_spec.rb +6 -0
- metadata +22 -23
- data/Gemfile.lock +0 -65
data/.gitignore
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
data/lib/noodall/node.rb
CHANGED
data/noodall-core.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{noodall-core}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Steve England"]
|
12
|
-
s.date = %q{2011-02-
|
12
|
+
s.date = %q{2011-02-09}
|
13
13
|
s.description = %q{Core data objects for Noodall}
|
14
14
|
s.email = %q{steve@wearebeef.co.uk}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -20,7 +20,6 @@ Gem::Specification.new do |s|
|
|
20
20
|
".document",
|
21
21
|
".gitignore",
|
22
22
|
"Gemfile",
|
23
|
-
"Gemfile.lock",
|
24
23
|
"LICENSE",
|
25
24
|
"README.rdoc",
|
26
25
|
"Rakefile",
|
@@ -45,18 +44,19 @@ Gem::Specification.new do |s|
|
|
45
44
|
s.homepage = %q{http://github.com/beef/noodall-core}
|
46
45
|
s.rdoc_options = ["--charset=UTF-8"]
|
47
46
|
s.require_paths = ["lib"]
|
48
|
-
s.rubygems_version = %q{1.
|
47
|
+
s.rubygems_version = %q{1.3.7}
|
49
48
|
s.summary = %q{Core data objects for Noodall}
|
50
49
|
s.test_files = [
|
51
50
|
"spec/node_spec.rb",
|
52
|
-
"spec/site_map_spec.rb",
|
53
51
|
"spec/component_spec.rb",
|
54
52
|
"spec/spec_helper.rb",
|
55
53
|
"spec/factories/node.rb",
|
56
|
-
"spec/factories/component.rb"
|
54
|
+
"spec/factories/component.rb",
|
55
|
+
"spec/site_map_spec.rb"
|
57
56
|
]
|
58
57
|
|
59
58
|
if s.respond_to? :specification_version then
|
59
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
60
60
|
s.specification_version = 3
|
61
61
|
|
62
62
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
data/spec/factories/node.rb
CHANGED
@@ -9,9 +9,20 @@ class Page < Noodall::Node
|
|
9
9
|
wide_slots 3
|
10
10
|
end
|
11
11
|
|
12
|
+
class LandingPage < Noodall::Node
|
13
|
+
root_template!
|
14
|
+
end
|
15
|
+
|
12
16
|
# And a factory to build it
|
13
17
|
Factory.define :page do |node|
|
14
18
|
node.title { Faker::Lorem.words(3).join(' ') }
|
15
19
|
node.body { Faker::Lorem.paragraph }
|
16
20
|
node.published_at { Time.now }
|
17
21
|
end
|
22
|
+
|
23
|
+
# And a factory to build it
|
24
|
+
Factory.define :landing_page do |node|
|
25
|
+
node.title { Faker::Lorem.words(3).join(' ') }
|
26
|
+
node.body { Faker::Lorem.paragraph }
|
27
|
+
node.published_at { Time.now }
|
28
|
+
end
|
data/spec/node_spec.rb
CHANGED
@@ -24,6 +24,12 @@ describe Noodall::Node do
|
|
24
24
|
Noodall::Node.template_classes.should include(LandingPage)
|
25
25
|
end
|
26
26
|
|
27
|
+
it "should filter roots with options" do
|
28
|
+
page = Factory(:landing_page, :title => "My Landing Page", :publish => true)
|
29
|
+
page = Factory(:page, :title => "My Page", :publish => true)
|
30
|
+
Noodall::Node.roots({:_type => ['Page']}).count.should == 1
|
31
|
+
end
|
32
|
+
|
27
33
|
it "should know what class it is" do
|
28
34
|
page = Page.create!(@valid_attributes)
|
29
35
|
page.reload
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 13
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 3
|
10
|
+
version: 0.5.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steve England
|
@@ -15,10 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-09 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
name: mongo_mapper
|
22
25
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
26
|
none: false
|
24
27
|
requirements:
|
@@ -31,10 +34,10 @@ dependencies:
|
|
31
34
|
- 6
|
32
35
|
version: 0.8.6
|
33
36
|
requirement: *id001
|
34
|
-
prerelease: false
|
35
|
-
name: mongo_mapper
|
36
|
-
type: :runtime
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
name: ramdiv-mongo_mapper_acts_as_tree
|
38
41
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
42
|
none: false
|
40
43
|
requirements:
|
@@ -47,10 +50,10 @@ dependencies:
|
|
47
50
|
- 1
|
48
51
|
version: 0.1.1
|
49
52
|
requirement: *id002
|
50
|
-
prerelease: false
|
51
|
-
name: ramdiv-mongo_mapper_acts_as_tree
|
52
|
-
type: :runtime
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
name: mm-multi-parameter-attributes
|
54
57
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
58
|
none: false
|
56
59
|
requirements:
|
@@ -63,10 +66,10 @@ dependencies:
|
|
63
66
|
- 1
|
64
67
|
version: 0.1.1
|
65
68
|
requirement: *id003
|
66
|
-
prerelease: false
|
67
|
-
name: mm-multi-parameter-attributes
|
68
|
-
type: :runtime
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
name: canable
|
70
73
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
71
74
|
none: false
|
72
75
|
requirements:
|
@@ -79,10 +82,10 @@ dependencies:
|
|
79
82
|
- 1
|
80
83
|
version: 0.1.1
|
81
84
|
requirement: *id004
|
82
|
-
prerelease: false
|
83
|
-
name: canable
|
84
|
-
type: :runtime
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
name: ruby-stemmer
|
86
89
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
87
90
|
none: false
|
88
91
|
requirements:
|
@@ -93,9 +96,6 @@ dependencies:
|
|
93
96
|
- 0
|
94
97
|
version: "0"
|
95
98
|
requirement: *id005
|
96
|
-
prerelease: false
|
97
|
-
name: ruby-stemmer
|
98
|
-
type: :runtime
|
99
99
|
description: Core data objects for Noodall
|
100
100
|
email: steve@wearebeef.co.uk
|
101
101
|
executables: []
|
@@ -109,7 +109,6 @@ files:
|
|
109
109
|
- .document
|
110
110
|
- .gitignore
|
111
111
|
- Gemfile
|
112
|
-
- Gemfile.lock
|
113
112
|
- LICENSE
|
114
113
|
- README.rdoc
|
115
114
|
- Rakefile
|
@@ -160,14 +159,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
159
|
requirements: []
|
161
160
|
|
162
161
|
rubyforge_project:
|
163
|
-
rubygems_version: 1.
|
162
|
+
rubygems_version: 1.3.7
|
164
163
|
signing_key:
|
165
164
|
specification_version: 3
|
166
165
|
summary: Core data objects for Noodall
|
167
166
|
test_files:
|
168
167
|
- spec/node_spec.rb
|
169
|
-
- spec/site_map_spec.rb
|
170
168
|
- spec/component_spec.rb
|
171
169
|
- spec/spec_helper.rb
|
172
170
|
- spec/factories/node.rb
|
173
171
|
- spec/factories/component.rb
|
172
|
+
- spec/site_map_spec.rb
|
data/Gemfile.lock
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activesupport (3.0.3)
|
5
|
-
bson (1.1.5)
|
6
|
-
bson_ext (1.1.5)
|
7
|
-
canable (0.1.1)
|
8
|
-
database_cleaner (0.5.2)
|
9
|
-
diff-lcs (1.1.2)
|
10
|
-
factory_girl (1.3.2)
|
11
|
-
faker (0.3.1)
|
12
|
-
gemcutter (0.6.1)
|
13
|
-
git (1.2.5)
|
14
|
-
i18n (0.5.0)
|
15
|
-
jeweler (1.4.0)
|
16
|
-
gemcutter (>= 0.1.0)
|
17
|
-
git (>= 1.2.5)
|
18
|
-
rubyforge (>= 2.0.0)
|
19
|
-
jnunemaker-validatable (1.8.4)
|
20
|
-
activesupport (>= 2.3.4)
|
21
|
-
json_pure (1.4.6)
|
22
|
-
mm-multi-parameter-attributes (0.1.1)
|
23
|
-
mongo_mapper
|
24
|
-
mongo (1.1.5)
|
25
|
-
bson (>= 1.1.5)
|
26
|
-
mongo_mapper (0.8.6)
|
27
|
-
activesupport (>= 2.3.4)
|
28
|
-
jnunemaker-validatable (~> 1.8.4)
|
29
|
-
plucky (~> 0.3.6)
|
30
|
-
plucky (0.3.6)
|
31
|
-
mongo (~> 1.1)
|
32
|
-
rake (0.8.7)
|
33
|
-
ramdiv-mongo_mapper_acts_as_tree (0.1.2)
|
34
|
-
mongo_mapper (>= 0.6.8)
|
35
|
-
rspec (2.0.1)
|
36
|
-
rspec-core (~> 2.0.1)
|
37
|
-
rspec-expectations (~> 2.0.1)
|
38
|
-
rspec-mocks (~> 2.0.1)
|
39
|
-
rspec-core (2.0.1)
|
40
|
-
rspec-expectations (2.0.1)
|
41
|
-
diff-lcs (>= 1.1.2)
|
42
|
-
rspec-mocks (2.0.1)
|
43
|
-
rspec-core (~> 2.0.1)
|
44
|
-
rspec-expectations (~> 2.0.1)
|
45
|
-
ruby-stemmer (0.8.2)
|
46
|
-
rubyforge (2.0.4)
|
47
|
-
json_pure (>= 1.1.7)
|
48
|
-
|
49
|
-
PLATFORMS
|
50
|
-
ruby
|
51
|
-
|
52
|
-
DEPENDENCIES
|
53
|
-
bson_ext (~> 1.1.0)
|
54
|
-
canable (~> 0.1.1)
|
55
|
-
database_cleaner (~> 0.5.2)
|
56
|
-
factory_girl (~> 1.3.2)
|
57
|
-
faker (~> 0.3.1)
|
58
|
-
i18n
|
59
|
-
jeweler (~> 1.4.0)
|
60
|
-
mm-multi-parameter-attributes (~> 0.1.1)
|
61
|
-
mongo_mapper (~> 0.8.6)
|
62
|
-
rake
|
63
|
-
ramdiv-mongo_mapper_acts_as_tree (~> 0.1.1)
|
64
|
-
rspec (~> 2.0.0.beta.22)
|
65
|
-
ruby-stemmer
|