comfortable_mexican_sofa 1.0.45 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -160,7 +160,16 @@ There's a rake task that makes moving seeds into database (and vice-versa) easy:
160
160
  # from database to seeds
161
161
  rake comfortable_mexican_sofa:export:all FROM=your-site.com TO=your-site.local SEED_PATH=/path/to/seeds
162
162
 
163
- ---
163
+ Active Components
164
+ -----------------
165
+ Comfortable Mexican Sofa utilizes the following:
166
+
167
+ * **[https://github.com/rails/rails](https://github.com/rails/rails)** - Ruby on Rails 3.*, of course
168
+ * **[https://github.com/thoughtbot/paperclip](https://github.com/thoughtbot/paperclip)** - Paperclip to handle file uploads
169
+ * **[https://github.com/theworkinggroup/active_link_to](https://github.com/theworkinggroup/active_link_to)** - Easy method to handle logic behind 'active' links
170
+
171
+ * * *
172
+
164
173
  ![Looks pretty comfortable to me. No idea what makes it Mexican.](https://github.com/twg/comfortable-mexican-sofa/raw/master/doc/sofa.png)
165
174
 
166
175
  ComfortableMexicanSofa is released under the [MIT license](https://github.com/twg/comfortable-mexican-sofa/raw/master/LICENSE)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.45
1
+ 1.0.46
@@ -4,7 +4,7 @@ class CmsContentController < ApplicationController
4
4
  before_filter :load_cms_page, :only => :render_html
5
5
  before_filter :load_cms_layout, :only => [:render_css, :render_js]
6
6
 
7
- caches_page :render_css, :render_js
7
+ caches_page :render_css, :render_js, :if => ComfortableMexicanSofa.config.enable_caching
8
8
 
9
9
  def render_html(status = 200)
10
10
  layout = @cms_page.cms_layout.app_layout.blank?? false : @cms_page.cms_layout.app_layout
@@ -4,8 +4,8 @@
4
4
  <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5
5
  <title><%= ComfortableMexicanSofa.config.cms_title %></title>
6
6
  <%= csrf_meta_tag %>
7
- <%= stylesheet_link_tag :cms, :cache => '_cms' %>
8
- <%= javascript_include_tag :cms %>
7
+ <%= stylesheet_link_tag :cms, :cache => ('_cms' if ComfortableMexicanSofa.config.enable_caching) %>
8
+ <%= javascript_include_tag :cms, :cache => ('_cms' if ComfortableMexicanSofa.config.enable_caching) %>
9
9
  <%= yield :head %>
10
10
  <%= cms_hook :html_head %>
11
11
  </head>
@@ -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.0.45"
8
+ s.version = "1.0.46"
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-02-17}
12
+ s.date = %q{2011-02-22}
13
13
  s.description = %q{}
14
14
  s.email = %q{oleg@theworkinggroup.ca}
15
15
  s.extra_rdoc_files = [
@@ -26,6 +26,12 @@ ComfortableMexicanSofa.configure do |config|
26
26
  # Generally this is to prevent putting something like this:
27
27
  # <% User.delete_all %> but if you really want to allow it...
28
28
  # config.disable_irb = true
29
+
30
+ # Asset caching for CSS and JS for admin layout. This setting also controls
31
+ # page caching for CMS Layout CSS and Javascript. Enabled by default. When deploying
32
+ # to an environment with read-only filesystem (like Heroku) turn this setting off.
33
+ # config.enable_caching = true
34
+
29
35
  end
30
36
 
31
37
  # Default credentials for ComfortableMexicanSofa::HttpAuth
@@ -24,6 +24,9 @@ class ComfortableMexicanSofa::Configuration
24
24
  # Not allowing irb code to be run inside page content. True by default.
25
25
  attr_accessor :disable_irb
26
26
 
27
+ # Caching for css/js. For admin layout and ones for cms content. Enabled by default.
28
+ attr_accessor :enable_caching
29
+
27
30
  # Configuration defaults
28
31
  def initialize
29
32
  @cms_title = 'ComfortableMexicanSofa MicroCMS'
@@ -33,6 +36,7 @@ class ComfortableMexicanSofa::Configuration
33
36
  @admin_route_redirect = "/#{@admin_route_prefix}/pages"
34
37
  @auto_manage_sites = true
35
38
  @disable_irb = true
39
+ @enable_caching = true
36
40
  end
37
41
 
38
42
  end
@@ -21,6 +21,7 @@ class ActiveSupport::TestCase
21
21
  config.admin_route_redirect = "/cms-admin/pages"
22
22
  config.auto_manage_sites = true
23
23
  config.disable_irb = true
24
+ config.enable_caching = true
24
25
  end
25
26
  ComfortableMexicanSofa::HttpAuth.username = 'username'
26
27
  ComfortableMexicanSofa::HttpAuth.password = 'password'
@@ -10,6 +10,7 @@ class CmsConfigurationTest < ActiveSupport::TestCase
10
10
  assert_equal 'cms-admin', config.admin_route_prefix
11
11
  assert_equal '/cms-admin/pages', config.admin_route_redirect
12
12
  assert_equal true, config.disable_irb
13
+ assert_equal true, config.enable_caching
13
14
  end
14
15
 
15
16
  def test_initialization_overrides
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 45
9
- version: 1.0.45
8
+ - 46
9
+ version: 1.0.46
10
10
  platform: ruby
11
11
  authors:
12
12
  - Oleg Khabarov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-17 00:00:00 -05:00
18
+ date: 2011-02-22 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -384,7 +384,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
384
384
  requirements:
385
385
  - - ">="
386
386
  - !ruby/object:Gem::Version
387
- hash: -53123372768433435
387
+ hash: 680801473721567613
388
388
  segments:
389
389
  - 0
390
390
  version: "0"