diff --git a/Gemfile b/Gemfile index 19b6e268..10682fa7 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ gem 'inherited_resources', '~> 1.1.2' gem 'rmagick', '2.12.2' gem 'locomotive_carrierwave', '0.5.0.1.beta3', :require => 'carrierwave' -gem 'custom_fields', '1.0.0.beta.9' +gem 'custom_fields', '1.0.0.beta.10' gem 'fog', '0.3.7' gem 'mimetype-fu' gem 'actionmailer-with-request', :require => 'actionmailer_with_request' diff --git a/Gemfile.lock b/Gemfile.lock index 518b1ab8..677e4deb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/floehopper/mocha.git - revision: 2b4e868d1907859cd03f407078bd8b630f7d0dd6 + revision: 6fe08197f214457ac122c49d96fdac8e17adbea2 specs: mocha (0.9.12.20110213002255) @@ -87,7 +87,7 @@ GEM cucumber-rails (0.3.2) cucumber (>= 0.8.0) culerity (0.2.15) - custom_fields (1.0.0.beta.9) + custom_fields (1.0.0.beta.10) activesupport (>= 3.0.4) locomotive_carrierwave mongoid (~> 2.0.0.rc.7) @@ -253,7 +253,7 @@ GEM polyglot (>= 0.3.1) trollop (1.16.2) tzinfo (0.3.27) - unicorn (3.6.1) + unicorn (3.6.2) kgio (~> 2.3) rack warden (0.10.7) @@ -276,7 +276,7 @@ DEPENDENCIES capybara cucumber (= 0.8.5) cucumber-rails - custom_fields (= 1.0.0.beta.9) + custom_fields (= 1.0.0.beta.10) database_cleaner delayed_job (= 2.1.4) delayed_job_mongoid (= 1.0.2) diff --git a/app/views/admin/content_types/edit.html.haml b/app/views/admin/content_types/edit.html.haml index 485a87d6..053284da 100644 --- a/app/views/admin/content_types/edit.html.haml +++ b/app/views/admin/content_types/edit.html.haml @@ -2,7 +2,7 @@ - content_for :submenu do = render 'admin/shared/menu/contents' - + - content_for :actions do = render 'admin/shared/actions/contents' diff --git a/lib/locomotive/hosting/heroku.rb b/lib/locomotive/hosting/heroku.rb index 5b6366e9..da00d303 100644 --- a/lib/locomotive/hosting/heroku.rb +++ b/lib/locomotive/hosting/heroku.rb @@ -35,6 +35,8 @@ module Locomotive self.enhance_site_model_with_heroku + self.apply_patches + # "cache" domains for better performance self.heroku_domains = self.heroku_connection.list_domains(self.config.heroku[:name]).collect { |h| h[:domain] } end @@ -51,6 +53,14 @@ module Locomotive Site.send :include, Locomotive::Hosting::Heroku::FirstInstallation end + def apply_patches + # for various reasons, Heroku can modify the behaviour of an application by changing the gem versions (json/pure for instance) + # so the purpose of this method is to correct those potential differences. + + # http://blog.ethanvizitei.com/2010/11/json-pure-ruins-my-morning.html + Fixnum.class_eval { def to_json(options = nil); to_s; end } + end + # manage domains def add_heroku_domain(name) diff --git a/locomotive_cms.gemspec b/locomotive_cms.gemspec index 74ade470..9e1ca89b 100644 --- a/locomotive_cms.gemspec +++ b/locomotive_cms.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |s| s.add_dependency "rmagick", "2.12.2" s.add_dependency "locomotive_carrierwave", "0.5.0.1.beta3" - s.add_dependency "custom_fields", "1.0.0.beta.9" + s.add_dependency "custom_fields", "1.0.0.beta.10" s.add_dependency "fog", "0.3.7" s.add_dependency "mimetype-fu" s.add_dependency "actionmailer-with-request"