comfortable_mexican_sofa 1.6.25 → 1.6.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/README.md +1 -1
  2. data/VERSION +1 -1
  3. data/app/assets/javascripts/comfortable_mexican_sofa/application.js +2 -2
  4. data/app/assets/stylesheets/comfortable_mexican_sofa/form.css +2 -0
  5. data/app/controllers/cms_admin/base_controller.rb +1 -1
  6. data/app/controllers/cms_content_controller.rb +2 -2
  7. data/app/models/cms/site.rb +21 -6
  8. data/app/views/cms_admin/pages/_index_branch.html.erb +1 -1
  9. data/app/views/cms_admin/pages/toggle_branch.js.erb +3 -3
  10. data/app/views/layouts/cms_admin/_body.html.erb +2 -0
  11. data/comfortable_mexican_sofa.gemspec +18 -18
  12. data/config/initializers/comfortable_mexican_sofa.rb +1 -0
  13. data/config/locales/fr.yml +234 -0
  14. data/config/locales/pt-BR.yml +1 -1
  15. data/db/cms_fixtures/{example.com → sample-site}/layouts/default/_default.yml +0 -0
  16. data/db/cms_fixtures/{example.com → sample-site}/layouts/default/content.html +0 -0
  17. data/db/cms_fixtures/{example.com → sample-site}/layouts/default/css.css +0 -0
  18. data/db/cms_fixtures/{example.com → sample-site}/layouts/default/js.js +0 -0
  19. data/db/cms_fixtures/{example.com → sample-site}/layouts/default/nested/_nested.yml +0 -0
  20. data/db/cms_fixtures/{example.com → sample-site}/layouts/default/nested/content.html +0 -0
  21. data/db/cms_fixtures/{example.com → sample-site}/layouts/default/nested/css.css +0 -0
  22. data/db/cms_fixtures/{example.com → sample-site}/layouts/default/nested/js.js +0 -0
  23. data/db/cms_fixtures/{example.com → sample-site}/pages/index/_index.yml +0 -0
  24. data/db/cms_fixtures/{example.com → sample-site}/pages/index/child/_child.yml +0 -0
  25. data/db/cms_fixtures/{example.com → sample-site}/pages/index/child/left.html +0 -0
  26. data/db/cms_fixtures/{example.com → sample-site}/pages/index/child/right.html +0 -0
  27. data/db/cms_fixtures/{example.com → sample-site}/pages/index/content.html +0 -0
  28. data/db/cms_fixtures/{example.com → sample-site}/snippets/default/_default.yml +0 -0
  29. data/db/cms_fixtures/{example.com → sample-site}/snippets/default/content.html +0 -0
  30. data/lib/comfortable_mexican_sofa/configuration.rb +1 -0
  31. data/lib/comfortable_mexican_sofa/fixtures.rb +31 -31
  32. data/lib/tasks/comfortable_mexican_sofa.rake +2 -2
  33. data/test/integration/fixtures_test.rb +1 -2
  34. data/test/integration/sites_test.rb +16 -1
  35. data/test/unit/fixtures_test.rb +24 -24
  36. data/test/unit/mirrors_test.rb +1 -1
  37. data/test/unit/models/page_test.rb +3 -1
  38. data/test/unit/models/site_test.rb +11 -2
  39. metadata +19 -19
  40. data/rvmrc.example +0 -1
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # ComfortableMexicanSofa (Rails 3 CMS Engine)
2
- [![Build Status](https://secure.travis-ci.org/comfy/comfortable-mexican-sofa.png)](http://travis-ci.org/comfy/comfortable-mexican-sofa) [![Dependency Status](https://gemnasium.com/comfy/comfortable-mexican-sofa.png)](https://gemnasium.com/comfy/comfortable-mexican-sofa)
2
+ [![Build Status](https://travis-ci.org/comfy/comfortable-mexican-sofa.png?branch=master)](https://travis-ci.org/comfy/comfortable-mexican-sofa) [![Dependency Status](https://gemnasium.com/comfy/comfortable-mexican-sofa.png)](https://gemnasium.com/comfy/comfortable-mexican-sofa)
3
3
 
4
4
  ComfortableMexicanSofa is a powerful CMS Engine for your Rails 3 applications.
5
5
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.25
1
+ 1.6.26
@@ -59,8 +59,8 @@ $.CMS = function(){
59
59
  function slugify(str, delimiter){
60
60
  var opposite_delimiter = (delimiter == '-') ? '_' : '-';
61
61
  str = str.replace(/^\s+|\s+$/g, '');
62
- var from = "ÀÁÄÂÈÉËÊÌÍÏÎÒÓÖÔÙÚÜÛàáäâèéëêìíïîòóöôùúüûÑñÇç";
63
- var to = "aaaaeeeeiiiioooouuuuaaaaeeeeiiiioooouuuunncc";
62
+ var from = "ÀÁÄÂÃÈÉËÊÌÍÏÎÒÓÖÔÕÙÚÜÛàáäâãèéëêìíïîòóöôõùúüûÑñÇç";
63
+ var to = "aaaaaeeeeiiiiooooouuuuaaaaaeeeeiiiiooooouuuunncc";
64
64
  for (var i=0, l=from.length ; i<l ; i++) {
65
65
  str = str.replace(new RegExp(from[i], "g"), to[i]);
66
66
  }
@@ -24,6 +24,8 @@
24
24
  #cms_body .form_element .value input[type='password'],
25
25
  #cms_body .form_element .value input[type='datetime'],
26
26
  #cms_body .form_element .value input[type='number'],
27
+ #cms_body .form_element .value input[type='email'],
28
+ #cms_body .form_element .value input[type='url'],
27
29
  #cms_body .form_element .value select,
28
30
  #cms_body .form_element .value textarea {
29
31
  border: 0px;
@@ -44,7 +44,7 @@ protected
44
44
  def load_fixtures
45
45
  return unless ComfortableMexicanSofa.config.enable_fixtures
46
46
  if %w(cms_admin/layouts cms_admin/pages cms_admin/snippets).member?(params[:controller])
47
- ComfortableMexicanSofa::Fixtures.import_all(@site.hostname)
47
+ ComfortableMexicanSofa::Fixtures.import_all(@site.identifier)
48
48
  flash.now[:error] = I18n.t('cms.base.fixtures_enabled')
49
49
  end
50
50
  end
@@ -36,14 +36,14 @@ protected
36
36
 
37
37
  def load_fixtures
38
38
  return unless ComfortableMexicanSofa.config.enable_fixtures
39
- ComfortableMexicanSofa::Fixtures.import_all(@cms_site.hostname)
39
+ ComfortableMexicanSofa::Fixtures.import_all(@cms_site.identifier)
40
40
  end
41
41
 
42
42
  def load_cms_site
43
43
  @cms_site ||= if params[:site_id]
44
44
  Cms::Site.find_by_id(params[:site_id])
45
45
  else
46
- Cms::Site.find_site(request.host.downcase, request.fullpath)
46
+ Cms::Site.find_site(request.host_with_port.downcase, request.fullpath)
47
47
  end
48
48
 
49
49
  if @cms_site
@@ -12,14 +12,17 @@ class Cms::Site < ActiveRecord::Base
12
12
  :is_mirrored
13
13
 
14
14
  # -- Relationships --------------------------------------------------------
15
- has_many :layouts, :dependent => :delete_all
16
- has_many :pages, :dependent => :delete_all
17
- has_many :snippets, :dependent => :delete_all
18
- has_many :files, :dependent => :destroy
19
- has_many :categories, :dependent => :delete_all
15
+ with_options :dependent => :destroy do |site|
16
+ site.has_many :layouts
17
+ site.has_many :pages
18
+ site.has_many :snippets
19
+ site.has_many :files
20
+ site.has_many :categories
21
+ end
20
22
 
21
23
  # -- Callbacks ------------------------------------------------------------
22
24
  before_validation :assign_identifier,
25
+ :assign_hostname,
23
26
  :assign_label
24
27
  before_save :clean_path
25
28
  after_save :sync_mirrors
@@ -34,7 +37,7 @@ class Cms::Site < ActiveRecord::Base
34
37
  validates :hostname,
35
38
  :presence => true,
36
39
  :uniqueness => { :scope => :path },
37
- :format => { :with => /^[\w\.\-]+$/ }
40
+ :format => { :with => /^[\w\.\-]+(?:\:\d+)?$/ }
38
41
 
39
42
  # -- Scopes ---------------------------------------------------------------
40
43
  scope :mirrored, where(:is_mirrored => true)
@@ -54,6 +57,14 @@ class Cms::Site < ActiveRecord::Base
54
57
  end
55
58
  return cms_site
56
59
  end
60
+
61
+ # -- Instance Methods -----------------------------------------------------
62
+ # When removing entire site, let's not destroy content from other sites
63
+ # Since before_destroy doesn't really work, this does the trick
64
+ def destroy
65
+ self.class.update_all({:is_mirrored => false}, :id => self.id) if self.is_mirrored?
66
+ super
67
+ end
57
68
 
58
69
  protected
59
70
 
@@ -70,6 +81,10 @@ protected
70
81
  self.identifier = self.identifier.blank?? self.hostname.try(:idify) : self.identifier
71
82
  end
72
83
 
84
+ def assign_hostname
85
+ self.hostname ||= self.identifier
86
+ end
87
+
73
88
  def assign_label
74
89
  self.label = self.label.blank?? self.identifier.try(:titleize) : self.label
75
90
  end
@@ -36,7 +36,7 @@
36
36
  </div>
37
37
  </div>
38
38
  <% if !category_view && has_children && branch_open %>
39
- <ul>
39
+ <ul class="children">
40
40
  <%= render :partial => 'index_branch', :collection => children %>
41
41
  </ul>
42
42
  <% end %>
@@ -2,10 +2,10 @@ var li = $('li#cms_page_<%=@page.id%>');
2
2
  li.find('.item .toggle').first().toggleClass('open');
3
3
 
4
4
  <% if session[:cms_page_tree].member?(@page.id.to_s) %>
5
- if(!li.find('ul')[0]) {
6
- li.append('<ul><%= escape_javascript(render :partial => "index_branch", :collection => @page.children) %></ul>');
5
+ if(!li.find('ul.children')[0]) {
6
+ li.append('<ul class="children"><%= escape_javascript(render :partial => "index_branch", :collection => @page.children) %></ul>');
7
7
  $.CMS.enable_sortable_list();
8
8
  }
9
9
  <% else %>
10
- li.find('ul').remove();
10
+ li.find('ul.children').remove();
11
11
  <% end %>
@@ -1,4 +1,6 @@
1
1
  <body id='cms_body' class='c_<%= params[:controller].idify %> a_<%= params[:action].idify %>'>
2
+ <%= cms_hook :header %>
3
+
2
4
  <div class='body_wrapper'>
3
5
  <div class='left_column'>
4
6
  <div class='left_column_content'>
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "comfortable_mexican_sofa"
8
- s.version = "1.6.25"
8
+ s.version = "1.6.26"
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 = "2012-10-12"
12
+ s.date = "2013-01-24"
13
13
  s.description = ""
14
14
  s.email = "oleg@theworkinggroup.ca"
15
15
  s.extra_rdoc_files = [
@@ -177,6 +177,7 @@ Gem::Specification.new do |s|
177
177
  "config/locales/de.yml",
178
178
  "config/locales/en.yml",
179
179
  "config/locales/es.yml",
180
+ "config/locales/fr.yml",
180
181
  "config/locales/ja.yml",
181
182
  "config/locales/pl.yml",
182
183
  "config/locales/pt-BR.yml",
@@ -184,21 +185,21 @@ Gem::Specification.new do |s|
184
185
  "config/locales/sv.yml",
185
186
  "config/locales/zh-CN.yml",
186
187
  "config/routes.rb",
187
- "db/cms_fixtures/example.com/layouts/default/_default.yml",
188
- "db/cms_fixtures/example.com/layouts/default/content.html",
189
- "db/cms_fixtures/example.com/layouts/default/css.css",
190
- "db/cms_fixtures/example.com/layouts/default/js.js",
191
- "db/cms_fixtures/example.com/layouts/default/nested/_nested.yml",
192
- "db/cms_fixtures/example.com/layouts/default/nested/content.html",
193
- "db/cms_fixtures/example.com/layouts/default/nested/css.css",
194
- "db/cms_fixtures/example.com/layouts/default/nested/js.js",
195
- "db/cms_fixtures/example.com/pages/index/_index.yml",
196
- "db/cms_fixtures/example.com/pages/index/child/_child.yml",
197
- "db/cms_fixtures/example.com/pages/index/child/left.html",
198
- "db/cms_fixtures/example.com/pages/index/child/right.html",
199
- "db/cms_fixtures/example.com/pages/index/content.html",
200
- "db/cms_fixtures/example.com/snippets/default/_default.yml",
201
- "db/cms_fixtures/example.com/snippets/default/content.html",
188
+ "db/cms_fixtures/sample-site/layouts/default/_default.yml",
189
+ "db/cms_fixtures/sample-site/layouts/default/content.html",
190
+ "db/cms_fixtures/sample-site/layouts/default/css.css",
191
+ "db/cms_fixtures/sample-site/layouts/default/js.js",
192
+ "db/cms_fixtures/sample-site/layouts/default/nested/_nested.yml",
193
+ "db/cms_fixtures/sample-site/layouts/default/nested/content.html",
194
+ "db/cms_fixtures/sample-site/layouts/default/nested/css.css",
195
+ "db/cms_fixtures/sample-site/layouts/default/nested/js.js",
196
+ "db/cms_fixtures/sample-site/pages/index/_index.yml",
197
+ "db/cms_fixtures/sample-site/pages/index/child/_child.yml",
198
+ "db/cms_fixtures/sample-site/pages/index/child/left.html",
199
+ "db/cms_fixtures/sample-site/pages/index/child/right.html",
200
+ "db/cms_fixtures/sample-site/pages/index/content.html",
201
+ "db/cms_fixtures/sample-site/snippets/default/_default.yml",
202
+ "db/cms_fixtures/sample-site/snippets/default/content.html",
202
203
  "db/migrate/01_create_cms.rb",
203
204
  "db/seeds.rb",
204
205
  "db/upgrade_migrations/02_upgrade_to_1_1_0.rb",
@@ -249,7 +250,6 @@ Gem::Specification.new do |s|
249
250
  "lib/generators/comfy/cms/README",
250
251
  "lib/generators/comfy/cms/cms_generator.rb",
251
252
  "lib/tasks/comfortable_mexican_sofa.rake",
252
- "rvmrc.example",
253
253
  "script/rails",
254
254
  "test/fixtures/cms/blocks.yml",
255
255
  "test/fixtures/cms/categories.yml",
@@ -106,6 +106,7 @@ ComfortableMexicanSofa::HttpAuth.password = 'password'
106
106
 
107
107
  # If you need to inject some html in cms admin views you can define what partial
108
108
  # should be rendered into the following areas:
109
+ # ComfortableMexicanSofa::ViewHooks.add(:header, '/layouts/admin/header')
109
110
  # ComfortableMexicanSofa::ViewHooks.add(:navigation, '/layouts/admin/navigation')
110
111
  # ComfortableMexicanSofa::ViewHooks.add(:html_head, '/layouts/admin/html_head')
111
112
  # ComfortableMexicanSofa::ViewHooks.add(:page_form, '/layouts/admin/page_form')
@@ -0,0 +1,234 @@
1
+ # encoding: utf-8
2
+ fr:
3
+ # -- Models ---------------------------------------------------------------
4
+ attributes:
5
+ label: Label
6
+ slug: Slug
7
+ parent_id: Parent
8
+ content: Contenu
9
+ identifier: Identifiant
10
+ activerecord:
11
+ models:
12
+ cms/site: Site
13
+ cms/layout: Mise en page
14
+ cms/page: Page
15
+ cms/snippet: Snippet
16
+ cms/file: Fichier
17
+ attributes:
18
+ cms/site:
19
+ identifier: Identifiant
20
+ hostname: Hostname
21
+ path: Chemin d'accès
22
+ locale: Langage
23
+ is_mirrored: En miroir
24
+ cms/layout:
25
+ identifier: Identifiant
26
+ label: Nom de la Mise en page
27
+ app_layout: Mise en page Application
28
+ parent_id: Mise en page Parent
29
+ css: Feuille de Style CSS
30
+ js: Javascript
31
+ cms/page:
32
+ label: Label
33
+ layout_id: Mise en page
34
+ slug: Slug
35
+ target_page_id: Rediriger vers Page
36
+ is_published: Publié
37
+ cms/file:
38
+ file: File
39
+ description: Description
40
+ cms/snippet:
41
+ identifier: Identifiant
42
+
43
+ # -- Controllers ----------------------------------------------------------
44
+ cms:
45
+ base:
46
+ site_not_found: Site non trouvé
47
+ fixtures_enabled: Jeu de données Test activé. Toutes les modifications seront supprimées.
48
+
49
+ sites:
50
+ created: Site créé
51
+ creation_failure: Echec de la création du site
52
+ updated: Site modifié
53
+ update_failure: Echec de la modification du site
54
+ deleted: Site supprimé
55
+ not_found: Site non trouvé
56
+
57
+ layouts:
58
+ created: Mise en page créée
59
+ creation_failure: Echec de la création de la Mise en page
60
+ updated: Mise en page modifiée
61
+ update_failure: Echec de la modification de la mise en page
62
+ deleted: Mise en page supprimée
63
+ not_found: Mise en page non trouvée
64
+
65
+ pages:
66
+ created: Page créée
67
+ creation_failure: Echec de la création de la page
68
+ updated: Page modifiée
69
+ update_failure: Echec de la modification de la page
70
+ deleted: Page supprimée
71
+ not_found: Page non trouvée
72
+ layout_not_found: Aucune Mise ne page disponible. SVP créez en une.
73
+
74
+ snippets:
75
+ created: Snippet créé
76
+ creation_failure: Echec de la création du snippet
77
+ updated: Snippet modifié
78
+ update_failure: Echec de la modification du snippet
79
+ deleted: Snippet supprimé
80
+ not_found: Snippet non trouvé
81
+
82
+ revisions:
83
+ reverted: Contenu Reverted
84
+ record_not_found: Enregistrement non trouvé
85
+ not_found: Revision non trouvée
86
+
87
+ files:
88
+ created: Fichier téléchargé
89
+ creation_failure: Echec deu téléchargement de fichier
90
+ updated: Fichier modifié
91
+ update_failure: Echec de la modification du fichier
92
+ deleted: Fichier supprimé
93
+ not_found: Fichier non trouvé
94
+
95
+ content:
96
+ site_not_found: Site non trouvé
97
+ layout_not_found: Mise en page non trouvée
98
+ page_not_found: Page non trouvée
99
+
100
+ # -- Views ----------------------------------------------------------------
101
+ cms_admin:
102
+ base:
103
+ sites: Sites
104
+ layouts: Mises en page
105
+ pages: Pages
106
+ snippets: Snippets
107
+ files: Fichiers
108
+
109
+ sites:
110
+ index:
111
+ title: Sites
112
+ new_link: Créer Nouveau Site
113
+ select: Sélectionner Site
114
+ edit: Modifier
115
+ delete: Supprimer
116
+ are_you_sure: Confirmez-vous la suppression de ce site?
117
+ new:
118
+ title: Nouveau Site
119
+ edit:
120
+ title: Modification Site
121
+ form:
122
+ create: Créer Site
123
+ update: Modifier Site
124
+
125
+ layouts:
126
+ index:
127
+ title: Layouts
128
+ new_link: Créer Nouveau Layout
129
+ index_branch:
130
+ add_child_layout: Ajouter Mise en page Enfant
131
+ edit: Modifier
132
+ delete: Supprimer
133
+ are_you_sure: Confirmez-vous la suppression?
134
+ new:
135
+ title: Nouvelle Mise en page
136
+ edit:
137
+ title: Modification Mise en page
138
+ revision: Révision
139
+ form:
140
+ select_parent_layout: Sélection Mise en page Parent
141
+ select_app_layout: Sélection Mise en page Application
142
+ create: Créer Mise en page
143
+ update: Modifier Mise en page
144
+
145
+ pages:
146
+ index:
147
+ title: Pages
148
+ new_link: Créer Nouvelle Page
149
+ index_branch:
150
+ toggle: Basculer
151
+ add_child_page: Ajouter Page Enfant
152
+ edit: Modifier
153
+ delete: Supprimer
154
+ are_you_sure: Confirmez-vous la suppression?
155
+ new:
156
+ title: Nouvelle Page
157
+ edit:
158
+ title: Modification Page
159
+ revision: Révision
160
+ form:
161
+ select_target_page: Sans Redirection
162
+ preview: Prévisualiser
163
+ create: Créer Page
164
+ update: Modifier Page
165
+ form_blocks:
166
+ no_tags: |-
167
+ Mise en page sans aucun tag de contenu.<br/>
168
+ Modifiez le contenu pour y ajouter un tag de page ou de champs. Par exemple: <code>{{cms:page:content}}</code>
169
+
170
+ snippets:
171
+ index:
172
+ title: Snippets
173
+ new_link: Créer Nouveau Snippet
174
+ edit: Modifier
175
+ delete: Supprimer
176
+ are_you_sure: Confirmez-vous la suppression?
177
+ new:
178
+ title: Nouveau Snippet
179
+ edit:
180
+ title: Modification Snippet
181
+ revision: Révision
182
+ form:
183
+ create: Créer Snippet
184
+ update: Modifier Snippet
185
+
186
+ revisions:
187
+ show:
188
+ title: Révisions pour
189
+ revision: Révision
190
+ full_path: Chemin d'accès complet
191
+ slug: Nom unique
192
+ update: Update to this Révision
193
+ current: Actuel
194
+
195
+ files:
196
+ index:
197
+ title: Fichiers
198
+ new_link: Télécharger Nouveau Fichier
199
+ edit: Modifier
200
+ delete: Supprimer
201
+ are_you_sure: Confirmez-vous la suppression?
202
+ button: Télécharger Fichiers
203
+ new:
204
+ title: Nouveau Fichier
205
+ edit:
206
+ title: Modification Fichier
207
+ form:
208
+ current_file: Fichier actuel
209
+ create: Télécharger Fichier
210
+ update: Modifier Fichier
211
+ page_form:
212
+ are_you_sure: Confirmez-vous la suppression?
213
+ file:
214
+ are_you_sure: Confirmez-vous la suppression?
215
+
216
+ categories:
217
+ index:
218
+ label: Catégories
219
+ edit: Modifier
220
+ done: Effectué
221
+ all: Tout
222
+ add: Ajouter
223
+ show:
224
+ are_you_sure: Confirmez-vous la suppression?
225
+ edit:
226
+ save: Enregistrer
227
+ form:
228
+ label: Catégories
229
+
230
+ dialogs:
231
+ image:
232
+ insert: Insérer Image
233
+ link:
234
+ create: Créer Lien
@@ -13,7 +13,7 @@ pt-BR:
13
13
  cms/layout: Leiaute
14
14
  cms/page: Página
15
15
  cms/snippet: Fragmento
16
- cms/file: File
16
+ cms/file: Arquivo
17
17
  attributes:
18
18
  cms/site:
19
19
  identifier: Identificador
@@ -91,6 +91,7 @@ class ComfortableMexicanSofa::Configuration
91
91
  @revisions_limit = 25
92
92
  @locales = {
93
93
  'en' => 'English',
94
+ 'fr' => 'Français',
94
95
  'es' => 'Español',
95
96
  'pt-BR' => 'Português Brasileiro',
96
97
  'zh-CN' => '简体中文',
@@ -1,20 +1,20 @@
1
1
  module ComfortableMexicanSofa::Fixtures
2
2
 
3
- def self.import_all(to_hostname, from_hostname = nil)
4
- import_layouts to_hostname, from_hostname
5
- import_pages to_hostname, from_hostname
6
- import_snippets to_hostname, from_hostname
3
+ def self.import_all(to_site, from_folder = nil)
4
+ import_layouts to_site, from_folder
5
+ import_pages to_site, from_folder
6
+ import_snippets to_site, from_folder
7
7
  end
8
8
 
9
- def self.export_all(from_hostname, to_hostname = nil)
10
- export_layouts from_hostname, to_hostname
11
- export_pages from_hostname, to_hostname
12
- export_snippets from_hostname, to_hostname
9
+ def self.export_all(from_site, to_folder = nil)
10
+ export_layouts from_site, to_folder
11
+ export_pages from_site, to_folder
12
+ export_snippets from_site, to_folder
13
13
  end
14
14
 
15
- def self.import_layouts(to_hostname, from_hostname = nil, path = nil, root = true, parent = nil, layout_ids = [])
16
- site = Cms::Site.find_or_create_by_hostname(to_hostname)
17
- unless path ||= find_fixtures_path((from_hostname || to_hostname), 'layouts')
15
+ def self.import_layouts(to_site, from_folder = nil, path = nil, root = true, parent = nil, layout_ids = [])
16
+ site = Cms::Site.find_or_create_by_identifier(to_site)
17
+ unless path ||= find_fixtures_path((from_folder || to_site), 'layouts')
18
18
  ComfortableMexicanSofa.logger.warn('Cannot find Layout fixtures')
19
19
  return []
20
20
  end
@@ -66,7 +66,7 @@ module ComfortableMexicanSofa::Fixtures
66
66
  layout_ids << layout.id
67
67
 
68
68
  # checking for nested fixtures
69
- layout_ids += import_layouts(to_hostname, from_hostname, path, false, layout, layout_ids)
69
+ layout_ids += import_layouts(to_site, from_folder, path, false, layout, layout_ids)
70
70
  end
71
71
 
72
72
  # removing all db entries that are not in fixtures
@@ -79,9 +79,9 @@ module ComfortableMexicanSofa::Fixtures
79
79
  layout_ids.uniq
80
80
  end
81
81
 
82
- def self.import_pages(to_hostname, from_hostname = nil, path = nil, root = true, parent = nil, page_ids = [])
83
- site = Cms::Site.find_or_create_by_hostname(to_hostname)
84
- unless path ||= find_fixtures_path((from_hostname || to_hostname), 'pages')
82
+ def self.import_pages(to_site, from_folder = nil, path = nil, root = true, parent = nil, page_ids = [])
83
+ site = Cms::Site.find_or_create_by_identifier(to_site)
84
+ unless path ||= find_fixtures_path((from_folder || to_site), 'pages')
85
85
  ComfortableMexicanSofa.logger.warn('Cannot find Page fixtures')
86
86
  return []
87
87
  end
@@ -113,7 +113,7 @@ module ComfortableMexicanSofa::Fixtures
113
113
  blocks_to_clear = page.blocks.collect(&:identifier)
114
114
  blocks_attributes = [ ]
115
115
  Dir.glob("#{path}/*.html").each do |file_path|
116
- identifier = file_path.split('/').last.split('.').first
116
+ identifier = file_path.split('/').last.gsub(/\.html$/, '')
117
117
  blocks_to_clear.delete(identifier)
118
118
  if page.new_record? || File.mtime(file_path) > page.updated_at
119
119
  blocks_attributes << {
@@ -144,7 +144,7 @@ module ComfortableMexicanSofa::Fixtures
144
144
  page_ids << page.id
145
145
 
146
146
  # checking for nested fixtures
147
- page_ids += import_pages(to_hostname, from_hostname, path, false, page, page_ids)
147
+ page_ids += import_pages(to_site, from_folder, path, false, page, page_ids)
148
148
  end
149
149
 
150
150
  # removing all db entries that are not in fixtures
@@ -157,9 +157,9 @@ module ComfortableMexicanSofa::Fixtures
157
157
  page_ids.uniq
158
158
  end
159
159
 
160
- def self.import_snippets(to_hostname, from_hostname = nil)
161
- site = Cms::Site.find_or_create_by_hostname(to_hostname)
162
- unless path = find_fixtures_path((from_hostname || to_hostname), 'snippets')
160
+ def self.import_snippets(to_site, from_folder = nil)
161
+ site = Cms::Site.find_or_create_by_identifier(to_site)
162
+ unless path = find_fixtures_path((from_folder || to_site), 'snippets')
163
163
  ComfortableMexicanSofa.logger.warn('Cannot find Snippet fixtures')
164
164
  return []
165
165
  end
@@ -203,9 +203,9 @@ module ComfortableMexicanSofa::Fixtures
203
203
  ComfortableMexicanSofa.logger.warn('Imported Snippets!')
204
204
  end
205
205
 
206
- def self.export_layouts(from_hostname, to_hostname = nil)
207
- return unless site = Cms::Site.find_by_hostname(from_hostname)
208
- path = File.join(ComfortableMexicanSofa.config.fixtures_path, (to_hostname || site.hostname), 'layouts')
206
+ def self.export_layouts(from_site, to_folder = nil)
207
+ return unless site = Cms::Site.find_by_identifier(from_site)
208
+ path = File.join(ComfortableMexicanSofa.config.fixtures_path, (to_folder || site.identifier), 'layouts')
209
209
  FileUtils.rm_rf(path)
210
210
  FileUtils.mkdir_p(path)
211
211
 
@@ -233,9 +233,9 @@ module ComfortableMexicanSofa::Fixtures
233
233
  end
234
234
  end
235
235
 
236
- def self.export_pages(from_hostname, to_hostname = nil)
237
- return unless site = Cms::Site.find_by_hostname(from_hostname)
238
- path = File.join(ComfortableMexicanSofa.config.fixtures_path, (to_hostname || site.hostname), 'pages')
236
+ def self.export_pages(from_site, to_folder = nil)
237
+ return unless site = Cms::Site.find_by_identifier(from_site)
238
+ path = File.join(ComfortableMexicanSofa.config.fixtures_path, (to_folder || site.identifier), 'pages')
239
239
  FileUtils.rm_rf(path)
240
240
  FileUtils.mkdir_p(path)
241
241
 
@@ -262,9 +262,9 @@ module ComfortableMexicanSofa::Fixtures
262
262
  end
263
263
  end
264
264
 
265
- def self.export_snippets(from_hostname, to_hostname = nil)
266
- return unless site = Cms::Site.find_by_hostname(from_hostname)
267
- path = File.join(ComfortableMexicanSofa.config.fixtures_path, (to_hostname || site.hostname), 'snippets')
265
+ def self.export_snippets(from_site, to_folder = nil)
266
+ return unless site = Cms::Site.find_by_identifier(from_site)
267
+ path = File.join(ComfortableMexicanSofa.config.fixtures_path, (to_folder || site.identifier), 'snippets')
268
268
  FileUtils.rm_rf(path)
269
269
  FileUtils.mkdir_p(path)
270
270
 
@@ -281,8 +281,8 @@ module ComfortableMexicanSofa::Fixtures
281
281
 
282
282
  protected
283
283
 
284
- def self.find_fixtures_path(hostname, dir)
285
- path = File.join(ComfortableMexicanSofa.config.fixtures_path, hostname, dir)
284
+ def self.find_fixtures_path(identifier, dir)
285
+ path = File.join(ComfortableMexicanSofa.config.fixtures_path, identifier, dir)
286
286
  File.exists?(path) ? path : nil
287
287
  end
288
288
 
@@ -6,7 +6,7 @@ end
6
6
  namespace :comfortable_mexican_sofa do
7
7
  namespace :fixtures do
8
8
 
9
- desc 'Import Fixture data into database (options: FROM=example.local TO=example.com)'
9
+ desc 'Import Fixture data into database (options: FROM=folder_name TO=site_identifier)'
10
10
 
11
11
  task :import => :environment do
12
12
  to = ENV['TO'] || ENV['FROM']
@@ -23,7 +23,7 @@ namespace :comfortable_mexican_sofa do
23
23
  ComfortableMexicanSofa.logger = logger_org
24
24
  end
25
25
 
26
- desc 'Export database data into Fixtures (options: FROM=example.com TO=example.local)'
26
+ desc 'Export database data into Fixtures (options: FROM=site_identifier.com TO=folder_name)'
27
27
  task :export => :environment do
28
28
  to = ENV['TO'] || ENV['FROM']
29
29
  from = ENV['FROM']
@@ -5,8 +5,7 @@ require File.expand_path('../test_helper', File.dirname(__FILE__))
5
5
  class FixturesTest < ActionDispatch::IntegrationTest
6
6
 
7
7
  def setup
8
- host! 'example.com'
9
- cms_sites(:default).update_column(:hostname, 'example.com')
8
+ cms_sites(:default).update_column(:identifier, 'sample-site')
10
9
  end
11
10
 
12
11
  def test_fixtures_disabled
@@ -60,6 +60,22 @@ class SitesTest < ActionDispatch::IntegrationTest
60
60
  end
61
61
  end
62
62
 
63
+ def test_get_public_page_with_host_with_port
64
+ Cms::Site.delete_all
65
+ site_a = Cms::Site.create!(:identifier => 'site-a', :hostname => 'test.host:3000')
66
+ site_b = Cms::Site.create!(:identifier => 'site-b', :hostname => 'test.host')
67
+
68
+ [site_a, site_b].each do |site|
69
+ layout = site.layouts.create!(:identifier => 'test')
70
+ site.pages.create!(:label => 'index', :layout => layout)
71
+ site.pages.create!(:label => '404', :slug => '404', :layout => layout)
72
+ end
73
+
74
+ get '/'
75
+ assert assigns(:cms_site)
76
+ assert_equal site_b, assigns(:cms_site)
77
+ end
78
+
63
79
  def test_get_public_with_locale
64
80
  get '/'
65
81
  assert_response :success
@@ -99,7 +115,6 @@ class SitesTest < ActionDispatch::IntegrationTest
99
115
  assert_equal :en, I18n.locale
100
116
 
101
117
  I18n.default_locale = :en
102
-
103
118
  end
104
119
 
105
120
  end
@@ -8,7 +8,7 @@ class FixturesTest < ActiveSupport::TestCase
8
8
  Cms::Layout.delete_all
9
9
 
10
10
  assert_difference 'Cms::Layout.count', 2 do
11
- ComfortableMexicanSofa::Fixtures.import_layouts('test.host', 'example.com')
11
+ ComfortableMexicanSofa::Fixtures.import_layouts('default-site', 'sample-site')
12
12
 
13
13
  assert layout = Cms::Layout.find_by_identifier('default')
14
14
  assert_equal 'Default Fixture Layout', layout.label
@@ -34,7 +34,7 @@ class FixturesTest < ActiveSupport::TestCase
34
34
  child_layout.update_column(:updated_at, 10.years.ago)
35
35
 
36
36
  assert_difference 'Cms::Layout.count', -1 do
37
- ComfortableMexicanSofa::Fixtures.import_layouts('test.host', 'example.com')
37
+ ComfortableMexicanSofa::Fixtures.import_layouts('default-site', 'sample-site')
38
38
 
39
39
  layout.reload
40
40
  assert_equal 'Default Fixture Layout', layout.label
@@ -57,7 +57,7 @@ class FixturesTest < ActiveSupport::TestCase
57
57
 
58
58
  def test_import_layouts_ignoring
59
59
  layout = cms_layouts(:default)
60
- layout_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'example.com', 'layouts', 'default')
60
+ layout_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'sample-site', 'layouts', 'default')
61
61
  attr_file_path = File.join(layout_path, '_default.yml')
62
62
  content_file_path = File.join(layout_path, 'content.html')
63
63
  css_file_path = File.join(layout_path, 'css.css')
@@ -68,7 +68,7 @@ class FixturesTest < ActiveSupport::TestCase
68
68
  assert layout.updated_at >= File.mtime(css_file_path)
69
69
  assert layout.updated_at >= File.mtime(js_file_path)
70
70
 
71
- ComfortableMexicanSofa::Fixtures.import_layouts('test.host', 'example.com')
71
+ ComfortableMexicanSofa::Fixtures.import_layouts('default-site', 'sample-site')
72
72
  layout.reload
73
73
  assert_equal 'default', layout.identifier
74
74
  assert_equal 'Default Layout', layout.label
@@ -87,7 +87,7 @@ class FixturesTest < ActiveSupport::TestCase
87
87
  nested.update_column(:content, '<html>{{cms:page:left}}<br/>{{cms:page:right}}</html>')
88
88
 
89
89
  assert_difference 'Cms::Page.count', 2 do
90
- ComfortableMexicanSofa::Fixtures.import_pages('test.host', 'example.com')
90
+ ComfortableMexicanSofa::Fixtures.import_pages('default-site', 'sample-site')
91
91
 
92
92
  assert page = Cms::Page.find_by_full_path('/')
93
93
  assert_equal layout, page.layout
@@ -114,7 +114,7 @@ class FixturesTest < ActiveSupport::TestCase
114
114
  child.update_column(:slug, 'old')
115
115
 
116
116
  assert_no_difference 'Cms::Page.count' do
117
- ComfortableMexicanSofa::Fixtures.import_pages('test.host', 'example.com')
117
+ ComfortableMexicanSofa::Fixtures.import_pages('default-site', 'sample-site')
118
118
 
119
119
  page.reload
120
120
  assert_equal 'Home Fixture Page', page.label
@@ -132,14 +132,14 @@ class FixturesTest < ActiveSupport::TestCase
132
132
  :blocks_attributes => [ { :identifier => 'content', :content => 'test content' } ]
133
133
  )
134
134
 
135
- page_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'example.com', 'pages', 'index')
135
+ page_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'sample-site', 'pages', 'index')
136
136
  attr_file_path = File.join(page_path, '_index.yml')
137
137
  content_file_path = File.join(page_path, 'content.html')
138
138
 
139
139
  assert page.updated_at >= File.mtime(attr_file_path)
140
140
  assert page.updated_at >= File.mtime(content_file_path)
141
141
 
142
- ComfortableMexicanSofa::Fixtures.import_pages('test.host', 'example.com')
142
+ ComfortableMexicanSofa::Fixtures.import_pages('default-site', 'sample-site')
143
143
  page.reload
144
144
 
145
145
  assert_equal nil, page.slug
@@ -158,7 +158,7 @@ class FixturesTest < ActiveSupport::TestCase
158
158
  )
159
159
  page.update_column(:updated_at, 10.years.ago)
160
160
 
161
- ComfortableMexicanSofa::Fixtures.import_pages('test.host', 'example.com')
161
+ ComfortableMexicanSofa::Fixtures.import_pages('default-site', 'sample-site')
162
162
  page.reload
163
163
 
164
164
  block = page.blocks.where(:identifier => 'content').first
@@ -172,7 +172,7 @@ class FixturesTest < ActiveSupport::TestCase
172
172
  Cms::Snippet.delete_all
173
173
 
174
174
  assert_difference 'Cms::Snippet.count' do
175
- ComfortableMexicanSofa::Fixtures.import_snippets('test.host', 'example.com')
175
+ ComfortableMexicanSofa::Fixtures.import_snippets('default-site', 'sample-site')
176
176
  assert snippet = Cms::Snippet.last
177
177
  assert_equal 'default', snippet.identifier
178
178
  assert_equal 'Default Fixture Snippet', snippet.label
@@ -188,7 +188,7 @@ class FixturesTest < ActiveSupport::TestCase
188
188
  assert_equal 'default_snippet_content', snippet.content
189
189
 
190
190
  assert_no_difference 'Cms::Snippet.count' do
191
- ComfortableMexicanSofa::Fixtures.import_snippets('test.host', 'example.com')
191
+ ComfortableMexicanSofa::Fixtures.import_snippets('default-site', 'sample-site')
192
192
  snippet.reload
193
193
  assert_equal 'default', snippet.identifier
194
194
  assert_equal 'Default Fixture Snippet', snippet.label
@@ -201,7 +201,7 @@ class FixturesTest < ActiveSupport::TestCase
201
201
  snippet.update_column(:identifier, 'old')
202
202
 
203
203
  assert_no_difference 'Cms::Snippet.count' do
204
- ComfortableMexicanSofa::Fixtures.import_snippets('test.host', 'example.com')
204
+ ComfortableMexicanSofa::Fixtures.import_snippets('default-site', 'sample-site')
205
205
  assert snippet = Cms::Snippet.last
206
206
  assert_equal 'default', snippet.identifier
207
207
  assert_equal 'Default Fixture Snippet', snippet.label
@@ -213,14 +213,14 @@ class FixturesTest < ActiveSupport::TestCase
213
213
 
214
214
  def test_import_snippets_ignoring
215
215
  snippet = cms_snippets(:default)
216
- snippet_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'example.com', 'snippets', 'default')
216
+ snippet_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'sample-site', 'snippets', 'default')
217
217
  attr_file_path = File.join(snippet_path, '_default.yml')
218
218
  content_file_path = File.join(snippet_path, 'content.html')
219
219
 
220
220
  assert snippet.updated_at >= File.mtime(attr_file_path)
221
221
  assert snippet.updated_at >= File.mtime(content_file_path)
222
222
 
223
- ComfortableMexicanSofa::Fixtures.import_snippets('test.host', 'example.com')
223
+ ComfortableMexicanSofa::Fixtures.import_snippets('default-site', 'sample-site')
224
224
  snippet.reload
225
225
  assert_equal 'default', snippet.identifier
226
226
  assert_equal 'Default Snippet', snippet.label
@@ -235,7 +235,7 @@ class FixturesTest < ActiveSupport::TestCase
235
235
  assert_difference 'Cms::Layout.count', 2 do
236
236
  assert_difference 'Cms::Page.count', 2 do
237
237
  assert_difference 'Cms::Snippet.count', 1 do
238
- ComfortableMexicanSofa::Fixtures.import_all('test.host', 'example.com')
238
+ ComfortableMexicanSofa::Fixtures.import_all('default-site', 'sample-site')
239
239
  end
240
240
  end
241
241
  end
@@ -248,7 +248,7 @@ class FixturesTest < ActiveSupport::TestCase
248
248
  assert_difference 'Cms::Layout.count', 2 do
249
249
  assert_difference 'Cms::Page.count', 2 do
250
250
  assert_difference 'Cms::Snippet.count', 1 do
251
- ComfortableMexicanSofa::Fixtures.import_all('test.host', 'example.com')
251
+ ComfortableMexicanSofa::Fixtures.import_all('default-site', 'sample-site')
252
252
  end
253
253
  end
254
254
  end
@@ -256,7 +256,7 @@ class FixturesTest < ActiveSupport::TestCase
256
256
  end
257
257
 
258
258
  def test_export_layouts
259
- host_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'test.test')
259
+ host_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'test-site')
260
260
  layout_1_attr_path = File.join(host_path, 'layouts/nested/_nested.yml')
