imagine_cms 3.0.33 → 4.0.0

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: 3bf7289207050c175c1be6bc9765ac9836203aff
4
- data.tar.gz: d8e9377fc8fcbfab30b47ee2f668e0b046a02a62
3
+ metadata.gz: c4924ffa8137573b21030d4e6f6b553e67cd092e
4
+ data.tar.gz: c285cd363f13dfdbed4c2ff566edee7388695aff
5
5
  SHA512:
6
- metadata.gz: d0cc92cc05d455cf3239d07a816b3ffe04f8e4fe7bdbc99ea5c2a870f64f256ae3585b26bcf0540a0d079a44246fb86a08b04a0435c8336b10a8bcf168211237
7
- data.tar.gz: 42addd9d003be5e8295db597a5a1518222f42190799c3b3c1d740b1c358c86638978ed00389c945523a19ea28dc6ceedbd01f8326893e5ae3321d25380d77f53
6
+ metadata.gz: 554ceaa5c17f2e223629180efcbf603f9bfe3cfcf5b3bbba489b06a08a323842fb7017c8a860e5e77251c636c3a2f0a95b55871723dfb263121932789a8f708e
7
+ data.tar.gz: f5c97979963f224c888129093f72a964684c06ff717454787751d972ff6adb967a86bbb98a68a4131214b6d5c38fc967d7e1156857c2b5be4d150ae50d7a9795
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.0.0
1
+ ruby-2.1.3
data/README.rdoc CHANGED
@@ -12,31 +12,41 @@ Imagine was created in the Rails 1.0 days, to run a large number of technically
12
12
 
13
13
  All that is now firmly in the past. By extracting Imagine functionality into a gem (a Rails Engine), we have achieved compatibility with Rails 3.2 and Ruby 1.9 and removed roadblocks to a future upgrade to Rails 4 and Ruby 2, all while remaining backwards compatible with the legacy Imagine CMS database structure.
14
14
 
15
- Of the three original phases of this project, two remain:
16
-
17
15
  * Imagine 3.0 (Rails 3.2, Ruby 1.9): [DONE] 90% restored functionality, no database changes.
18
- * Imagine 3.1 (Rails 3.2, Ruby 1.9/2.0): 100% restored functionality, plus a few extras. May require a few simple migrations.
19
- * Imagine 4.0 (Rails 4.0, Ruby 2.0): Upgrade to Rails 4; refactor & rewrite the worst parts (substitutions); drop ERB templating for something safer, like Liquid; switch to a cross-browser editor; drop Prototype for jQuery; modernize HTML, CSS, JS
16
+ * Imagine 3.1 (Rails 3.2, Ruby 1.9/2.0): [DONE, but released as 3.0.x] 100% restored functionality, plus a few extras and fixes.
17
+ * Imagine 4.0 (Rails 4.x, Ruby 2.1): [IN PROGRESS] Compatibility with Rails 4.0, 4.1, 4.2
18
+ * Imagine 4.1 (Rails 4.x, Ruby 2.1): [PLANNED, Late 2014] Switch to a cross-browser editor
19
+ * Imagine 5.0 (Rails 5.0, Ruby 2.2): [PLANNED, Early 2015] Compatibility with Rails 5.0
20
+
21
+ In the future, there are plans to:
22
+ * refactor & rewrite the worst parts (substitutions, galleries)
23
+ * drop ERB templating for something safer
24
+ * drop Prototype for jQuery
25
+ * modernize the HTML, CSS, JS bits
26
+
27
+ However, this will probably require forking off a separate project (imagine_cms_classic?) to avoid breaking existing sites, while also keeping up with Rails updates.
20
28
 
21
29
  (Imagine 1.x and 2.x version numbers have already been used internally, so we started at 3.0.)
22
30
 
23
31
  =Current Status
24
32
 
25
- Imagine 3.0 is finally ready for production use internally at Bigger Bird, but it's not quite ready for general use yet. Probably still buggy, not all functionality has been properly exercised, and there are no tests yet, I'll tackle this for 4.0 as I modernize the internals.
33
+ Imagine 3.0 is ready for production use (v3.0-stable branch).
34
+
35
+ Imagine 4.0 is in progress on master.
26
36
 
27
- One major feature is still missing: browser-based editing of view layouts and stylesheets. While convenient, this was probably not ever a good idea, so I'm working on a better solution. I've also added a new feature, uploaded images and files can be stored on S3 (galleries still live on the local disk).
37
+ One major feature is still missing: browser-based editing of view layouts and stylesheets. While convenient, this was probably not ever a good idea, so I'm working on a better solution. We've also added a new feature, uploaded images and files can be stored on S3 (galleries still live on the local disk, so in a multiple app server setup, a shared filesystem is required).
28
38
 
29
- Unless you are already familiar with Imagine and/or interested in contributing to development, it might be best to wait until the second phase of this project (Imagine 4). Why? Well, the purpose of Imagine 3 is strictly to port legacy sites to Rails 3.2 as simply as possible. Imagine 3 will always be held back by its need to remain compatible with legacy installations dating back to 2006. The ERB templating language can be dangerous (it allows all Ruby, including shell escapes), and the editor (powered by an ancient version of Dojo) is still Firefox-only. It also uses Prototype, which has become a bit unfashionable these days.
39
+ Unless you are already familiar with Imagine and/or interested in contributing to development, this project is not suitable for wider use just yet. Why? Well, the purpose of the Imagine gem at this point is strictly to upgrade legacy sites to modern versions of Rails as simply as possible. Until imagine_cms_classic is forked, this project will be held back by its need to remain compatible with legacy installations dating back to 2006. The ERB templating language can be dangerous (it allows all Ruby, including shell escapes), and the editor (powered by an ancient version of Dojo) is still Firefox-only. It also uses Prototype, which has become a bit unfashionable these days.
30
40
 
31
- Imagine 4 will be a clean break from all of these "traditions," and thus will be a good time to get on board.
41
+ If we can make a clean break from all of these "traditions," that will be a good time to get on board.
32
42
 
33
43
  =Hosting
34
44
 
35
- Imagine 3 can run on most "standard" Rails hosting platforms, anything that uses Passenger, Unicorn, etc. On hosts that don't allow (or recommend) writing to the local filesystem (e.g. Heroku) you won't be able to use photo galleries or page caching, but other features should work (this has not been tested).
45
+ Imagine can run on most "standard" Rails hosting platforms, anything that uses Passenger, Unicorn, etc. On hosts that don't allow (or recommend) writing to the local filesystem (e.g. Heroku) you won't be able to use photo galleries or page caching, but other features should work (this has not been tested).
36
46
 
37
47
  =Getting Help
38
48
 
