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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3b33b311c9d9864cbef46a7bf31fb7b7be47c66
4
- data.tar.gz: dd98e4217df28c031e63c78abce3f337adda3b35
3
+ metadata.gz: 7ff33e8c673a3a54ea713b6f1881e04e9787ec3f
4
+ data.tar.gz: 00989add18044cd696fa04fc3890f5fa4a424598
5
5
  SHA512:
6
- metadata.gz: 40314deefc0a596893aff940dd0d946861fba6e83b5ec7eeb53412ce6b55498ee81b975429ce538763b62814abe77e70cc842e08b1d4ecb651a8dee6ea5af540
7
- data.tar.gz: 7d555fe473225b40430ecd780360df36430ca29d6d5e58c528459814b9436b87bada952b670977d5ab8c4ea9d12f85c8f7fdb7042c17c3ea7bef1b240f50eca3
6
+ metadata.gz: c3a85ab3956913fe18aa8c8466fe2ff9655adfcf9366d7ec0ec217f4af0b662afcc9b553c5c2b011ea1aa2530e39dc584d30e846a93a3cdc325b95f5d9f7ce9c
7
+ data.tar.gz: f3810913c32aa8e629735a810d061c9254bc7fdc8349e6d76e00f5c47c9f570535507097a467f93e070324a8e0636f810ac32adea27222d98506544770d23b7f
data/CONTRIBUTORS.md CHANGED
@@ -11,9 +11,11 @@ core:
11
11
  * Aly Fulton
12
12
  * Andrew Miller
13
13
  * Justin Reese
14
- * Patrick Fitzgerald
14
+ * Patrick FitzGerald
15
15
  * Kurtis Rainbolt-Greene
16
16
  * Colin Dean
17
+ * Brittant Martin
18
+ * Danielle Greaves
17
19
 
18
20
  ## Radiant CMS
19
21
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (2.0.16)
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.5.1)
35
- actionpack (= 4.2.5.1)
36
- actionview (= 4.2.5.1)
37
- activejob (= 4.2.5.1)
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.5.1)
41
- actionview (= 4.2.5.1)
42
- activesupport (= 4.2.5.1)
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.5.1)
48
- activesupport (= 4.2.5.1)
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.5.1)
54
- activesupport (= 4.2.5.1)
54
+ activejob (4.2.6)
55
+ activesupport (= 4.2.6)
55
56
  globalid (>= 0.3.0)
56
- activemodel (4.2.5.1)
57
- activesupport (= 4.2.5.1)
57
+ activemodel (4.2.6)
58
+ activesupport (= 4.2.6)
58
59
  builder (~> 3.1)
59
- activerecord (4.2.5.1)
60
- activemodel (= 4.2.5.1)
61
- activesupport (= 4.2.5.1)
60
+ activerecord (4.2.6)
61
+ activemodel (= 4.2.6)
62
+ activesupport (= 4.2.6)
62
63
  arel (~> 6.0)
63
- activesupport (4.2.5.1)
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.0)
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.2)
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.5.1)
192
- actionmailer (= 4.2.5.1)
193
- actionpack (= 4.2.5.1)
194
- actionview (= 4.2.5.1)
195
- activejob (= 4.2.5.1)
196
- activemodel (= 4.2.5.1)
197
- activerecord (= 4.2.5.1)
198
- activesupport (= 4.2.5.1)
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.5.1)
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.5.1)
213
- actionpack (= 4.2.5.1)
214
- activesupport (= 4.2.5.1)
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].constantize
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
- format.any { render :action => params[:type], :content_type => "text/html", :layout => false }
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
data/lib/trusty_cms.rb CHANGED
@@ -2,6 +2,6 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = "2.0.16"
5
+ VERSION = "2.0.17"
6
6
  end
7
7
  end