261
261
  layout_1_content_path = File.join(host_path, 'layouts/nested/content.html')
262
262
  layout_1_css_path = File.join(host_path, 'layouts/nested/css.css')
@@ -266,7 +266,7 @@ class FixturesTest < ActiveSupport::TestCase
266
266
  layout_2_css_path = File.join(host_path, 'layouts/nested/child/css.css')
267
267
  layout_2_js_path = File.join(host_path, 'layouts/nested/child/js.js')
268
268
 
269
- ComfortableMexicanSofa::Fixtures.export_layouts('test.host', 'test.test')
269
+ ComfortableMexicanSofa::Fixtures.export_layouts('default-site', 'test-site')
270
270
 
271
271
  assert File.exists?(layout_1_attr_path)
272
272
  assert File.exists?(layout_1_content_path)
@@ -302,13 +302,13 @@ class FixturesTest < ActiveSupport::TestCase
302
302
  end
303
303
 
304
304
  def test_export_pages
305
- host_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'test.test')
305
+ host_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'test-site')
306
306
  page_1_attr_path = File.join(host_path, 'pages/index/_index.yml')
307
307
  page_1_block_a_path = File.join(host_path, 'pages/index/default_field_text.html')
308
308
  page_1_block_b_path = File.join(host_path, 'pages/index/default_page_text.html')
