ecm_cms_core 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,8 @@ module Ecm
|
|
8
8
|
validates :pathname, :presence => true
|
9
9
|
validates :basename, :presence => true, :uniqueness => { :scope => :folder_id }
|
10
10
|
validates :format, :inclusion => ::Mime::SET.symbols.map(&:to_s), :allow_nil => true, :allow_blank => true
|
11
|
-
validates :locale, :inclusion => ::I18n.available_locales.map(&:to_s)
|
11
|
+
# validates :locale, :inclusion => ::I18n.available_locales.map(&:to_s)
|
12
|
+
validate :available_locale
|
12
13
|
validates :handler, :inclusion => ::ActionView::Template::Handlers.extensions.map(&:to_s)
|
13
14
|
|
14
15
|
after_initialize :set_defaults
|
@@ -17,6 +18,10 @@ module Ecm
|
|
17
18
|
|
18
19
|
attr_accessible :folder_id, :basename, :title, :meta_description, :body, :layout, :locale, :format, :handler, :partial
|
19
20
|
|
21
|
+
def available_locale
|
22
|
+
I18n.available_locales.map(&:to_s).include?(self.locale)
|
23
|
+
end
|
24
|
+
|
20
25
|
def normalize_locale
|
21
26
|
self.locale = self.locale.to_s
|
22
27
|
end
|
data/lib/ecm/cms_core/version.rb
CHANGED
@@ -11,7 +11,7 @@ namespace :ecm do
|
|
11
11
|
f = Ecm::CmsCore::Folder.create!(:basename => "home", :parent => lf)
|
12
12
|
t = f.templates.create!(:basename => 'index',
|
13
13
|
:body => "h1. Home [#{locale}]",
|
14
|
-
:format => '
|
14
|
+
:format => '',
|
15
15
|
:handler => 'texterb',
|
16
16
|
:locale => locale,
|
17
17
|
:partial => false,
|
metadata
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_cms_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
13
|
- Roberto Vasquez Angel
|
@@ -10,7 +15,7 @@ autorequire:
|
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date: 2012-
|
18
|
+
date: 2012-08-08 00:00:00 Z
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: rails
|
@@ -20,6 +25,11 @@ dependencies:
|
|
20
25
|
requirements:
|
21
26
|
- - ~>
|
22
27
|
- !ruby/object:Gem::Version
|
28
|
+
hash: 5
|
29
|
+
segments:
|
30
|
+
- 3
|
31
|
+
- 2
|
32
|
+
- 5
|
23
33
|
version: 3.2.5
|
24
34
|
type: :runtime
|
25
35
|
version_requirements: *id001
|
@@ -31,6 +41,11 @@ dependencies:
|
|
31
41
|
requirements:
|
32
42
|
- - ~>
|
33
43
|
- !ruby/object:Gem::Version
|
44
|
+
hash: 15
|
45
|
+
segments:
|
46
|
+
- 2
|
47
|
+
- 1
|
48
|
+
- 2
|
34
49
|
version: 2.1.2
|
35
50
|
type: :runtime
|
36
51
|
version_requirements: *id002
|
@@ -42,6 +57,11 @@ dependencies:
|
|
42
57
|
requirements:
|
43
58
|
- - ~>
|
44
59
|
- !ruby/object:Gem::Version
|
60
|
+
hash: 5
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 6
|
64
|
+
- 1
|
45
65
|
version: 0.6.1
|
46
66
|
type: :runtime
|
47
67
|
version_requirements: *id003
|
@@ -53,6 +73,11 @@ dependencies:
|
|
53
73
|
requirements:
|
54
74
|
- - ~>
|
55
75
|
- !ruby/object:Gem::Version
|
76
|
+
hash: 19
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
- 1
|
80
|
+
- 4
|
56
81
|
version: 0.1.4
|
57
82
|
type: :runtime
|
58
83
|
version_requirements: *id004
|
@@ -64,6 +89,9 @@ dependencies:
|
|
64
89
|
requirements:
|
65
90
|
- - ">="
|
66
91
|
- !ruby/object:Gem::Version
|
92
|
+
hash: 3
|
93
|
+
segments:
|
94
|
+
- 0
|
67
95
|
version: "0"
|
68
96
|
type: :development
|
69
97
|
version_requirements: *id005
|
@@ -75,6 +103,9 @@ dependencies:
|
|
75
103
|
requirements:
|
76
104
|
- - ">="
|
77
105
|
- !ruby/object:Gem::Version
|
106
|
+
hash: 3
|
107
|
+
segments:
|
108
|
+
- 0
|
78
109
|
version: "0"
|
79
110
|
type: :development
|
80
111
|
version_requirements: *id006
|
@@ -86,6 +117,9 @@ dependencies:
|
|
86
117
|
requirements:
|
87
118
|
- - ">="
|
88
119
|
- !ruby/object:Gem::Version
|
120
|
+
hash: 3
|
121
|
+
segments:
|
122
|
+
- 0
|
89
123
|
version: "0"
|
90
124
|
type: :development
|
91
125
|
version_requirements: *id007
|
@@ -97,6 +131,10 @@ dependencies:
|
|
97
131
|
requirements:
|
98
132
|
- - ~>
|
99
133
|
- !ruby/object:Gem::Version
|
134
|
+
hash: 3
|
135
|
+
segments:
|
136
|
+
- 2
|
137
|
+
- 0
|
100
138
|
version: "2.0"
|
101
139
|
type: :development
|
102
140
|
version_requirements: *id008
|
@@ -108,6 +146,10 @@ dependencies:
|
|
108
146
|
requirements:
|
109
147
|
- - ~>
|
110
148
|
- !ruby/object:Gem::Version
|
149
|
+
hash: 7
|
150
|
+
segments:
|
151
|
+
- 3
|
152
|
+
- 0
|
111
153
|
version: "3.0"
|
112
154
|
type: :development
|
113
155
|
version_requirements: *id009
|
@@ -119,6 +161,9 @@ dependencies:
|
|
119
161
|
requirements:
|
120
162
|
- - ">="
|
121
163
|
- !ruby/object:Gem::Version
|
164
|
+
hash: 3
|
165
|
+
segments:
|
166
|
+
- 0
|
122
167
|
version: "0"
|
123
168
|
type: :development
|
124
169
|
version_requirements: *id010
|
@@ -130,6 +175,9 @@ dependencies:
|
|
130
175
|
requirements:
|
131
176
|
- - ">="
|
132
177
|
- !ruby/object:Gem::Version
|
178
|
+
hash: 3
|
179
|
+
segments:
|
180
|
+
- 0
|
133
181
|
version: "0"
|
134
182
|
type: :development
|
135
183
|
version_requirements: *id011
|
@@ -141,6 +189,9 @@ dependencies:
|
|
141
189
|
requirements:
|
142
190
|
- - ">="
|
143
191
|
- !ruby/object:Gem::Version
|
192
|
+
hash: 3
|
193
|
+
segments:
|
194
|
+
- 0
|
144
195
|
version: "0"
|
145
196
|
type: :development
|
146
197
|
version_requirements: *id012
|
@@ -152,6 +203,9 @@ dependencies:
|
|
152
203
|
requirements:
|
153
204
|
- - ">="
|
154
205
|
- !ruby/object:Gem::Version
|
206
|
+
hash: 3
|
207
|
+
segments:
|
208
|
+
- 0
|
155
209
|
version: "0"
|
156
210
|
type: :development
|
157
211
|
version_requirements: *id013
|
@@ -163,6 +217,12 @@ dependencies:
|
|
163
217
|
requirements:
|
164
218
|
- - ">="
|
165
219
|
- !ruby/object:Gem::Version
|
220
|
+
hash: 961915996
|
221
|
+
segments:
|
222
|
+
- 1
|
223
|
+
- 1
|
224
|
+
- 0
|
225
|
+
- pre
|
166
226
|
version: 1.1.0.pre
|
167
227
|
type: :development
|
168
228
|
version_requirements: *id014
|
@@ -229,12 +289,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
229
289
|
requirements:
|
230
290
|
- - ">="
|
231
291
|
- !ruby/object:Gem::Version
|
292
|
+
hash: 3
|
293
|
+
segments:
|
294
|
+
- 0
|
232
295
|
version: "0"
|
233
296
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
297
|
none: false
|
235
298
|
requirements:
|
236
299
|
- - ">="
|
237
300
|
- !ruby/object:Gem::Version
|
301
|
+
hash: 3
|
302
|
+
segments:
|
303
|
+
- 0
|
238
304
|
version: "0"
|
239
305
|
requirements: []
|
240
306
|
|
@@ -245,4 +311,3 @@ specification_version: 3
|
|
245
311
|
summary: Database backed templates and partials.
|
246
312
|
test_files: []
|
247
313
|
|
248
|
-
has_rdoc:
|