39
- Get paid support and hosting for Imagine CMS straight from the people who made it: {Bigger Bird Creative, Inc.}[https://www.biggerbird.com] Neither is required, of course. :-) Free support is up top (Issues).
49
+ Get paid support and hosting for Imagine CMS straight from the people who made it: {Bigger Bird Creative, Inc.}[https://www.biggerbird.com] Neither is required, of course. :-) (Free support via Issues.)
40
50
 
41
51
  =Customizing & Contributing
42
52
 
@@ -50,7 +60,7 @@ File/code changes:
50
60
  * Rename all .rhtml files to .html.erb, .rxml to .xml.builder
51
61
  * Find and replace: RAILS_ROOT => Rails.root
52
62
  * Find and replace: SITE_ROOT => Rails.root
53
- * Find and replace: RAILS_ENV => Rails.env (not all instances: constants only, leave environment variables)
63
+ * Find and replace: RAILS_ENV => Rails.env (constants only! leave the environment variables)
54
64
 
55
65
  Assets:
56
66
  * Delete prototype.js, effect.js, controls.js, dragdrop.js, imagine.js, reset.css, manage.css; move everything else to assets
@@ -1,5 +1,9 @@
1
1
  module Cms # :nodoc:
2
2
  class ContentController < ::ApplicationController # :nodoc:
3
+ include ActionController::Caching::Actions
4
+ include ActionController::Caching::Pages
5
+ self.page_cache_directory = "#{Rails.root}/public"
6
+
3
7
  caches_action :rss_feed
4
8
 
5
9
  before_filter :convert_content_path
@@ -143,7 +147,7 @@ module Cms # :nodoc:
143
147
  params[:page] = 'index'
144
148
  end
145
149
 
146
- if @pg = CmsPage.find_by_path(db_path.join('/'), :include => [ :template ])
150
+ if @pg = CmsPage.includes(:template).find_by_path(db_path.join('/'))
147
151
  if edit_mode
148
152
  redirect_to :controller => '/management/cms', :action => 'edit_page_content', :id => @pg and return true
149
153
  else
@@ -316,9 +320,10 @@ module Cms # :nodoc:
316
320
  end
317
321
 
318
322
  def preview_template
319
- @pg = CmsPage.find(1)
323
+ @pg = CmsPage.new
320
324
  @pg.template = CmsTemplate.new
321
- @pg.template.assign_attributes(params[:temp] || params[:snip] || {})
325
+ @pg.template.name = (params[:temp] || params[:snip])[:name] || 'New Template'
326
+ @pg.template.content = (params[:temp] || params[:snip])[:content]
322
327
  @page_objects = HashObject.new
323
328
  render :inline => substitute_placeholders(@pg.template.content, @pg), :layout => 'application'
324
329
  end
@@ -374,21 +379,21 @@ module Cms # :nodoc:
374
379
  template_content.gsub!(/<(%.*?\%x\s?\[.*?\s*%)>/, '&lt;\1&gt;')
375
380
  template_content.gsub!(/<(%.*?\`.*?\s*%)>/, '&lt;\1&gt;')
376
381
 
377
- silence do
382
+ # silence do
378
383
  template_content = render_to_string(:inline => template_content,
379
384
  :locals => { :page => page, :safe_level => 0 })
380
- end
385
+ # end
381
386
 
382
387
  template_content = substitute_placeholders(template_content, page)
383
388
  template_content.gsub!(/<(%.*?(exec|system)\s?\(.*?\s*%)>/, '&lt;\1&gt;')
384
389
  template_content.gsub!(/<(%.*?\%x\s?\[.*?\s*%)>/, '&lt;\1&gt;')
385
390
  template_content.gsub!(/<(%.*?\`.*?\s*%)>/, '&lt;\1&gt;')
386
391
 
387
- silence do
392
+ # silence do
388
393
  template_content = render_to_string(:inline => template_content,
389
394
  :layout => 'application',
390
395
  :locals => { :page => page })
391
- end
396
+ # end
392
397
 
393
398
  template_content
394
399
  end
@@ -1,4 +1,7 @@
1
1
  class Management::CmsController < Management::ApplicationController # :nodoc:
2
+ include ActionController::Caching::Pages
3
+ self.page_cache_directory = "#{Rails.root}/public"
4
+
2
5
  before_filter :check_permissions
3
6
  before_filter :block_basic_users, :except => [
4
7
  :index, :edit_page_content,
@@ -18,7 +21,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
18
21
  :image_details, :update_caption,
19
22
  :delete_photo, :delete_gallery,
20
23
 
21
- :pages, :list_pages, :edit_page, :page_attribute, :set_page_version
24
+ :pages, :list_pages, :edit_page, :show_template_options, :page_attribute, :set_page_version
22
25
  ]
23
26
 
24
27
  before_filter :convert_invalid_chars_in_params
@@ -30,7 +33,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
30
33
 
31
34
  def check_permissions
32
35
  if !user_has_permission?(:manage_cms)
33
- render '/imagine_cms/errors/permission_denied'
36
+ render '/imagine_cms/errors/permission_denied', :layout => false
34
37
  return false
35
38
  end
36
39
  end
@@ -66,7 +69,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
66
69
  end
67
70
  end
68
71
 
69
- return true
72
+ true
70
73
  end
71
74
 
72
75
 
@@ -74,14 +77,14 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
74
77
  end
75
78
 
76
79
  def templates
77
- @temps = CmsTemplate.find(:all, :order => 'name')
80
+ @temps = CmsTemplate.order(:name)
78
81
  end
79
82
 
80
83
  def edit_template
81
84
  @temp = CmsTemplate.find_by_id(params[:id]) || CmsTemplate.new
82
85
 
83
86
  if request.post?
84
- @temp.assign_attributes(params[:temp])
87
+ @temp.assign_attributes(cms_template_params)
85
88
 
86
89
  begin
87
90
  @pg = CmsPage.new
@@ -108,14 +111,14 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
108
111
  end
109
112
 
110
113
  def snippets
111
- @snippets = CmsSnippet.find(:all, :order => 'name')
114
+ @snippets = CmsSnippet.order(:name)
112
115
  end
113
116
 
114
117
  def edit_snippet
115
118
  @snip = CmsSnippet.find_by_id(params[:id]) || CmsSnippet.new
116
119
 
117
120
  if request.post?
118
- @snip.assign_attributes(params[:snip])
121
+ @snip.assign_attributes(cms_snippet_params)
119
122
 
120
123
  begin
121
124
  @pg = CmsPage.new
@@ -199,7 +202,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
199
202
  params[:pg][:expiration_date] = date if params[:pg][:expires] == 'true'
200
203
  end
201
204
 
202
- @pg.assign_attributes(params[:pg])
205
+ @pg.assign_attributes(cms_page_params)
203
206
  unless params[:use_article_date_range].to_i > 0
204
207
  @pg.article_end_date = nil
205
208
  end
@@ -207,9 +210,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
207
210
  @pg.updated_by_username ||= session[:user_username]
208
211
  @pg.published_version = 0 if @pg.respond_to?(:redirect_enabled) && @pg.redirect_enabled
209
212
 
210
- save_function = @pg.new_record? ? 'save' : 'save_without_revision'
211
-
212
- if @pg.send(save_function)
213
+ if @pg.send(@pg.new_record? ? :save : :save_without_revision)
213
214
  # now try to save tags
214
215
  # begin
215
216
  existing_tags = @pg.tags.map(&:name)
@@ -262,8 +263,9 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
262
263
 
263
264
  else
264
265
  # save failed, display errors
266
+ logger.error "Save failed: #{CmsPage.without_revision { @pg.save }} #{@pg.errors.full_messages.join('; ')}"
265
267
  render :update do |page|
266
- page.replace_html 'save_errors', @pg.errors.full_messages.join('<br/>')
268
+ page.replace_html 'save_errors', @pg.errors.full_messages.join('<br>')
267
269
  page << "try { $('btn_next').disabled = false; } catch (e) {}"
268
270
  page << "try { $('btn_finish').disabled = false; } catch (e) {}"
269
271
  page << "try { $('btn_save').disabled = false; $('btn_save').value = 'Save'; } catch (e) {}"
@@ -342,7 +344,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
342
344
 
343
345
  if request.get?
344
346
  @pg.revert_to(params[:version]) if params[:version]
345
- @pg.objects.find(:all, :conditions => [ 'cms_page_version = ?', @pg.version ]).each do |obj|
347
+ @pg.objects.where(:cms_page_version => @pg.version).each do |obj|
346
348
  key = "obj-#{obj.obj_type.to_s}-#{obj.name}"
347
349
  @page_objects[key] = obj.content.html_safe
348
350
  end
@@ -523,7 +525,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
523
525
  end
524
526
 
525
527
  def page_tags_for_lookup
526
- @tags = CmsPageTag.find(:all, :order => 'name').map { |tag| tag.name }.uniq
528
+ @tags = CmsPageTag.order(:name).map { |tag| tag.name }.uniq
527
529
  headers['content-type'] = 'text/javascript'
528
530
  render :layout => false
529
531
  end
@@ -568,7 +570,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
568
570
  begin
569
571
  Mailer.deliver_cms_request_review(url_for(:controller => '/cms/content', :action => 'show', :content_path => []) + @pg.path, @pg.title, @version, u, @user, params[:change_description].to_s)
570
572
  rescue Exception => e
571
- log_error(e)
573
+ logger.error(e)
572
574
  end
573
575
  end
574
576
 
@@ -796,7 +798,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
796
798
  File.unlink(localfile) if localfile != jpgfile
797
799
 
798
800
  rescue Exception => e
799
- log_error(e)
801
+ logger.error(e)
800
802
  end
801
803
  end
802
804
  end
@@ -1059,12 +1061,12 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
1059
1061
  zipentry.extract(localfile)
1060
1062
  last_id += 1
1061
1063
  rescue Exception => e
1062
- log_error(e)
1064
+ logger.error(e)
1063
1065
  end
1064
1066
  end
1065
1067
  rescue Exception => e
1066
1068
  logger.debug params.inspect
1067
- log_error(e)
1069
+ logger.error(e)
1068
1070
  finish_upload_status "''" and return
1069
1071
  end
1070
1072
 
@@ -1357,27 +1359,42 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
1357
1359
 
1358
1360
 
1359
1361
  protected
1360
-
1362
+
1363
+ def cms_page_params
1364
+ params.require(:pg).permit(:cms_template_id, :cms_template_version, :parent_id, :published_version,
1365
+ :name, :title, :path, :html_head, :summary, :position,
1366
+ :article_date, :article_end_date, :published_date, :expiration_date, :expires,
1367
+ :thumbnail_path, :feature_image_path, :redirect_enabled, :redirect_to)
1368
+ end
1369
+
1370
+ def cms_template_params
1371
+ params.require(:temp).permit(:name, :content)
1372
+ end
1373
+
1374
+ def cms_snippet_params
1375
+ params.require(:snip).permit(:name, :content)
1376
+ end
1377
+
1361
1378
  def load_page_objects
1362
1379
  @page_objects = HashObject.new
1363
1380
  @template_options = HashObject.new
1364
1381
 
1365
1382
  if @pg.new_record? && @parent
1366
- @parent.objects.find(:all, :conditions => [ "obj_type = 'attribute'" ]).each do |obj|
1383
+ @parent.objects.where(:obj_type => 'attribute').each do |obj|
1367
1384
  key = "obj-#{obj.obj_type.to_s}-#{obj.name}"
1368
1385
  @page_objects[key] = obj.content
1369
1386
  end
1370
- @parent.objects.find(:all, :conditions => [ "obj_type = 'option'" ]).each do |obj|
1387
+ @parent.objects.where(:obj_type => 'option').each do |obj|
1371
1388
  key = "obj-#{obj.obj_type.to_s}-#{obj.name}"
1372
1389
  @page_objects[key] = obj.content
1373
1390
  end
1374
1391
  else
1375
- @tags = @pg.tags.collect { |t| t.name }.join(', ')
1376
- @pg.objects.find(:all, :conditions => [ "obj_type = 'attribute'" ]).each do |obj|
1392
+ @tags = @pg.tags.map { |t| t.name }.join(', ')
1393
+ @pg.objects.where(:obj_type => 'attribute').each do |obj|
1377
1394
  key = "obj-#{obj.obj_type.to_s}-#{obj.name}"
1378
1395
  @page_objects[key] = obj.content
1379
1396
  end
1380
- @pg.objects.find(:all, :conditions => [ "obj_type = 'option'" ]).each do |obj|
1397
+ @pg.objects.where(:obj_type => 'option').each do |obj|
1381
1398
  key = "obj-#{obj.obj_type.to_s}-#{obj.name}"
1382
1399
  @page_objects[key] = obj.content
1383
1400
  end
@@ -1503,7 +1520,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
1503
1520
  # some error handling here
1504
1521
  session[:broken_galleries] << File.basename(g)
1505
1522
 
1506
- log_error(e)
1523
+ logger.error(e)
1507
1524
  end
1508
1525
  end
1509
1526
  end
@@ -1,69 +1,5 @@
1
1
  module CmsApplicationHelper
2
2
 
3
- # Saves the current request to the session so that it can be replayed later
4
- # (for example, after authentication). Only params of type String, Hash and
5
- # Array will be saved. save_request is called in a before_filter in
6
- # application.rb.
7
- #
8
- # Two levels of saved params are required so that params can be unsaved in
9
- # the event of a 404 or other event that would make the current param set an
10
- # unlikely or undesirable candidate for replaying.
11
- def save_user_request
12
- return if params[:action] == 'login'
13
-
14
- session[:old_saved_user_uri] = session[:saved_user_uri];
15
- session[:old_saved_user_params] = session[:saved_user_params] || {};
16
- saved_params = params.reject { |k, v| !(v.kind_of?(String) || v.kind_of?(Hash) || v.kind_of?(Array)) }
17
- saved_params.each { |key, val| saved_params[key] = val.reject { |k, v| !(v.kind_of?(String) || v.kind_of?(Hash) || v.kind_of?(Array)) } if val.kind_of?(Hash) }
18
- session[:saved_user_uri] = request.url
19
- session[:saved_user_params] = saved_params
20
- end
21
-
22
- # Returns a User object corresponding to the currently logged in user, or returns false
23
- # and redirects to the login page if not logged in.
24
- def authenticate_user
25
- # if user is not logged in, record the current request and redirect
26
- if !session[:user_authenticated]
27
- if User.find(:all).size == 0
28
- flash[:notice] = 'No users exist in the system. Please create one now.'
29
- redirect_to :controller => '/management/user', :action => 'create_first'
30
- else
31
- flash[:notice] = 'This is an admin-only function. To continue, please log in.'
32
- save_user_request
33
- redirect_to :controller => '/management/user', :action => 'login'
34
- end
35
-
36
- return false
37
- end
38
-
39
- @user = User.find(session[:user_id]) rescue nil
40
- session[:user_is_superuser] = @user.is_superuser? rescue nil
41
-
42
- @user
43
- end
44
-
45
- # Takes a symbol/string or array of symbols/strings and returns true if user has all
46
- # of the named permissions.
47
- def user_has_permissions?(*permission_set)
48
- return false if !(@user ||= authenticate_user)
49
-
50
- permission_set = [ permission_set ] unless permission_set.is_a?(Array)
51
-
52
- if session[:user_is_superuser]
53
- permission_set.each { |perm| session["user_can_#{perm}".to_sym] = true }
54
- return true
55
- end
56
-
57
- has_permissions = true
58
- permission_set.each do |perm|
59
- session["user_can_#{perm}".to_sym] = (@user.send("can_#{perm}").to_i == 1)
60
- has_permissions = has_permissions && session["user_can_#{perm}".to_sym]
61
- end
62
-
63
- has_permissions
64
- end
65
- alias :user_has_permission? :user_has_permissions?
66
-
67
3
  # Returns true if a Member is logged in.
68
4
  def is_logged_in?
69
5
  session[:authenticated]
@@ -104,21 +40,21 @@ module CmsApplicationHelper
104
40
 
105
41
  ### COMPAT: convert_content_path
106
42
  def convert_content_path
107
- logger.debug "DEPRECATION WARNING (Imagine CMS) WARNING: convert_content_path called"
43
+ # logger.debug "DEPRECATION WARNING (Imagine CMS) WARNING: convert_content_path called"
108
44
  params[:content_path] = params[:content_path].to_s.split('/') rescue []
109
45
  end
110
46
 
111
47
  ### COMPAT - template_exists?
112
48
  def template_exists?(template, extension = nil)
113
49
  # ignore extension
114
- logger.debug("DEPRECATION WARNING (Imagine CMS) WARNING: template_exists? called")
50
+ # logger.debug("DEPRECATION WARNING (Imagine CMS) WARNING: template_exists? called")
115
51
  partial = File.join(File.dirname(template), '_' + File.basename(template))
116
52
  lookup_context.find_all(template).any? || lookup_context.find_all(partial).any?
117
53
  end
118
54
 
119
55
  ### COMPAT - template_exists?
120
56
  def url_for_current
121
- logger.debug("DEPRECATION WARNING (Imagine CMS) WARNING: url_for_current called")
57
+ # logger.debug("DEPRECATION WARNING (Imagine CMS) WARNING: url_for_current called")
122
58
  request.fullpath
123
59
  end
124
60
 
@@ -134,13 +70,6 @@ module CmsApplicationHelper
134
70
  return ''
135
71
  end
136
72
 
137
- ### COMPAT - log_error
138
- def log_error(e)
139
- # noop
140
- logger.debug("DEPRECATION WARNING (Imagine CMS) WARNING: log_error called")
141
- logger.error(e)
142
- end
143
-
144
73
  def convert_invalid_chars_in_params
145
74
  dig_deep(params) { |s| convert_invalid_chars!(s) }
146
75
  end
@@ -291,21 +220,12 @@ module CmsApplicationHelper
291
220
  end
292
221
 
293
222
  @page_objects = HashObject.new
294
- conditions = [ 'cms_page_version = ?' ]
295
- cond_vars = [ @pg.version ]
296
-
297
- if obj_type
298
- conditions << 'obj_type = ?'
299
- cond_vars << obj_type
300
- end
301
- if name
302
- conditions << 'name = ?'
303
- cond_vars << name
304
- end
223
+ query = @pg.objects.where(:cms_page_version => @pg.version)
224
+ query = query.where(:obj_type => obj_type) if obj_type
225
+ query = query.where(:name => name) if name
226
+ query.each { |obj| @page_objects["obj-#{obj.obj_type.to_s}-#{obj.name}"] = obj.content }
305
227
 
306
- @pg.objects.find(:all, :conditions => [ conditions.join(' and ') ].concat(cond_vars)).each do |obj|
307
- @page_objects["obj-#{obj.obj_type.to_s}-#{obj.name}"] = obj.content
308
- end
228
+ @page_objects
309
229
  end
310
230
 
311
231
  def page_list_items(pg, key, options = {})
@@ -423,17 +343,17 @@ module CmsApplicationHelper
423
343
  if f.expand_folders && f.expand_folders == 'false'
424
344
  f.src = f.src.slice(1...f.src.length) if f.src.slice(0,1) == '/'
425
345
  parent_page = CmsPage.find_by_path(f.src)
426
- pages.concat parent_page.children.find(:all, :include => [ :tags ], :conditions => [ conditions.join(' and ') ].concat(cond_vars))
346
+ pages.concat parent_page.children.includes(:tags).where([ conditions.join(' and ') ].concat(cond_vars)).to_a
427
347
  else
428
348
  if f.src == '/'
429
- pages.concat CmsPage.find(:all, :include => [ :tags ], :conditions => [ conditions.join(' and ') ].concat(cond_vars))
349
+ pages.concat CmsPage.includes(:tags).where([ conditions.join(' and ') ].concat(cond_vars))
430
350
  else
431
351
  f.src = f.src.slice(1...f.src.length) if f.src.slice(0,1) == '/'
432
352
  fconditions = conditions.dup
433
353
  fconditions << 'path like ?'
434
354
  fcond_vars = cond_vars.dup
435
355
  fcond_vars << f.src+'/%'
436
- pages.concat CmsPage.find(:all, :include => [ :tags ], :conditions => [ fconditions.join(' and ') ].concat(fcond_vars))
356
+ pages.concat CmsPage.includes(:tags).where([ fconditions.join(' and ') ].concat(fcond_vars))
437
357
  end
438
358
  end
439
359
  rescue Exception => e
@@ -443,7 +363,7 @@ module CmsApplicationHelper
443
363
 
444
364
  # pull all include tag content
445
365
  include_tags.each do |tag|
446
- pages.concat CmsPageTag.find_all_by_name(tag, :include => [ :page ], :conditions => [ conditions.join(' and ') ].concat(cond_vars)).map { |cpt| cpt.page }
366
+ pages.concat CmsPageTag.where(:name => tag).includes(:page).references(:page).where([ conditions.join(' and ') ].concat(cond_vars)).map { |cpt| cpt.page }
447
367
  end
448
368
 
449
369
  # dump anything that has an excluded tag
@@ -533,10 +453,10 @@ module CmsApplicationHelper
533
453
  end
534
454
 
535
455
  # next, page object attributes and template options (from page properties)
536
- page.objects.find(:all, :conditions => [ "obj_type = 'attribute'" ]).each do |obj|
456
+ page.objects.where(:obj_type => 'attribute').each do |obj|
537
457
  temp.gsub!(/<#\s*#{obj.name}\s*#>/, (obj.content || '').to_s)
538
458
  end
539
- page.objects.find(:all, :conditions => [ "obj_type = 'option'" ]).each do |obj|
459
+ page.objects.where(:obj_type => 'option').each do |obj|
540
460
  temp.gsub!(/<#\s*option_#{obj.name.gsub(/[^\w\d]/, '_')}\s*#>/, obj.content || '')
541
461
  end
542
462
 
@@ -608,7 +528,7 @@ module CmsApplicationHelper
608
528
  @template_options[name] = type
609
529
 
610
530
  key = name.gsub(/[^\w\d]/, '_')
611
- obj = @pg.objects.find_by_name("#{type}-#{key}", :conditions => [ "obj_type = 'option'" ])
531
+ obj = @pg.objects.where(:name => "#{type}-#{key}", :obj_type => 'option').first
612
532
  return nil unless obj
613
533
 
614
534
  case type
@@ -937,7 +857,7 @@ EOF
937
857
 
938
858
  first_of_month = Time.utc(@year, @month, 1)
939
859
  last_of_month = first_of_month.end_of_month
940
- events = @calendar.events.find(:all, :conditions => [ 'start_date >= ? and start_date <= ?', first_of_month, last_of_month ])
860
+ events = @calendar.events.where('start_date >= ? and start_date <= ?', first_of_month, last_of_month)
941
861
 
942
862
  @event_days = {}
943
863
  events.each do |e|
@@ -2,13 +2,6 @@ class CmsPage < ActiveRecord::Base
2
2
  include ActiveModel::Dirty
3
3
  include ActsAsTree
4
4
 
5
- attr_accessible :cms_template_id, :cms_template_version, :parent_id,
6
- :name, :title, :path, :html_head, :summary, :position,
7
- :article_date, :article_end_date, :published_date, :expiration_date, :expires,
8
- :thumbnail_path, :feature_image_path, :comment_count, :version, :published_version,
9
- :search_index, :updated_by, :updated_by_username,
10
- :redirect_enabled, :redirect_to
11
-
12
5
  acts_as_versioned
13
6
  acts_as_tree :order => 'path'
14
7
 
@@ -16,7 +9,7 @@ class CmsPage < ActiveRecord::Base
16
9
  has_many :objects, :class_name => 'CmsPageObject', :dependent => :destroy
17
10
  has_many :tags, :class_name => 'CmsPageTag', :dependent => :destroy
18
11
  has_many :versions, :class_name => 'CmsPageVersion', :dependent => :destroy
19
- has_many :sub_pages, :class_name => 'CmsPage', :foreign_key => :parent_id, :conditions => [ 'published_version >= 0' ], :order => 'position, title, name'
12
+ has_many :sub_pages, -> { where('published_version >= 0').order(:position, :title, :name) }, :class_name => 'CmsPage', :foreign_key => :parent_id
20
13
 
21
14
  validates_format_of :name, :with => /\A[-\w\d%]+\Z/
22
15
  validates_uniqueness_of :path, :message => 'conflicts with an existing page'
@@ -60,12 +53,12 @@ class CmsPage < ActiveRecord::Base
60
53
  end
61
54
 
62
55
  def self.index_all
63
- CmsPage.find(:all, :conditions => [ 'search_index is null' ]).each { |pg| pg.update_index ; pg.save_without_revision }
56
+ where('search_index is null').each(&:update_index!)
64
57
  true
65
58
  end
66
59
 
67
60
  def self.reindex_all
68
- CmsPage.find(:all).each { |pg| pg.update_index ; pg.save_without_revision }
61
+ find_each(&:update_index!)
69
62
  true
70
63
  end
71
64
 
@@ -102,6 +95,11 @@ class CmsPage < ActiveRecord::Base
102
95
  self.search_index = sanitize_index(content)
103
96
  end
104
97
 
98
+ def update_index!
99
+ update_index
100
+ self.class.without_revision { save }
101
+ end
102
+
105
103
  def set_parent_id!(new_id)
106
104
  self.parent_id = new_id
107
105
  self.save_without_revision
@@ -116,24 +114,25 @@ class CmsPage < ActiveRecord::Base
116
114
  def article_date_yr ; article_date.strftime("%y").to_i ; end
117
115
 
118
116
 
119
- private
120
-
121
- def sanitize_index(html)
122
- return html if html.blank?
123
- if html.index("<")
124
- text = ""
125
- tokenizer = HTML::Tokenizer.new(html)
117
+ protected
118
+
119
+ def sanitize_index(html)
120
+ return html if html.blank?
121
+ if html.index("<")
122
+ text = ""
123
+ tokenizer = HTML::Tokenizer.new(html)
126
124
 
127
- while token = tokenizer.next
128
- node = HTML::Node.parse(nil, 0, 0, token, false)
129
- # result is only the content of any Text nodes
130
- text << node.to_s if node.class == HTML::Text
131
- end
132
- # strip any comments, and if they have a newline at the end (ie. line with
133
- # only a comment) strip that too, as well as any erb stuff
134
- text.gsub(/<!--(.*?)-->[\n]?/m, "").gsub(/\<%.*?%\>/m, '').gsub(/&\w+;/, '')
135
- else
136
- html # already plain text
137
- end
138
- end
125
+ while token = tokenizer.next
126
+ node = HTML::Node.parse(nil, 0, 0, token, false)
127
+ # result is only the content of any Text nodes
128
+ text << node.to_s if node.class == HTML::Text
129
+ end
130
+ # strip any comments, and if they have a newline at the end (ie. line with
131
+ # only a comment) strip that too, as well as any erb stuff
132
+ text.gsub(/<!--(.*?)-->[\n]?/m, "").gsub(/\<%.*?%\>/m, '').gsub(/&\w+;/, '')
133
+ else
134
+ html # already plain text
135
+ end
136
+ end
137
+
139
138
  end
@@ -1,5 +1,5 @@
1
1
  class CmsPageObject < ActiveRecord::Base
2
- attr_accessible :name, :obj_type
2
+ # attr_accessible :name, :obj_type
3
3
 
4
4
  belongs_to :page, :class_name => 'CmsPage', :foreign_key => 'cms_page_id'
5
5
 
@@ -1,5 +1,5 @@
1
1
  class CmsPageTag < ActiveRecord::Base
2
- attr_accessible :name
2
+ # attr_accessible :name
3
3
 
4
4
  belongs_to :page, :class_name => 'CmsPage', :foreign_key => 'cms_page_id'
5
5
 
@@ -1,8 +1,6 @@
1
1
  class CmsSnippet < ActiveRecord::Base
2
2
  acts_as_versioned
3
3
 
4
- attr_accessible :name, :content
5
-
6
4
  def content=(value)
7
5
  if value && value.is_a?(String)
8
6
  # filter suspicious content... go overboard for now, fine-tune later perhaps
@@ -1,15 +1,12 @@
1
1
  class CmsTemplate < ActiveRecord::Base
2
2
  acts_as_versioned
3
3
 
4
- attr_accessible :name, :content
5
4
  attr_accessor :options
6
5
 
7
6
  has_many :pages, :class_name => 'CmsPage'
8
7
 
9
- def after_find
10
- require 'yaml'
11
- @options = YAML.load(self.options_yaml) if self.options_yaml
12
- end
8
+ after_find :deserialize_yaml
9
+ before_save :serialize_yaml
13
10
 
14
11
  def content=(value)
15
12
  if value && value.is_a?(String)
@@ -21,8 +18,11 @@ class CmsTemplate < ActiveRecord::Base
21
18
  super(value)
22
19
  end
23
20
 
24
- def before_save
25
- require 'yaml'
21
+ def deserialize_yaml
22
+ @options = YAML.load(self.options_yaml) if self.options_yaml
23
+ end
24
+
25
+ def serialize_yaml
26
26
  self.options_yaml = YAML.dump(@options)
27
27
  end
28
28
 
data/app/models/user.rb CHANGED
@@ -2,7 +2,7 @@ class User < ActiveRecord::Base # :nodoc:
2
2
  require 'dynamic_methods'
3
3
  include DynamicMethods
4
4
 
5
- attr_accessible :first_name, :last_name
5
+ # attr_accessible :first_name, :last_name
6
6
  attr_reader :password # :nodoc:
7
7
 
8
8
  has_and_belongs_to_many :groups, :class_name => 'UserGroup', :join_table => 'user_group_memberships'
@@ -10,12 +10,16 @@ class CmsContentSweeper < ActionController::Caching::Sweeper
10
10
  end
11
11
 
12
12
  def delete_all_cached_pages
13
- # expire home page
14
- expire_page :controller => 'cms/content', :action => 'show', :content_path => nil
15
-
16
- # expire all other pages
17
- CmsPage.select([ :id, :path ]).find_each do |page|
18
- expire_page :controller => 'cms/content', :action => 'show', :content_path => page.path.split('/')
13
+ if File.expand_path(Management::CmsController.page_cache_directory) == File.expand_path("#{Rails.root}/public")
14
+ # expire home page
15
+ expire_page :controller => 'cms/content', :action => 'show', :content_path => nil
16
+
17
+ # expire all other pages
18
+ CmsPage.select([ :id, :path ]).find_each do |page|
19
+ expire_page :controller => 'cms/content', :action => 'show', :content_path => page.path.split('/')
20
+ end
21
+ else
22
+ FileUtils.rm_r(Dir.glob("#{cache_dir}/*")) rescue Errno::ENOENT
19
23
  end
20
24
  end
21
25
 
@@ -38,4 +38,4 @@
38
38
  <%- end -%>
39
39
 
40
40
  <%=raw @cms_head %>
41
- <%= @pg.html_head.html_safe if @pg && @pg.respond_to?(:html_head) %>
41
+ <%=raw @pg.html_head if @pg && @pg.respond_to?(:html_head) %>
@@ -53,7 +53,7 @@
53
53
  <tr class="page-field">
54
54
  <td valign="top"><div style="margin-top: 4px;">Template:</div></td>
55
55
  <td>
56
- <%= select :pg, :cms_template_id, CmsTemplate.find(:all, :order => 'name').collect { |t| [ t.name, t.id ] }, {}, :class => 'form', :style => 'width: 100%;' %>
56
+ <%= select :pg, :cms_template_id, CmsTemplate.order(:name).map { |t| [ t.name, t.id ] }, {}, :class => 'form', :style => 'width: 100%;' %>
57
57
 
58
58
  <div id="edit_page_template_options">
59
59
  <%= render :partial => 'template_options' %>
@@ -39,7 +39,7 @@
39
39
  </td>
40
40
  </tr>
41
41
  </table>
42
- <% end -%>
42
+ <% end %>
43
43
 
44
44
 
45
45
  <%= form_tag({ :controller => '/cms/content', :action => 'preview_template' }, :id => 'preview_form', :target => 'preview_frame') do %>
data/config/routes.rb CHANGED
@@ -1,13 +1,12 @@
1
1
  Rails.application.routes.draw do
2
-
3
2
  # management
4
- match 'manage' => 'management/default#index'
5
- match 'manage/login' => 'management/user#login'
6
- match 'manage/logout' => 'management/user#logout'
7
- match 'manage/user(/:action(/:id))' => 'management/user'
3
+ match 'manage' => 'management/default#index', :via => [ :get ]
4
+ match 'manage/login' => 'management/user#login', :via => [ :get, :post ]
5
+ match 'manage/logout' => 'management/user#logout', :via => [ :get, :post ]
6
+ match 'manage/user(/:action(/:id))' => 'management/user', :via => [ :get, :post ]
8
7
 
9
- match 'manage/cms/preview_template' => 'cms/content#preview_template'
10
- match 'manage/cms(/:action(/:id))' => 'management/cms'
8
+ match 'manage/cms/preview_template' => 'cms/content#preview_template', :via => [ :post ]
9
+ match 'manage/cms(/:action(/:id))' => 'management/cms', :via => [ :get, :post ]
11
10
 
12
11
  # slowly convert to resourceful routes
13
12
  # match 'manage/users(/:action(/:id))' => 'management/users'
@@ -20,11 +19,10 @@ Rails.application.routes.draw do
20
19
  end
21
20
  # end
22
21
 
23
- match 'util/date_picker' => 'util#date_picker', :as => :date_picker
22
+ match 'util/date_picker' => 'util#date_picker', :as => :date_picker, :via => [ :get, :post ]
24
23
 
25
24
  # primary CMS content routes
26
25
  root :to => 'cms/content#show'
27
- match 'rss/:page_id/:page_list_name' => 'cms/content#rss_feed'
28
- match '*content_path' => 'cms/content#show'
29
-
26
+ match 'rss/:page_id/:page_list_name' => 'cms/content#rss_feed', :via => [ :get ]
27
+ match '*content_path' => 'cms/content#show', :via => [ :get, :post ]
30
28
  end
@@ -0,0 +1,6 @@
1
+ class AddRedirectFieldsToCmsPageVersions < ActiveRecord::Migration
2
+ def change
3
+ add_column :cms_page_versions, :redirect_enabled, :boolean, :null => false, :default => false
4
+ add_column :cms_page_versions, :redirect_to, :text
5
+ end
6
+ end
data/imagine_cms.gemspec CHANGED
@@ -19,23 +19,27 @@ Gem::Specification.new do |s|
19
19
  s.required_rubygems_version = '>= 1.8.11'
20
20
 
21
21
  s.license = 'AGPLv3'
22
-
22
+
23
23
  s.rubyforge_project = "imagine_cms"
24
24
 
25
25
  s.files = `git ls-files`.split("\n")
26
26
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
27
27
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
28
28
  s.require_paths = ["lib"]
29
-
30
- s.add_dependency "rails", "~> 3.2.16"
31
- s.add_dependency "prototype-rails", "~> 3.2.0"
29
+
30
+ s.add_dependency "rails", [ ">= 4.0.9", "< 5.0" ]
31
+ s.add_dependency "rails-observers", "~> 0.1"
32
+ s.add_dependency "actionpack-action_caching", "~> 1.0"
33
+ s.add_dependency "actionpack-page_caching", "~> 1.0"
34
+ s.add_dependency "prototype-rails", "~> 4.0.0"
32
35
  s.add_dependency "aws-s3", "~> 0.6.3"
33
36
  s.add_dependency "rmagick"
34
37
  s.add_dependency "mini_magick", "~> 3.3"
35
38
  s.add_dependency "rubyzip", "~> 1.0"
36
39
  s.add_dependency "rinku", "~> 1.7.2"
37
- s.add_dependency "net-dns", "~> 0.7.1"
40
+ s.add_dependency "net-dns", "~> 0.7"
38
41
  s.add_dependency "acts_as_tree", "~> 1.1"
39
-
42
+ s.add_dependency "safe_yaml"
43
+
40
44
  s.add_development_dependency "sqlite3"
41
45
  end
@@ -10,7 +10,7 @@ module ActionView::Helpers::TextHelper
10
10
  re = %r{
11
11
  (<\w+[^\<\>]*?\>|[\s[:punct:]]|mailto:|^) # leading text
12
12
  (
13
- [\w\.\!\#\$\%\-\+\.]+ # username
13
+ [\w\.\!\#\$\%\-\+\.\/]+ # username
14
14
  \@
15
15
  [-\w]+ # subdomain or domain
16
16
  (?:\.[-\w]+)+ # remaining subdomains or domain
@@ -4,6 +4,64 @@ module ActionControllerExtensions
4
4
  end
5
5
 
6
6
  module InstanceMethods
7
+
8
+ # Takes a symbol/string or array of symbols/strings and returns true if user has all
9
+ # of the named permissions.
10
+ def user_has_permissions?(*permission_set)
11
+ return false if !(@user ||= authenticate_user)
12
+
13
+ permission_set = [ permission_set ] unless permission_set.is_a?(Array)
14
+
15
+ if session[:user_is_superuser]
16
+ permission_set.each { |perm| session["user_can_#{perm}".to_sym] = true }
17
+ return true
18
+ end
19
+
20
+ has_permissions = true
21
+ permission_set.each do |perm|
22
+ session["user_can_#{perm}".to_sym] = (@user.send("can_#{perm}").to_i == 1)
23
+ has_permissions = has_permissions && session["user_can_#{perm}".to_sym]
24
+ end
25
+
26
+ has_permissions
27
+ end
28
+ alias :user_has_permission? :user_has_permissions?
29
+
30
+ # Saves the current request to the session so that it can be replayed later
31
+ # (for example, after authentication). Only params of type String, Hash and
32
+ # Array will be saved. save_request is called in a before_filter in
33
+ # application.rb.
34
+ #
35
+ # Two levels of saved params are required so that params can be unsaved in
36
+ # the event of a 404 or other event that would make the current param set an
37
+ # unlikely or undesirable candidate for replaying.
38
+ def save_user_request
39
+ return if params[:action] == 'login'
40
+
41
+ session[:old_saved_user_uri] = session[:saved_user_uri];
42
+ session[:old_saved_user_params] = session[:saved_user_params] || {};
43
+ saved_params = params.reject { |k, v| !(v.kind_of?(String) || v.kind_of?(Hash) || v.kind_of?(Array)) }
44
+ saved_params.each { |key, val| saved_params[key] = val.reject { |k, v| !(v.kind_of?(String) || v.kind_of?(Hash) || v.kind_of?(Array)) } if val.kind_of?(Hash) }
45
+ session[:saved_user_uri] = request.url
46
+ session[:saved_user_params] = saved_params
47
+ end
48
+
49
+ # Returns a User object corresponding to the currently logged in user, or returns false
50
+ # and redirects to the login page if not logged in.
51
+ def authenticate_user
52
+ # if user is not logged in, record the current request and redirect
53
+ if !session[:user_authenticated]
54
+ flash[:notice] = 'This is an admin-only function. To continue, please log in.'
55
+ save_user_request
56
+ redirect_to :controller => '/management/user', :action => 'login' and return false
57
+ end
58
+
59
+ @user = User.find(session[:user_id]) rescue nil
60
+ session[:user_is_superuser] = @user.is_superuser? rescue nil
61
+
62
+ @user
63
+ end
64
+
7
65
  def expire_session_data # :nodoc:
8
66
  # make sure this is not the first run (session being initialized)
9
67
  if session[:last_active]
@@ -8,6 +8,12 @@ module ImagineCms
8
8
 
9
9
  initializer "imagine_cms.assets.precompile" do |config|
10
10
  Rails.application.config.assets.precompile += %w( codepress/** dojo/** management.css imagine_controls.css reset.css )
11
+ # Rails.application.config.load_paths << File.dirname(__FILE__) + "/../app/helpers"
12
+ end
13
+
14
+ initializer 'imagine_cms.load_helpers' do |app|
15
+ ActionController::Base.send :include, CmsApplicationHelper
16
+ # ActionView::Base.send :include, CmsApplicationHelper
11
17
  end
12
18
 
13
19
  def self.activate
@@ -24,6 +30,9 @@ module ImagineCms
24
30
  #
25
31
  # activate gems as needed
26
32
  #
33
+ require 'rails-observers'
34
+ require 'actionpack/action_caching'
35
+ require 'actionpack/page_caching'
27
36
  require 'prototype-rails'
28
37
  require 'aws/s3'
29
38
  require 'RMagick'
@@ -32,6 +41,7 @@ module ImagineCms
32
41
  require 'rails_rinku'
33
42
  require 'net/dns'
34
43
  require 'acts_as_tree'
44
+ require 'safe_yaml'
35
45
 
36
46
  #
37
47
  # rails plugins
@@ -70,9 +80,8 @@ module ImagineCms
70
80
  include PrototypeHelper # from prototype_legacy_helper
71
81
  helper PrototypeHelper
72
82
 
73
- include CmsApplicationHelper
74
- helper CmsApplicationHelper
75
-
83
+ helper_method :user_has_permission?
84
+ helper_method :user_has_permissions?
76
85
  helper_method :insert_object
77
86
 
78
87
  # before_filter :create_settings_object, :set_default_session_values, :check_ssl_requirement, :expire_session_data
@@ -1,3 +1,3 @@
1
1
  module ImagineCms
2
- VERSION = "3.0.33"
2
+ VERSION = "4.0.0"
3
3
  end
metadata CHANGED
@@ -1,153 +1,215 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imagine_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.33
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Namba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-13 00:00:00.000000000 Z
11
+ date: 2014-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.16
19
+ version: 4.0.9
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 4.0.9
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: rails-observers
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.1'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.1'
47
+ - !ruby/object:Gem::Dependency
48
+ name: actionpack-action_caching
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: actionpack-page_caching
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.0'
20
68
  type: :runtime
21
69
  prerelease: false
22
70
  version_requirements: !ruby/object:Gem::Requirement
23
71
  requirements:
24
- - - ~>
72
+ - - "~>"
25
73
  - !ruby/object:Gem::Version
26
- version: 3.2.16
74
+ version: '1.0'
27
75
  - !ruby/object:Gem::Dependency
28
76
  name: prototype-rails
29
77
  requirement: !ruby/object:Gem::Requirement
30
78
  requirements:
31
- - - ~>
79
+ - - "~>"
32
80
  - !ruby/object:Gem::Version
33
- version: 3.2.0
81
+ version: 4.0.0
34
82
  type: :runtime
35
83
  prerelease: false
36
84
  version_requirements: !ruby/object:Gem::Requirement
37
85
  requirements:
38
- - - ~>
86
+ - - "~>"
39
87
  - !ruby/object:Gem::Version
40
- version: 3.2.0
88
+ version: 4.0.0
41
89
  - !ruby/object:Gem::Dependency
42
90
  name: aws-s3
43
91
  requirement: !ruby/object:Gem::Requirement
44
92
  requirements:
45
- - - ~>
93
+ - - "~>"
46
94
  - !ruby/object:Gem::Version
47
95
  version: 0.6.3
48
96
  type: :runtime
49
97
  prerelease: false
50
98
  version_requirements: !ruby/object:Gem::Requirement
51
99
  requirements:
52
- - - ~>
100
+ - - "~>"
53
101
  - !ruby/object:Gem::Version
54
102
  version: 0.6.3
55
103
  - !ruby/object:Gem::Dependency
56
104
  name: rmagick
57
105
  requirement: !ruby/object:Gem::Requirement
58
106
  requirements:
59
- - - '>='
107
+ - - ">="
60
108
  - !ruby/object:Gem::Version
61
109
  version: '0'
62
110
  type: :runtime
63
111
  prerelease: false
64
112
  version_requirements: !ruby/object:Gem::Requirement
65
113
  requirements:
66
- - - '>='
114
+ - - ">="
67
115
  - !ruby/object:Gem::Version
68
116
  version: '0'
69
117
  - !ruby/object:Gem::Dependency
70
118
  name: mini_magick
71
119
  requirement: !ruby/object:Gem::Requirement
72
120
  requirements:
73
- - - ~>
121
+ - - "~>"
74
122
  - !ruby/object:Gem::Version
75
123
  version: '3.3'
76
124
  type: :runtime
77
125
  prerelease: false
78
126
  version_requirements: !ruby/object:Gem::Requirement
79
127
  requirements:
80
- - - ~>
128
+ - - "~>"
81
129
  - !ruby/object:Gem::Version
82
130
  version: '3.3'
83
131
  - !ruby/object:Gem::Dependency
84
132
  name: rubyzip
85
133
  requirement: !ruby/object:Gem::Requirement
86
134
  requirements:
87
- - - ~>
135
+ - - "~>"
88
136
  - !ruby/object:Gem::Version
89
137
  version: '1.0'
90
138
  type: :runtime
91
139
  prerelease: false
92
140
  version_requirements: !ruby/object:Gem::Requirement
93
141
  requirements:
94
- - - ~>
142
+ - - "~>"
95
143
  - !ruby/object:Gem::Version
96
144
  version: '1.0'
97
145
  - !ruby/object:Gem::Dependency
98
146
  name: rinku
99
147
  requirement: !ruby/object:Gem::Requirement
100
148
  requirements:
101
- - - ~>
149
+ - - "~>"
102
150
  - !ruby/object:Gem::Version
103
151
  version: 1.7.2
104
152
  type: :runtime
105
153
  prerelease: false
106
154
  version_requirements: !ruby/object:Gem::Requirement
107
155
  requirements:
108
- - - ~>
156
+ - - "~>"
109
157
  - !ruby/object:Gem::Version
110
158
  version: 1.7.2
111
159
  - !ruby/object:Gem::Dependency
112
160
  name: net-dns
113
161
  requirement: !ruby/object:Gem::Requirement
114
162
  requirements:
115
- - - ~>
163
+ - - "~>"
116
164
  - !ruby/object:Gem::Version
117
- version: 0.7.1
165
+ version: '0.7'
118
166
  type: :runtime
119
167
  prerelease: false
120
168
  version_requirements: !ruby/object:Gem::Requirement
121
169
  requirements:
122
- - - ~>
170
+ - - "~>"
123
171
  - !ruby/object:Gem::Version
124
- version: 0.7.1
172
+ version: '0.7'
125
173
  - !ruby/object:Gem::Dependency
126
174
  name: acts_as_tree
127
175
  requirement: !ruby/object:Gem::Requirement
128
176
  requirements:
129
- - - ~>
177
+ - - "~>"
130
178
  - !ruby/object:Gem::Version
131
179
  version: '1.1'
132
180
  type: :runtime
133
181
  prerelease: false
134
182
  version_requirements: !ruby/object:Gem::Requirement
135
183
  requirements:
136
- - - ~>
184
+ - - "~>"
137
185
  - !ruby/object:Gem::Version
138
186
  version: '1.1'
187
+ - !ruby/object:Gem::Dependency
188
+ name: safe_yaml
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: '0'
194
+ type: :runtime
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: '0'
139
201
  - !ruby/object:Gem::Dependency
140
202
  name: sqlite3
141
203
  requirement: !ruby/object:Gem::Requirement
142
204
  requirements:
143
- - - '>='
205
+ - - ">="
144
206
  - !ruby/object:Gem::Version
145
207
  version: '0'
146
208
  type: :development
147
209
  prerelease: false
148
210
  version_requirements: !ruby/object:Gem::Requirement
149
211
  requirements:
150
- - - '>='
212
+ - - ">="
151
213
  - !ruby/object:Gem::Version
152
214
  version: '0'
153
215
  description: See README for details.
@@ -156,9 +218,9 @@ executables: []
156
218
  extensions: []
157
219
  extra_rdoc_files: []
158
220
  files:
159
- - .gitignore
160
- - .ruby-gemset
161
- - .ruby-version
221
+ - ".gitignore"
222
+ - ".ruby-gemset"
223
+ - ".ruby-version"
162
224
  - Gemfile
163
225
  - README.rdoc
164
226
  - Rakefile
@@ -416,6 +478,7 @@ files:
416
478
  - db/migrate/20121115083811_add_users_tables.rb
417
479
  - db/migrate/20121115084028_add_cms_tables.rb
418
480
  - db/migrate/20140423085357_add_redirect_fields_to_cms_pages.rb
481
+ - db/migrate/20140423085358_add_redirect_fields_to_cms_page_versions.rb
419
482
  - imagine_cms.gemspec
420
483
  - lib/acts_as_versioned/.document
421
484
  - lib/acts_as_versioned/.gitignore
@@ -520,12 +583,12 @@ require_paths:
520
583
  - lib
521
584
  required_ruby_version: !ruby/object:Gem::Requirement
522
585
  requirements:
523
- - - '>='
586
+ - - ">="
524
587
  - !ruby/object:Gem::Version
525
588
  version: 1.9.3
526
589
  required_rubygems_version: !ruby/object:Gem::Requirement
527
590
  requirements:
528
- - - '>='
591
+ - - ">="
529
592
  - !ruby/object:Gem::Version
530
593
  version: 1.8.11
531
594
  requirements: []