309
309
  page_2_attr_path = File.join(host_path, 'pages/index/child-page/_child-page.yml')
310
310
 
311
- ComfortableMexicanSofa::Fixtures.export_pages('test.host', 'test.test')
311
+ ComfortableMexicanSofa::Fixtures.export_pages('default-site', 'test-site')
312
312
 
313
313
  assert_equal ({
314
314
  'label' => 'Default Page',
@@ -334,11 +334,11 @@ class FixturesTest < ActiveSupport::TestCase
334
334
  end
335
335
 
336
336
  def test_export_snippets
337
- host_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'test.test')
337
+ host_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'test-site')
338
338
  attr_path = File.join(host_path, 'snippets/default/_default.yml')
339
339
  content_path = File.join(host_path, 'snippets/default/content.html')
340
340
 
341
- ComfortableMexicanSofa::Fixtures.export_snippets('test.host', 'test.test')
341
+ ComfortableMexicanSofa::Fixtures.export_snippets('default-site', 'test-site')
342
342
 
343
343
  assert File.exists?(attr_path)
344
344
  assert File.exists?(content_path)
@@ -349,8 +349,8 @@ class FixturesTest < ActiveSupport::TestCase
349
349
  end
350
350
 
351
351
  def test_export_all
352
- host_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'test.test')
353
- ComfortableMexicanSofa::Fixtures.export_all('test.host', 'test.test')
352
+ host_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'test-site')
353
+ ComfortableMexicanSofa::Fixtures.export_all('default-site', 'test-site')
354
354
  FileUtils.rm_rf(host_path)
