manageable_content 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +6 -1
- data/README.rdoc +6 -6
- data/app/models/manageable_content.rb +1 -1
- data/app/models/manageable_content/page.rb +0 -2
- data/db/migrate/20110814002730_create_manageable_content_pages.rb +1 -1
- data/db/migrate/20110814003912_create_manageable_content_page_contents.rb +1 -1
- data/lib/manageable_content.rb +1 -1
- data/lib/manageable_content/controllers/dsl.rb +25 -21
- data/lib/manageable_content/engine.rb +1 -1
- data/lib/manageable_content/manager.rb +22 -32
- data/lib/manageable_content/version.rb +1 -1
- data/spec/dummy/config/initializers/session_store.rb +1 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +52506 -0
- data/spec/integration/manageable_content_usage_spec.rb +5 -10
- data/spec/lib/manageable_content/manager_spec.rb +1 -2
- metadata +151 -101
@@ -7,19 +7,14 @@ describe "The demo application" do
|
|
7
7
|
|
8
8
|
# Application layout
|
9
9
|
page = ManageableContent::Manager.page('application').first
|
10
|
-
page.page_content(:title)
|
11
|
-
|
12
|
-
page.page_content(:
|
13
|
-
|
14
|
-
page.page_content(:footer_copyright)
|
15
|
-
.update_attributes(:content => "Application Footer Copyright Content")
|
16
|
-
page.page_content(:footer_contact)
|
17
|
-
.update_attributes(:content => "Application Footer Contact Content")
|
10
|
+
page.page_content(:title).update_attributes(:content => "Application Title Content")
|
11
|
+
page.page_content(:keywords).update_attributes(:content => "Application Keywords Content")
|
12
|
+
page.page_content(:footer_copyright).update_attributes(:content => "Application Footer Copyright Content")
|
13
|
+
page.page_content(:footer_contact).update_attributes(:content => "Application Footer Contact Content")
|
18
14
|
|
19
15
|
# Blog layout
|
20
16
|
page = ManageableContent::Manager.page('blog').first
|
21
|
-
page.page_content(:blog_title)
|
22
|
-
.update_attributes(:content => "Blog Application Blog Title Content")
|
17
|
+
page.page_content(:blog_title).update_attributes(:content => "Blog Application Blog Title Content")
|
23
18
|
|
24
19
|
# Home controller
|
25
20
|
page = ManageableContent::Manager.page('home').first
|
@@ -120,8 +120,7 @@ describe ManageableContent::Manager do
|
|
120
120
|
it "should retrieve pages correctly" do
|
121
121
|
[ApplicationController, ContactController, HomeController].each do |controller_class|
|
122
122
|
ManageableContent::Engine.config.locales.each do |locale|
|
123
|
-
page = ManageableContent::Manager
|
124
|
-
.page(controller_class.controller_path, locale).first
|
123
|
+
page = ManageableContent::Manager.page(controller_class.controller_path, locale).first
|
125
124
|
|
126
125
|
page.key.should == controller_class.controller_path
|
127
126
|
page.locale.should == locale.to_s
|
metadata
CHANGED
@@ -1,133 +1,174 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: manageable_content
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Fabio Kreusch
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-02-25 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: rails
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
25
|
+
requirements:
|
19
26
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 5
|
29
|
+
segments:
|
30
|
+
- 3
|
31
|
+
- 1
|
32
|
+
version: "3.1"
|
22
33
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
26
36
|
name: sqlite3
|
27
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
33
47
|
type: :development
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
37
50
|
name: rspec-rails
|
38
|
-
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
53
|
none: false
|
40
|
-
requirements:
|
54
|
+
requirements:
|
41
55
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 9
|
58
|
+
segments:
|
59
|
+
- 2
|
60
|
+
- 5
|
61
|
+
version: "2.5"
|
44
62
|
type: :development
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
63
|
+
version_requirements: *id003
|
64
|
+
- !ruby/object:Gem::Dependency
|
48
65
|
name: shoulda-matchers
|
49
|
-
|
66
|
+
prerelease: false
|
67
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
68
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 3
|
73
|
+
segments:
|
74
|
+
- 0
|
75
|
+
version: "0"
|
55
76
|
type: :development
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
77
|
+
version_requirements: *id004
|
78
|
+
- !ruby/object:Gem::Dependency
|
59
79
|
name: database_cleaner
|
60
|
-
|
80
|
+
prerelease: false
|
81
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
82
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
version: "0"
|
66
90
|
type: :development
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
91
|
+
version_requirements: *id005
|
92
|
+
- !ruby/object:Gem::Dependency
|
70
93
|
name: capybara
|
71
|
-
|
94
|
+
prerelease: false
|
95
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
96
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
hash: 3
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
version: "0"
|
77
104
|
type: :development
|
78
|
-
|
79
|
-
|
80
|
-
- !ruby/object:Gem::Dependency
|
105
|
+
version_requirements: *id006
|
106
|
+
- !ruby/object:Gem::Dependency
|
81
107
|
name: launchy
|
82
|
-
|
108
|
+
prerelease: false
|
109
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
110
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
hash: 3
|
115
|
+
segments:
|
116
|
+
- 0
|
117
|
+
version: "0"
|
88
118
|
type: :development
|
89
|
-
|
90
|
-
|
91
|
-
- !ruby/object:Gem::Dependency
|
119
|
+
version_requirements: *id007
|
120
|
+
- !ruby/object:Gem::Dependency
|
92
121
|
name: factory_girl
|
93
|
-
|
122
|
+
prerelease: false
|
123
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
94
124
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
hash: 3
|
129
|
+
segments:
|
130
|
+
- 0
|
131
|
+
version: "0"
|
99
132
|
type: :development
|
100
|
-
|
101
|
-
|
102
|
-
- !ruby/object:Gem::Dependency
|
133
|
+
version_requirements: *id008
|
134
|
+
- !ruby/object:Gem::Dependency
|
103
135
|
name: guard-bundler
|
104
|
-
|
136
|
+
prerelease: false
|
137
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
105
138
|
none: false
|
106
|
-
requirements:
|
107
|
-
- -
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
hash: 3
|
143
|
+
segments:
|
144
|
+
- 0
|
145
|
+
version: "0"
|
110
146
|
type: :development
|
111
|
-
|
112
|
-
|
113
|
-
- !ruby/object:Gem::Dependency
|
147
|
+
version_requirements: *id009
|
148
|
+
- !ruby/object:Gem::Dependency
|
114
149
|
name: guard-rspec
|
115
|
-
|
150
|
+
prerelease: false
|
151
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
116
152
|
none: false
|
117
|
-
requirements:
|
118
|
-
- -
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
hash: 3
|
157
|
+
segments:
|
158
|
+
- 0
|
159
|
+
version: "0"
|
121
160
|
type: :development
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
email:
|
161
|
+
version_requirements: *id010
|
162
|
+
description: A content management framework for Rails (compatible with 3.1 and 3.2)
|
163
|
+
email:
|
126
164
|
- fabiokr@gmail.com
|
127
165
|
executables: []
|
166
|
+
|
128
167
|
extensions: []
|
168
|
+
|
129
169
|
extra_rdoc_files: []
|
130
|
-
|
170
|
+
|
171
|
+
files:
|
131
172
|
- app/models/manageable_content.rb
|
132
173
|
- app/models/manageable_content/page.rb
|
133
174
|
- app/models/manageable_content/page_content.rb
|
@@ -198,29 +239,38 @@ files:
|
|
198
239
|
- spec/dummy/log/development.log
|
199
240
|
homepage: https://github.com/fabiokr/manageable_content
|
200
241
|
licenses: []
|
242
|
+
|
201
243
|
post_install_message:
|
202
244
|
rdoc_options: []
|
203
|
-
|
245
|
+
|
246
|
+
require_paths:
|
204
247
|
- lib
|
205
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
248
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
206
249
|
none: false
|
207
|
-
requirements:
|
208
|
-
- -
|
209
|
-
- !ruby/object:Gem::Version
|
210
|
-
|
211
|
-
|
250
|
+
requirements:
|
251
|
+
- - ">="
|
252
|
+
- !ruby/object:Gem::Version
|
253
|
+
hash: 3
|
254
|
+
segments:
|
255
|
+
- 0
|
256
|
+
version: "0"
|
257
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
258
|
none: false
|
213
|
-
requirements:
|
214
|
-
- -
|
215
|
-
- !ruby/object:Gem::Version
|
216
|
-
|
259
|
+
requirements:
|
260
|
+
- - ">="
|
261
|
+
- !ruby/object:Gem::Version
|
262
|
+
hash: 3
|
263
|
+
segments:
|
264
|
+
- 0
|
265
|
+
version: "0"
|
217
266
|
requirements: []
|
267
|
+
|
218
268
|
rubyforge_project:
|
219
|
-
rubygems_version: 1.8.
|
269
|
+
rubygems_version: 1.8.15
|
220
270
|
signing_key:
|
221
271
|
specification_version: 3
|
222
|
-
summary: A content management framework for Rails
|
223
|
-
test_files:
|
272
|
+
summary: A content management framework for Rails
|
273
|
+
test_files:
|
224
274
|
- spec/models/manageable_content/page_spec.rb
|
225
275
|
- spec/models/manageable_content/page_content_spec.rb
|
226
276
|
- spec/integration/manageable_content_usage_spec.rb
|