brighter_planet_layout 0.5.2 → 0.5.3

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.
@@ -12,7 +12,7 @@
12
12
  <div id="slogan">
13
13
  <h1>Brighter Planet™</h1>
14
14
  <p class="slogan">The computational sustainability platform</p>
15
- <p class="description">&copy;2011 Brighter Planet</p>
15
+ <p class="description">&copy;2012 Brighter Planet</p>
16
16
  </div>
17
17
  <div id="links">
18
18
  <%= render :partial => 'layouts/nav' %>
@@ -25,7 +25,7 @@
25
25
  <% if ::Rails::VERSION::MAJOR >= 3 %>
26
26
  <%= javascript_include_tag brighter_planet_layout_cdn_url("/javascripts/rails.rails-#{Rails::VERSION::STRING}.js") %>
27
27
  <% end %>
28
- <% if File.exist? File.join(::BrighterPlanet.layout.rails_root, 'public', 'javascripts', 'application.js') %>
28
+ <% if BrighterPlanet.layout.include_application_javascript? %>
29
29
  <%= javascript_include_tag "application" %>
30
30
  <% end %>
31
31
  <!-- END brighter_planet_layout javascripts -->
@@ -1,5 +1,5 @@
1
1
  module BrighterPlanet
2
2
  class Layout
3
- VERSION = '0.5.2'
3
+ VERSION = '0.5.3'
4
4
  end
5
5
  end
@@ -85,7 +85,15 @@ module BrighterPlanet
85
85
  end
86
86
 
87
87
  def include_application_stylesheet?
88
- File.exist?(File.join(rails_root, 'public', 'stylesheets', 'application.css')) || (Rails::VERSION::MAJOR == 3 && Rails::VERSION::MINOR >= 1)
88
+ supports_asset_pipeline? || File.exist?(File.join(rails_root, 'public', 'stylesheets', 'application.css'))
89
+ end
90
+
91
+ def include_application_javascript?
92
+ supports_asset_pipeline? || File.exist?(File.join(rails_root, 'public', 'javascripts', 'application.js'))
93
+ end
94
+
95
+ def supports_asset_pipeline?
96
+ Rails::VERSION::MAJOR == 3 && Rails::VERSION::MINOR >= 1
89
97
  end
90
98
 
91
99
  def serve_static_files_using_rack?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brighter_planet_layout
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andy Rossmeissl
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-03-05 00:00:00 Z
19
+ date: 2012-03-06 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: simple-rss