No commit activity in last 3 years
No release in over 3 years
Including Google Charts in your SSL-protected site causes warnings about 'Mixed Content' (particularly in Internet Explorer). This Rack middleware allows you to point those img tags at a local path instead of Google. The image is retreived by your server then delivered to your client over your SSL connection.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

GoogleChartSSL¶ ↑

Including Google Charts in your SSL-protected site causes warnings about ‘Mixed Content’ (particularly in Internet Explorer). This Rack middleware allows you to point those img tags at a local path instead of Google. The image is retreived by your server then delivered to your client over your SSL connection.

Installation¶ ↑

gem intall google_chart_ssl

Usage¶ ↑

require 'google_chart_ssl'
use GoogleChartSsl

Or, if you are using Bundler, just add this to your Gemfile:

gem 'google_chart_ssl'

To use GoogleChartSSL in your Rails application, add the following line to your application config file (config/application.rb for Rails3, config/environment.rb for Rails2):

config.middleware.use GoogleChartSsl

Now, instead of making your chart request to chart.apis.google.com/chart, just send that request to /google_chart will be forwarded to google and returned over your server’s connection.

Example¶ ↑

<img src="http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World">

becomes:

<img src="/google_chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World">

TODO¶ ↑

  • Automatically insert a view helper in Rails

Credits¶ ↑

  • Project layout provided by Bundler.

  • test setup, and this README file inspired by Tobias Matthies’ Rack::SslEnforcer

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2011 Michael Gee. See LICENSE for details.