355
355
  end
356
356
 
@@ -225,9 +225,9 @@ class MirrorsTest < ActiveSupport::TestCase
225
225
  :is_mirrored => true
226
226
  )
227
227
  mirror.reload
228
-
229
228
  assert_no_difference ['site.layouts.count', 'site.pages.count', 'site.snippets.count'] do
230
229
  mirror.destroy
230
+ site.reload
231
231
  end
232
232
  end
233
233
 
@@ -184,7 +184,9 @@ class CmsPageTest < ActiveSupport::TestCase
184
184
 
185
185
  def test_cascading_destroy
186
186
  assert_difference 'Cms::Page.count', -2 do
187
- cms_pages(:default).destroy
187
+ assert_difference 'Cms::Block.count', -2 do
188
+ cms_pages(:default).destroy
189
+ end
188
190
  end
189
191
  end
190
192
 
@@ -4,7 +4,7 @@ class CmsSiteTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_fixtures_validity
6
6
  Cms::Site.all.each do |site|
7
- assert site.valid?, site.errors.full_messages.to_s
7
+ assert site.valid?, site.errors.inspect
8
8
  end
9
9
  end
10
10
 
@@ -22,7 +22,10 @@ class CmsSiteTest < ActiveSupport::TestCase
22
22
  assert_has_errors_on site, :identifier
