comfortable_mexican_sofa 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -6
- data/Gemfile.lock +3 -4
- data/VERSION +1 -1
- data/app/controllers/cms_admin/base_controller.rb +1 -1
- data/app/controllers/cms_admin/layouts_controller.rb +2 -2
- data/app/controllers/cms_admin/pages_controller.rb +2 -2
- data/app/controllers/cms_admin/revisions_controller.rb +57 -0
- data/app/controllers/cms_admin/sites_controller.rb +2 -2
- data/app/controllers/cms_admin/snippets_controller.rb +2 -2
- data/app/models/cms/layout.rb +2 -0
- data/app/models/cms/page.rb +29 -9
- data/app/models/cms/revision.rb +13 -0
- data/app/models/cms/snippet.rb +2 -5
- data/app/views/cms_admin/layouts/_form.html.erb +0 -1
- data/app/views/cms_admin/layouts/edit.html.erb +1 -0
- data/app/views/cms_admin/pages/_form.html.erb +0 -1
- data/app/views/cms_admin/pages/edit.html.erb +1 -0
- data/app/views/cms_admin/revisions/show.html.erb +36 -0
- data/app/views/cms_admin/sites/_form.html.erb +0 -1
- data/app/views/cms_admin/snippets/_form.html.erb +0 -1
- data/app/views/cms_admin/snippets/edit.html.erb +1 -0
- data/app/views/layouts/cms_admin/_body.html.erb +4 -0
- data/app/views/layouts/cms_admin/_left.html.erb +9 -7
- data/comfortable_mexican_sofa.gemspec +19 -12
- data/config/initializers/comfortable_mexican_sofa.rb +5 -0
- data/config/routes.rb +13 -2
- data/db/migrate/01_create_cms.rb +11 -0
- data/db/migrate/upgrades/03_upgrade_to_1_2_0.rb +15 -0
- data/lib/comfortable_mexican_sofa.rb +3 -1
- data/lib/comfortable_mexican_sofa/configuration.rb +4 -0
- data/lib/comfortable_mexican_sofa/form_builder.rb +0 -1
- data/lib/comfortable_mexican_sofa/has_revisions.rb +64 -0
- data/lib/comfortable_mexican_sofa/http_auth.rb +1 -0
- data/lib/comfortable_mexican_sofa/version.rb +7 -0
- data/public/stylesheets/comfortable_mexican_sofa/content.css +42 -0
- data/public/stylesheets/comfortable_mexican_sofa/structure.css +31 -6
- data/public/stylesheets/comfortable_mexican_sofa/typography.css +8 -0
- data/test/fixtures/cms/revisions.yml +21 -0
- data/test/functional/cms_admin/layouts_controller_test.rb +2 -31
- data/test/functional/cms_admin/pages_controller_test.rb +7 -48
- data/test/functional/cms_admin/revisions_controller_test.rb +135 -0
- data/test/functional/cms_admin/sites_controller_test.rb +4 -29
- data/test/functional/cms_admin/snippets_controller_test.rb +2 -31
- data/test/test_helper.rb +1 -0
- data/test/unit/configuration_test.rb +5 -0
- data/test/unit/models/page_test.rb +0 -1
- data/test/unit/models/snippet_test.rb +0 -5
- data/test/unit/revisions_test.rb +185 -0
- metadata +18 -19
- data/config/initializers/mime_types.rb +0 -5
data/Gemfile
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
gem 'rails', '>=3.0.
|
4
|
-
gem 'active_link_to', '>=0.0.
|
3
|
+
gem 'rails', '>=3.0.0'
|
4
|
+
gem 'active_link_to', '>=0.0.7'
|
5
5
|
gem 'paperclip', '>=2.3.8'
|
6
|
-
gem 'mime-types', :require => 'mime/types'
|
7
|
-
|
8
|
-
# If you wish to use sqlite in production
|
9
|
-
# gem 'sqlite3'
|
10
6
|
|
11
7
|
group :development do
|
12
8
|
gem 'sqlite3'
|
data/Gemfile.lock
CHANGED
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
rack-mount (~> 0.6.13)
|
16
16
|
rack-test (~> 0.5.6)
|
17
17
|
tzinfo (~> 0.3.23)
|
18
|
-
active_link_to (0.0.
|
18
|
+
active_link_to (0.0.7)
|
19
19
|
activemodel (3.0.3)
|
20
20
|
activesupport (= 3.0.3)
|
21
21
|
builder (~> 2.1.2)
|
@@ -78,9 +78,8 @@ PLATFORMS
|
|
78
78
|
ruby
|
79
79
|
|
80
80
|
DEPENDENCIES
|
81
|
-
active_link_to (>= 0.0.
|
81
|
+
active_link_to (>= 0.0.7)
|
82
82
|
jeweler (>= 1.4.0)
|
83
|
-
mime-types
|
84
83
|
paperclip (>= 2.3.8)
|
85
|
-
rails (>= 3.0.
|
84
|
+
rails (>= 3.0.0)
|
86
85
|
sqlite3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
@@ -19,7 +19,7 @@ class CmsAdmin::LayoutsController < CmsAdmin::BaseController
|
|
19
19
|
def create
|
20
20
|
@cms_layout.save!
|
21
21
|
flash[:notice] = 'Layout created'
|
22
|
-
redirect_to
|
22
|
+
redirect_to :action => :edit, :id => @cms_layout
|
23
23
|
rescue ActiveRecord::RecordInvalid
|
24
24
|
flash.now[:error] = 'Failed to create layout'
|
25
25
|
render :action => :new
|
@@ -28,7 +28,7 @@ class CmsAdmin::LayoutsController < CmsAdmin::BaseController
|
|
28
28
|
def update
|
29
29
|
@cms_layout.update_attributes!(params[:cms_layout])
|
30
30
|
flash[:notice] = 'Layout updated'
|
31
|
-
redirect_to
|
31
|
+
redirect_to :action => :edit, :id => @cms_layout
|
32
32
|
rescue ActiveRecord::RecordInvalid
|
33
33
|
flash.now[:error] = 'Failed to update layout'
|
34
34
|
render :action => :edit
|
@@ -22,7 +22,7 @@ class CmsAdmin::PagesController < CmsAdmin::BaseController
|
|
22
22
|
def create
|
23
23
|
@cms_page.save!
|
24
24
|
flash[:notice] = 'Page saved'
|
25
|
-
redirect_to
|
25
|
+
redirect_to :action => :edit, :id => @cms_page
|
26
26
|
rescue ActiveRecord::RecordInvalid
|
27
27
|
flash.now[:error] = 'Failed to create page'
|
28
28
|
render :action => :new
|
@@ -31,7 +31,7 @@ class CmsAdmin::PagesController < CmsAdmin::BaseController
|
|
31
31
|
def update
|
32
32
|
@cms_page.save!
|
33
33
|
flash[:notice] = 'Page updated'
|
34
|
-
redirect_to
|
34
|
+
redirect_to :action => :edit, :id => @cms_page
|
35
35
|
rescue ActiveRecord::RecordInvalid
|
36
36
|
flash.now[:error] = 'Failed to update page'
|
37
37
|
render :action => :edit
|
@@ -0,0 +1,57 @@
|
|
1
|
+
class CmsAdmin::RevisionsController < CmsAdmin::BaseController
|
2
|
+
|
3
|
+
before_filter :load_record
|
4
|
+
before_filter :load_revision, :except => :index
|
5
|
+
|
6
|
+
def index
|
7
|
+
redirect_to :action => :show, :id => @record.revisions.first.try(:id) || 0
|
8
|
+
end
|
9
|
+
|
10
|
+
def show
|
11
|
+
case @record
|
12
|
+
when Cms::Page
|
13
|
+
@current_content = @record.blocks.inject({}){|c, b| c[b.label] = b.content; c }
|
14
|
+
@versioned_content = @record.blocks.inject({}){|c, b| c[b.label] = @revision.data['blocks_attributes'].detect{|r| r[:label] == b.label}.try(:[], :content); c }
|
15
|
+
else
|
16
|
+
@current_content = @record.revision_fields.inject({}){|c, f| c[f] = @record.send(f); c }
|
17
|
+
@versioned_content = @record.revision_fields.inject({}){|c, f| c[f] = @revision.data[f]; c }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def revert
|
22
|
+
@record.restore_from_revision(@revision)
|
23
|
+
flash[:notice] = 'Content Reverted'
|
24
|
+
redirect_to_record
|
25
|
+
end
|
26
|
+
|
27
|
+
protected
|
28
|
+
|
29
|
+
def load_record
|
30
|
+
@record = if params[:layout_id]
|
31
|
+
Cms::Layout.find(params[:layout_id])
|
32
|
+
elsif params[:page_id]
|
33
|
+
Cms::Page.find(params[:page_id])
|
34
|
+
elsif params[:snippet_id]
|
35
|
+
Cms::Snippet.find(params[:snippet_id])
|
36
|
+
end
|
37
|
+
rescue ActiveRecord::RecordNotFound
|
38
|
+
flash[:error] = 'Record Not Found'
|
39
|
+
redirect_to cms_admin_path
|
40
|
+
end
|
41
|
+
|
42
|
+
def load_revision
|
43
|
+
@revision = @record.revisions.find(params[:id])
|
44
|
+
rescue ActiveRecord::RecordNotFound
|
45
|
+
flash[:error] = 'Revision Not Found'
|
46
|
+
redirect_to_record
|
47
|
+
end
|
48
|
+
|
49
|
+
def redirect_to_record
|
50
|
+
redirect_to case @record
|
51
|
+
when Cms::Layout then edit_cms_admin_layout_path(@record)
|
52
|
+
when Cms::Page then edit_cms_admin_page_path(@record)
|
53
|
+
when Cms::Snippet then edit_cms_admin_snippet_path(@record)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
@@ -21,7 +21,7 @@ class CmsAdmin::SitesController < CmsAdmin::BaseController
|
|
21
21
|
def create
|
22
22
|
@cms_site.save!
|
23
23
|
flash[:notice] = 'Site created'
|
24
|
-
redirect_to
|
24
|
+
redirect_to :action => :edit, :id => @cms_site
|
25
25
|
rescue ActiveRecord::RecordInvalid
|
26
26
|
flash.now[:error] = 'Failed to create site'
|
27
27
|
render :action => :new
|
@@ -30,7 +30,7 @@ class CmsAdmin::SitesController < CmsAdmin::BaseController
|
|
30
30
|
def update
|
31
31
|
@cms_site.update_attributes!(params[:cms_site])
|
32
32
|
flash[:notice] = 'Site updated'
|
33
|
-
redirect_to
|
33
|
+
redirect_to :action => :edit, :id => @cms_site
|
34
34
|
rescue ActiveRecord::RecordInvalid
|
35
35
|
flash.now[:error] = 'Failed to update site'
|
36
36
|
render :action => :edit
|
@@ -19,7 +19,7 @@ class CmsAdmin::SnippetsController < CmsAdmin::BaseController
|
|
19
19
|
def create
|
20
20
|
@cms_snippet.save!
|
21
21
|
flash[:notice] = 'Snippet created'
|
22
|
-
redirect_to
|
22
|
+
redirect_to :action => :edit, :id => @cms_snippet
|
23
23
|
rescue ActiveRecord::RecordInvalid
|
24
24
|
flash.now[:error] = 'Failed to create snippet'
|
25
25
|
render :action => :new
|
@@ -28,7 +28,7 @@ class CmsAdmin::SnippetsController < CmsAdmin::BaseController
|
|
28
28
|
def update
|
29
29
|
@cms_snippet.update_attributes!(params[:cms_snippet])
|
30
30
|
flash[:notice] = 'Snippet updated'
|
31
|
-
redirect_to
|
31
|
+
redirect_to :action => :edit, :id => @cms_snippet
|
32
32
|
rescue ActiveRecord::RecordInvalid
|
33
33
|
flash.now[:error] = 'Failed to update snippet'
|
34
34
|
render :action => :edit
|
data/app/models/cms/layout.rb
CHANGED
data/app/models/cms/page.rb
CHANGED
@@ -2,10 +2,12 @@ class Cms::Page < ActiveRecord::Base
|
|
2
2
|
|
3
3
|
set_table_name :cms_pages
|
4
4
|
|
5
|
-
# -- AR Extensions --------------------------------------------------------
|
6
5
|
acts_as_tree :counter_cache => :children_count
|
7
6
|
|
8
|
-
|
7
|
+
has_revisions_for :blocks_attributes
|
8
|
+
|
9
|
+
attr_accessor :tags,
|
10
|
+
:blocks_attributes_changed
|
9
11
|
|
10
12
|
# -- Relationships --------------------------------------------------------
|
11
13
|
belongs_to :site
|
@@ -13,8 +15,8 @@ class Cms::Page < ActiveRecord::Base
|
|
13
15
|
belongs_to :target_page,
|
14
16
|
:class_name => 'Cms::Page'
|
15
17
|
has_many :blocks,
|
16
|
-
:dependent => :destroy
|
17
|
-
|
18
|
+
:dependent => :destroy,
|
19
|
+
:autosave => true
|
18
20
|
|
19
21
|
# -- Callbacks ------------------------------------------------------------
|
20
22
|
before_validation :assign_parent,
|
@@ -64,13 +66,26 @@ class Cms::Page < ActiveRecord::Base
|
|
64
66
|
|
65
67
|
# Transforms existing cms_block information into a hash that can be used
|
66
68
|
# during form processing. That's the only way to modify cms_blocks.
|
67
|
-
def blocks_attributes
|
68
|
-
self.blocks.
|
69
|
+
def blocks_attributes(was = false)
|
70
|
+
self.blocks.collect do |block|
|
69
71
|
block_attr = {}
|
70
72
|
block_attr[:label] = block.label
|
71
|
-
block_attr[:content] = block.content
|
72
|
-
block_attr
|
73
|
-
|
73
|
+
block_attr[:content] = was ? block.content_was : block.content
|
74
|
+
block_attr
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Array of block hashes in the following format:
|
79
|
+
# [
|
80
|
+
# { :label => 'block_1', :content => 'block content' },
|
81
|
+
# { :label => 'block_2', :content => 'block content' }
|
82
|
+
# ]
|
83
|
+
def blocks_attributes=(block_hashes = [])
|
84
|
+
block_hashes.each do |block_hash|
|
85
|
+
block_hash.symbolize_keys! unless block_hash.is_a?(HashWithIndifferentAccess)
|
86
|
+
block = self.blocks.detect{|b| b.label == block_hash[:label]} || self.blocks.build(:label => block_hash[:label])
|
87
|
+
block.content = block_hash[:content]
|
88
|
+
self.blocks_attributes_changed = self.blocks_attributes_changed || block.content_changed?
|
74
89
|
end
|
75
90
|
end
|
76
91
|
|
@@ -97,6 +112,11 @@ class Cms::Page < ActiveRecord::Base
|
|
97
112
|
"http://#{self.site.hostname}#{self.full_path}"
|
98
113
|
end
|
99
114
|
|
115
|
+
# Method to collect prevous state of blocks for revisions
|
116
|
+
def blocks_attributes_was
|
117
|
+
blocks_attributes(true)
|
118
|
+
end
|
119
|
+
|
100
120
|
protected
|
101
121
|
|
102
122
|
def assign_parent
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class Cms::Revision < ActiveRecord::Base
|
2
|
+
|
3
|
+
set_table_name :cms_revisions
|
4
|
+
|
5
|
+
serialize :data
|
6
|
+
|
7
|
+
# -- Relationships --------------------------------------------------------
|
8
|
+
belongs_to :record, :polymorphic => true
|
9
|
+
|
10
|
+
# -- Scopes ---------------------------------------------------------------
|
11
|
+
default_scope order('created_at DESC')
|
12
|
+
|
13
|
+
end
|
data/app/models/cms/snippet.rb
CHANGED
@@ -2,6 +2,8 @@ class Cms::Snippet < ActiveRecord::Base
|
|
2
2
|
|
3
3
|
set_table_name :cms_snippets
|
4
4
|
|
5
|
+
has_revisions_for :content
|
6
|
+
|
5
7
|
# -- Relationships --------------------------------------------------------
|
6
8
|
belongs_to :site
|
7
9
|
|
@@ -18,11 +20,6 @@ class Cms::Snippet < ActiveRecord::Base
|
|
18
20
|
:presence => true,
|
19
21
|
:uniqueness => { :scope => :site_id },
|
20
22
|
:format => { :with => /^\w[a-z0-9_-]*$/i }
|
21
|
-
|
22
|
-
# -- Class Methods --------------------------------------------------------
|
23
|
-
def self.content_for(slug)
|
24
|
-
(s = find_by_slug(slug)) ? s.content : ''
|
25
|
-
end
|
26
23
|
|
27
24
|
protected
|
28
25
|
|
@@ -16,6 +16,5 @@
|
|
16
16
|
<%= form.text_area :js, :class => 'code_js' %>
|
17
17
|
|
18
18
|
<%= form.simple_field nil, nil, :class => 'submit_element' do %>
|
19
|
-
<%= form.submit 'and continue', :id => nil, :name => 'save', :disable_builder => true %>
|
20
19
|
<%= form.submit @cms_layout.new_record?? 'Create Layout' : 'Update Layout', :disable_builder => true %>
|
21
20
|
<% end %>
|
@@ -33,6 +33,5 @@
|
|
33
33
|
<%= form.check_box :is_published, :disable_builder => true %>
|
34
34
|
<%= form.label_for :is_published, :label => 'Published' %>
|
35
35
|
<%= form.submit 'Preview', :name => 'preview', :id => nil, :disable_builder => true %>
|
36
|
-
<%= form.submit 'and continue', :id => nil, :name => 'save', :disable_builder => true %>
|
37
36
|
<%= form.submit @cms_page.new_record? ? 'Create Page' : 'Update Page', :disable_builder => true %>
|
38
37
|
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<h1> Revisions for <%= @record.class.to_s.demodulize %></h1>
|
2
|
+
<h2> <%= @record.is_a?(Cms::Page) ? "Full Path: #{@record.full_path}" : "Slug: #{@record.slug}" %> </h2>
|
3
|
+
|
4
|
+
<% content_for :right_column do %>
|
5
|
+
<h2><%= pluralize(@record.revisions.count, 'Revision') %></h2>
|
6
|
+
<div class='revisions box'>
|
7
|
+
<% @record.revisions.each do |revision| %>
|
8
|
+
<%= active_link_to revision.created_at, :id => revision.id %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= cms_form_for @revision, :url => {:action => :revert} do |form| %>
|
14
|
+
<%= form.simple_field do %>
|
15
|
+
<div class='current'>
|
16
|
+
<div class='title'>Current</div>
|
17
|
+
</div>
|
18
|
+
<div class='versioned'>
|
19
|
+
<div class='title'><%= @revision.created_at %></div>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<% @current_content.each do |label, content| %>
|
24
|
+
|
25
|
+
<%= form.simple_field label do %>
|
26
|
+
<div class='current'>
|
27
|
+
<div class='content'><%= content %></div>
|
28
|
+
</div>
|
29
|
+
<div class='versioned'>
|
30
|
+
<div class='content'><%= @versioned_content[label] %></div>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<%= form.submit 'Update to this Revision' %>
|
36
|
+
<% end %>
|
@@ -2,6 +2,5 @@
|
|
2
2
|
<%= form.text_field :hostname %>
|
3
3
|
|
4
4
|
<%= form.simple_field nil, nil, :class => 'submit_element' do %>
|
5
|
-
<%= form.submit 'and continue', :id => nil, :name => 'save', :disable_builder => true %>
|
6
5
|
<%= form.submit @cms_site.new_record?? 'Create Site' : 'Update Site', :disable_builder => true %>
|
7
6
|
<% end %>
|
@@ -7,6 +7,5 @@
|
|
7
7
|
<%= form.text_area :content, :class => 'code' %>
|
8
8
|
|
9
9
|
<%= form.simple_field nil, nil, :class => 'submit_element' do %>
|
10
|
-
<%= form.submit 'and continue', :id => nil, :name => 'save', :disable_builder => true %>
|
11
10
|
<%= form.submit @cms_snippet.new_record?? 'Create Snippet' : 'Update Snippet', :disable_builder => true %>
|
12
11
|
<% end %>
|
@@ -12,6 +12,10 @@
|
|
12
12
|
</div>
|
13
13
|
<div class='center_column'>
|
14
14
|
<%= render :partial => 'layouts/cms_admin/center' %>
|
15
|
+
<div class='sofa'>
|
16
|
+
<a href='http://comfortablemexicansofa.twg.ca' target='_blank'>ComfortableMexicanSofa</a>
|
17
|
+
<span class='version'><%= ComfortableMexicanSofa::VERSION %></span>
|
18
|
+
</div>
|
15
19
|
</div>
|
16
20
|
</div>
|
17
21
|
</body>
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
<ul class='nav'>
|
2
|
+
<% if ComfortableMexicanSofa.config.enable_multiple_sites %>
|
3
|
+
<li><%= active_link_to 'Sites', cms_admin_sites_path %></li>
|
4
|
+
<% end %>
|
5
|
+
<li><%= active_link_to 'Layouts', cms_admin_layouts_path %></li>
|
6
|
+
<li><%= active_link_to 'Pages', cms_admin_pages_path %></li>
|
7
|
+
<li><%= active_link_to 'Snippets', cms_admin_snippets_path %></li>
|
8
|
+
<%= cms_hook :navigation %>
|
9
|
+
</ul>
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{comfortable_mexican_sofa}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov", "The Working Group Inc"]
|
12
|
-
s.date = %q{2011-05-
|
12
|
+
s.date = %q{2011-05-10}
|
13
13
|
s.description = %q{}
|
14
14
|
s.email = %q{oleg@theworkinggroup.ca}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
"app/controllers/cms_admin/base_controller.rb",
|
29
29
|
"app/controllers/cms_admin/layouts_controller.rb",
|
30
30
|
"app/controllers/cms_admin/pages_controller.rb",
|
31
|
+
"app/controllers/cms_admin/revisions_controller.rb",
|
31
32
|
"app/controllers/cms_admin/sites_controller.rb",
|
32
33
|
"app/controllers/cms_admin/snippets_controller.rb",
|
33
34
|
"app/controllers/cms_admin/uploads_controller.rb",
|
@@ -35,6 +36,7 @@ Gem::Specification.new do |s|
|
|
35
36
|
"app/models/cms/block.rb",
|
36
37
|
"app/models/cms/layout.rb",
|
37
38
|
"app/models/cms/page.rb",
|
39
|
+
"app/models/cms/revision.rb",
|
38
40
|
"app/models/cms/site.rb",
|
39
41
|
"app/models/cms/snippet.rb",
|
40
42
|
"app/models/cms/upload.rb",
|
@@ -51,6 +53,7 @@ Gem::Specification.new do |s|
|
|
51
53
|
"app/views/cms_admin/pages/index.html.erb",
|
52
54
|
"app/views/cms_admin/pages/new.html.erb",
|
53
55
|
"app/views/cms_admin/pages/toggle_branch.js.erb",
|
56
|
+
"app/views/cms_admin/revisions/show.html.erb",
|
54
57
|
"app/views/cms_admin/sites/_form.html.erb",
|
55
58
|
"app/views/cms_admin/sites/edit.html.erb",
|
56
59
|
"app/views/cms_admin/sites/index.html.erb",
|
@@ -78,7 +81,6 @@ Gem::Specification.new do |s|
|
|
78
81
|
"config/environments/production.rb",
|
79
82
|
"config/environments/test.rb",
|
80
83
|
"config/initializers/comfortable_mexican_sofa.rb",
|
81
|
-
"config/initializers/mime_types.rb",
|
82
84
|
"config/initializers/paperclip.rb",
|
83
85
|
"config/locales/en.yml",
|
84
86
|
"config/routes.rb",
|
@@ -99,6 +101,7 @@ Gem::Specification.new do |s|
|
|
99
101
|
"db/cms_fixtures/example.com/snippets/default/content.html",
|
100
102
|
"db/migrate/01_create_cms.rb",
|
101
103
|
"db/migrate/upgrades/02_upgrade_to_1_1_0.rb",
|
104
|
+
"db/migrate/upgrades/03_upgrade_to_1_2_0.rb",
|
102
105
|
"db/seeds.rb",
|
103
106
|
"doc/page_editing.png",
|
104
107
|
"doc/sofa.png",
|
@@ -109,6 +112,7 @@ Gem::Specification.new do |s|
|
|
109
112
|
"lib/comfortable_mexican_sofa/engine.rb",
|
110
113
|
"lib/comfortable_mexican_sofa/fixtures.rb",
|
111
114
|
"lib/comfortable_mexican_sofa/form_builder.rb",
|
115
|
+
"lib/comfortable_mexican_sofa/has_revisions.rb",
|
112
116
|
"lib/comfortable_mexican_sofa/http_auth.rb",
|
113
117
|
"lib/comfortable_mexican_sofa/rails_extensions.rb",
|
114
118
|
"lib/comfortable_mexican_sofa/tag.rb",
|
@@ -124,6 +128,7 @@ Gem::Specification.new do |s|
|
|
124
128
|
"lib/comfortable_mexican_sofa/tags/page_text.rb",
|
125
129
|
"lib/comfortable_mexican_sofa/tags/partial.rb",
|
126
130
|
"lib/comfortable_mexican_sofa/tags/snippet.rb",
|
131
|
+
"lib/comfortable_mexican_sofa/version.rb",
|
127
132
|
"lib/comfortable_mexican_sofa/view_hooks.rb",
|
128
133
|
"lib/comfortable_mexican_sofa/view_methods.rb",
|
129
134
|
"lib/generators/README",
|
@@ -209,6 +214,7 @@ Gem::Specification.new do |s|
|
|
209
214
|
"test/fixtures/cms/blocks.yml",
|
210
215
|
"test/fixtures/cms/layouts.yml",
|
211
216
|
"test/fixtures/cms/pages.yml",
|
217
|
+
"test/fixtures/cms/revisions.yml",
|
212
218
|
"test/fixtures/cms/sites.yml",
|
213
219
|
"test/fixtures/cms/snippets.yml",
|
214
220
|
"test/fixtures/cms/uploads.yml",
|
@@ -218,6 +224,7 @@ Gem::Specification.new do |s|
|
|
218
224
|
"test/fixtures/views/_nav_hook_2.html.erb",
|
219
225
|
"test/functional/cms_admin/layouts_controller_test.rb",
|
220
226
|
"test/functional/cms_admin/pages_controller_test.rb",
|
227
|
+
"test/functional/cms_admin/revisions_controller_test.rb",
|
221
228
|
"test/functional/cms_admin/sites_controller_test.rb",
|
222
229
|
"test/functional/cms_admin/snippets_controller_test.rb",
|
223
230
|
"test/functional/cms_admin/uploads_controller_test.rb",
|
@@ -237,6 +244,7 @@ Gem::Specification.new do |s|
|
|
237
244
|
"test/unit/models/site_test.rb",
|
238
245
|
"test/unit/models/snippet_test.rb",
|
239
246
|
"test/unit/models/upload_test.rb",
|
247
|
+
"test/unit/revisions_test.rb",
|
240
248
|
"test/unit/tag_test.rb",
|
241
249
|
"test/unit/tags/field_datetime_test.rb",
|
242
250
|
"test/unit/tags/field_integer_test.rb",
|
@@ -259,6 +267,7 @@ Gem::Specification.new do |s|
|
|
259
267
|
s.test_files = [
|
260
268
|
"test/functional/cms_admin/layouts_controller_test.rb",
|
261
269
|
"test/functional/cms_admin/pages_controller_test.rb",
|
270
|
+
"test/functional/cms_admin/revisions_controller_test.rb",
|
262
271
|
"test/functional/cms_admin/sites_controller_test.rb",
|
263
272
|
"test/functional/cms_admin/snippets_controller_test.rb",
|
264
273
|
"test/functional/cms_admin/uploads_controller_test.rb",
|
@@ -278,6 +287,7 @@ Gem::Specification.new do |s|
|
|
278
287
|
"test/unit/models/site_test.rb",
|
279
288
|
"test/unit/models/snippet_test.rb",
|
280
289
|
"test/unit/models/upload_test.rb",
|
290
|
+
"test/unit/revisions_test.rb",
|
281
291
|
"test/unit/tag_test.rb",
|
282
292
|
"test/unit/tags/field_datetime_test.rb",
|
283
293
|
"test/unit/tags/field_integer_test.rb",
|
@@ -298,23 +308,20 @@ Gem::Specification.new do |s|
|
|
298
308
|
s.specification_version = 3
|
299
309
|
|
300
310
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
301
|
-
s.add_runtime_dependency(%q<rails>, [">= 3.0.
|
302
|
-
s.add_runtime_dependency(%q<active_link_to>, [">= 0.0.
|
311
|
+
s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
|
312
|
+
s.add_runtime_dependency(%q<active_link_to>, [">= 0.0.7"])
|
303
313
|
s.add_runtime_dependency(%q<paperclip>, [">= 2.3.8"])
|
304
|
-
s.add_runtime_dependency(%q<mime-types>, [">= 0"])
|
305
314
|
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
306
315
|
else
|
307
|
-
s.add_dependency(%q<rails>, [">= 3.0.
|
308
|
-
s.add_dependency(%q<active_link_to>, [">= 0.0.
|
316
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
317
|
+
s.add_dependency(%q<active_link_to>, [">= 0.0.7"])
|
309
318
|
s.add_dependency(%q<paperclip>, [">= 2.3.8"])
|
310
|
-
s.add_dependency(%q<mime-types>, [">= 0"])
|
311
319
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
312
320
|
end
|
313
321
|
else
|
314
|
-
s.add_dependency(%q<rails>, [">= 3.0.
|
315
|
-
s.add_dependency(%q<active_link_to>, [">= 0.0.
|
322
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
323
|
+
s.add_dependency(%q<active_link_to>, [">= 0.0.7"])
|
316
324
|
s.add_dependency(%q<paperclip>, [">= 2.3.8"])
|
317
|
-
s.add_dependency(%q<mime-types>, [">= 0"])
|
318
325
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
319
326
|
end
|
320
327
|
end
|