trusty-cms 2.0.16 → 2.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTORS.md +3 -1
- data/Gemfile.lock +34 -33
- data/app/controllers/admin/pages_controller.rb +9 -1
- data/app/controllers/admin/references_controller.rb +8 -1
- data/lib/trusty_cms.rb +1 -1
- data/spec/dummy/log/test.log +9977 -62846
- data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
- data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +0 -0
- data/trusty_cms.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ff33e8c673a3a54ea713b6f1881e04e9787ec3f
|
4
|
+
data.tar.gz: 00989add18044cd696fa04fc3890f5fa4a424598
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3a85ab3956913fe18aa8c8466fe2ff9655adfcf9366d7ec0ec217f4af0b662afcc9b553c5c2b011ea1aa2530e39dc584d30e846a93a3cdc325b95f5d9f7ce9c
|
7
|
+
data.tar.gz: f3810913c32aa8e629735a810d061c9254bc7fdc8349e6d76e00f5c47c9f570535507097a467f93e070324a8e0636f810ac32adea27222d98506544770d23b7f
|
data/CONTRIBUTORS.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
trusty-cms (2.0.
|
4
|
+
trusty-cms (2.0.17)
|
5
5
|
RedCloth (~> 4.2)
|
6
6
|
acts_as_tree (~> 2.1)
|
7
7
|
bundler (~> 1.7)
|
@@ -19,6 +19,7 @@ PATH
|
|
19
19
|
rack-cache (~> 1.2)
|
20
20
|
radius (~> 0.7)
|
21
21
|
rails (~> 4.2)
|
22
|
+
rake (< 11.0)
|
22
23
|
rdoc (~> 3.9)
|
23
24
|
stringex (~> 1.3)
|
24
25
|
therubyracer (~> 0.12)
|
@@ -31,36 +32,36 @@ GEM
|
|
31
32
|
specs:
|
32
33
|
RedCloth (4.2.9)
|
33
34
|
RedCloth (4.2.9-java)
|
34
|
-
actionmailer (4.2.
|
35
|
-
actionpack (= 4.2.
|
36
|
-
actionview (= 4.2.
|
37
|
-
activejob (= 4.2.
|
35
|
+
actionmailer (4.2.6)
|
36
|
+
actionpack (= 4.2.6)
|
37
|
+
actionview (= 4.2.6)
|
38
|
+
activejob (= 4.2.6)
|
38
39
|
mail (~> 2.5, >= 2.5.4)
|
39
40
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
40
|
-
actionpack (4.2.
|
41
|
-
actionview (= 4.2.
|
42
|
-
activesupport (= 4.2.
|
41
|
+
actionpack (4.2.6)
|
42
|
+
actionview (= 4.2.6)
|
43
|
+
activesupport (= 4.2.6)
|
43
44
|
rack (~> 1.6)
|
44
45
|
rack-test (~> 0.6.2)
|
45
46
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
46
47
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
47
|
-
actionview (4.2.
|
48
|
-
activesupport (= 4.2.
|
48
|
+
actionview (4.2.6)
|
49
|
+
activesupport (= 4.2.6)
|
49
50
|
builder (~> 3.1)
|
50
51
|
erubis (~> 2.7.0)
|
51
52
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
52
53
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
53
|
-
activejob (4.2.
|
54
|
-
activesupport (= 4.2.
|
54
|
+
activejob (4.2.6)
|
55
|
+
activesupport (= 4.2.6)
|
55
56
|
globalid (>= 0.3.0)
|
56
|
-
activemodel (4.2.
|
57
|
-
activesupport (= 4.2.
|
57
|
+
activemodel (4.2.6)
|
58
|
+
activesupport (= 4.2.6)
|
58
59
|
builder (~> 3.1)
|
59
|
-
activerecord (4.2.
|
60
|
-
activemodel (= 4.2.
|
61
|
-
activesupport (= 4.2.
|
60
|
+
activerecord (4.2.6)
|
61
|
+
activemodel (= 4.2.6)
|
62
|
+
activesupport (= 4.2.6)
|
62
63
|
arel (~> 6.0)
|
63
|
-
activesupport (4.2.
|
64
|
+
activesupport (4.2.6)
|
64
65
|
i18n (~> 0.7)
|
65
66
|
json (~> 1.7, >= 1.7.7)
|
66
67
|
minitest (~> 5.1)
|
@@ -87,7 +88,7 @@ GEM
|
|
87
88
|
cliver (0.3.2)
|
88
89
|
cocaine (0.5.8)
|
89
90
|
climate_control (>= 0.0.3, < 1.0)
|
90
|
-
coderay (1.1.
|
91
|
+
coderay (1.1.1)
|
91
92
|
compass (1.0.3)
|
92
93
|
chunky_png (~> 1.2)
|
93
94
|
compass-core (~> 1.0.2)
|
@@ -154,11 +155,11 @@ GEM
|
|
154
155
|
mail (2.6.3)
|
155
156
|
mime-types (>= 1.16, < 3)
|
156
157
|
method_source (0.8.2)
|
157
|
-
mime-types (2.99)
|
158
|
+
mime-types (2.99.1)
|
158
159
|
mini_portile2 (2.0.0)
|
159
160
|
minitest (5.8.4)
|
160
161
|
multi_json (1.11.2)
|
161
|
-
mysql2 (0.4.
|
162
|
+
mysql2 (0.4.3)
|
162
163
|
nokogiri (1.6.7.2)
|
163
164
|
mini_portile2 (~> 2.0.0.rc2)
|
164
165
|
nokogiri (1.6.7.2-java)
|
@@ -188,16 +189,16 @@ GEM
|
|
188
189
|
rack-test (0.6.3)
|
189
190
|
rack (>= 1.0)
|
190
191
|
radius (0.7.4)
|
191
|
-
rails (4.2.
|
192
|
-
actionmailer (= 4.2.
|
193
|
-
actionpack (= 4.2.
|
194
|
-
actionview (= 4.2.
|
195
|
-
activejob (= 4.2.
|
196
|
-
activemodel (= 4.2.
|
197
|
-
activerecord (= 4.2.
|
198
|
-
activesupport (= 4.2.
|
192
|
+
rails (4.2.6)
|
193
|
+
actionmailer (= 4.2.6)
|
194
|
+
actionpack (= 4.2.6)
|
195
|
+
actionview (= 4.2.6)
|
196
|
+
activejob (= 4.2.6)
|
197
|
+
activemodel (= 4.2.6)
|
198
|
+
activerecord (= 4.2.6)
|
199
|
+
activesupport (= 4.2.6)
|
199
200
|
bundler (>= 1.3.0, < 2.0)
|
200
|
-
railties (= 4.2.
|
201
|
+
railties (= 4.2.6)
|
201
202
|
sprockets-rails
|
202
203
|
rails-deprecated_sanitizer (1.0.3)
|
203
204
|
activesupport (>= 4.2.0.alpha)
|
@@ -209,9 +210,9 @@ GEM
|
|
209
210
|
loofah (~> 2.0)
|
210
211
|
rails-observers (0.1.2)
|
211
212
|
activemodel (~> 4.0)
|
212
|
-
railties (4.2.
|
213
|
-
actionpack (= 4.2.
|
214
|
-
activesupport (= 4.2.
|
213
|
+
railties (4.2.6)
|
214
|
+
actionpack (= 4.2.6)
|
215
|
+
activesupport (= 4.2.6)
|
215
216
|
rake (>= 0.8.7)
|
216
217
|
thor (>= 0.18.1, < 2.0)
|
217
218
|
rake (10.5.0)
|
@@ -47,7 +47,7 @@ class Admin::PagesController < Admin::ResourceController
|
|
47
47
|
|
48
48
|
def model_class
|
49
49
|
if Page.descendants.any? { |d| d.to_s == params[:page_class] }
|
50
|
-
params[:page_class]
|
50
|
+
verify_page_class(params[:page_class])
|
51
51
|
elsif params[:page_id]
|
52
52
|
Page.find(params[:page_id]).children
|
53
53
|
else
|
@@ -89,4 +89,12 @@ class Admin::PagesController < Admin::ResourceController
|
|
89
89
|
@meta << {:field => "slug", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 100}]}
|
90
90
|
@meta << {:field => "breadcrumb", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 160}]}
|
91
91
|
end
|
92
|
+
|
93
|
+
def verify_page_class(page_class)
|
94
|
+
if page_class.constantize.class == Page
|
95
|
+
page_class.constantize
|
96
|
+
else
|
97
|
+
raise "I'm not allowed to constantize #{page_class}!"
|
98
|
+
end
|
99
|
+
end
|
92
100
|
end
|
@@ -1,7 +1,14 @@
|
|
1
1
|
class Admin::ReferencesController < ApplicationController
|
2
2
|
def show
|
3
3
|
respond_to do |format|
|
4
|
-
|
4
|
+
render_allowed_type(params[:type])
|
5
|
+
format.any { render :action => @type, :content_type => "text/html", :layout => false }
|
5
6
|
end
|
6
7
|
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def render_allowed_type(type)
|
12
|
+
@type = type
|
13
|
+
end
|
7
14
|
end
|