23
23
 
24
24
  site = Cms::Site.new(:identifier => 'test', :hostname => 'site.host')
25
- assert site.valid?, site.errors.to_yaml
25
+ assert site.valid?, site.errors.inspect
26
+
27
+ site = Cms::Site.new(:identifier => 'test', :hostname => 'localhost:3000')
28
+ assert site.valid?, site.errors.inspect
26
29
  end
27
30
 
28
31
  def test_validation_path_uniqueness
@@ -49,6 +52,12 @@ class CmsSiteTest < ActiveSupport::TestCase
49
52
  assert_equal 'my_site_host', site.identifier
50
53
  end
51
54
 
55
+ def test_hostname_assignment
56
+ site = Cms::Site.new(:identifier => 'test-site')
57
+ assert site.valid?
58
+ assert_equal 'test-site', site.hostname
59
+ end
60
+
52
61
  def test_label_assignment
53
62
  site = Cms::Site.new(:identifier => 'test', :hostname => 'my-site.host')
54
63
  assert site.valid?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comfortable_mexican_sofa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.25
4
+ version: 1.6.26
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-12 00:00:00.000000000 Z
13
+ date: 2013-01-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -228,6 +228,7 @@ files:
228
228
  - config/locales/de.yml
229
229
  - config/locales/en.yml
230
230
  - config/locales/es.yml
231
+ - config/locales/fr.yml
231
232
  - config/locales/ja.yml
232
233
  - config/locales/pl.yml
233
234
  - config/locales/pt-BR.yml
@@ -235,21 +236,21 @@ files:
235
236
  - config/locales/sv.yml
236
237
  - config/locales/zh-CN.yml
237
238
  - config/routes.rb
238
- - db/cms_fixtures/example.com/layouts/default/_default.yml
239
- - db/cms_fixtures/example.com/layouts/default/content.html
240
- - db/cms_fixtures/example.com/layouts/default/css.css
241
- - db/cms_fixtures/example.com/layouts/default/js.js
242
- - db/cms_fixtures/example.com/layouts/default/nested/_nested.yml
243
- - db/cms_fixtures/example.com/layouts/default/nested/content.html
244
- - db/cms_fixtures/example.com/layouts/default/nested/css.css
245
- - db/cms_fixtures/example.com/layouts/default/nested/js.js
246
- - db/cms_fixtures/example.com/pages/index/_index.yml
247
- - db/cms_fixtures/example.com/pages/index/child/_child.yml
248
- - db/cms_fixtures/example.com/pages/index/child/left.html
249
- - db/cms_fixtures/example.com/pages/index/child/right.html
250
- - db/cms_fixtures/example.com/pages/index/content.html
251
- - db/cms_fixtures/example.com/snippets/default/_default.yml
252
- - db/cms_fixtures/example.com/snippets/default/content.html
239
+ - db/cms_fixtures/sample-site/layouts/default/_default.yml
240
+ - db/cms_fixtures/sample-site/layouts/default/content.html
241
+ - db/cms_fixtures/sample-site/layouts/default/css.css
242
+ - db/cms_fixtures/sample-site/layouts/default/js.js
243
+ - db/cms_fixtures/sample-site/layouts/default/nested/_nested.yml
244
+ - db/cms_fixtures/sample-site/layouts/default/nested/content.html
245
+ - db/cms_fixtures/sample-site/layouts/default/nested/css.css
246
+ - db/cms_fixtures/sample-site/layouts/default/nested/js.js
247
+ - db/cms_fixtures/sample-site/pages/index/_index.yml
248
+ - db/cms_fixtures/sample-site/pages/index/child/_child.yml
249
+ - db/cms_fixtures/sample-site/pages/index/child/left.html
250
+ - db/cms_fixtures/sample-site/pages/index/child/right.html
251
+ - db/cms_fixtures/sample-site/pages/index/content.html
252
+ - db/cms_fixtures/sample-site/snippets/default/_default.yml
253
+ - db/cms_fixtures/sample-site/snippets/default/content.html
253
254
  - db/migrate/01_create_cms.rb
254
255
  - db/seeds.rb
255
256
  - db/upgrade_migrations/02_upgrade_to_1_1_0.rb
@@ -300,7 +301,6 @@ files:
300
301
  - lib/generators/comfy/cms/README
301
302
  - lib/generators/comfy/cms/cms_generator.rb
302
303
  - lib/tasks/comfortable_mexican_sofa.rake
303
- - rvmrc.example
304
304
  - script/rails
305
305
  - test/fixtures/cms/blocks.yml
306
306
  - test/fixtures/cms/categories.yml
@@ -389,7 +389,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
389
389
  version: '0'
390
390
  segments:
391
391
  - 0
392
- hash: -4349925487218817830
392
+ hash: 1707127231452077452
393
393
  required_rubygems_version: !ruby/object:Gem::Requirement
394
394
  none: false
395
395
  requirements:
@@ -1 +0,0 @@
1
- rvm use 1.9.2@comfortable-mexican-sofa --create