github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

ryankinderman / mimic_ssl

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 6
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A Ruby on Rails plugin that allows an application using the ssl_requirement plugin to behave as if there is an SSL server running when there isn't. — Read more

  cancel

http://kinderman.net/articles/tag/mimic_ssl

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

removed unnecessary extension from README 
ryankinderman (author)
Fri Nov 14 14:53:25 -0800 2008
commit  c5db7e7dcc7dff242d81e50f46e63a12528ea23e
tree    0345c22a69ab7f4db2b78c07bb3e0cc74985e67f
parent  3a158be2f19b801120b52172f22655c378e8a676
mimic_ssl /
name age
history
message
file .gitignore Loading commit data...
file README
file Rakefile
file init.rb Wed Nov 12 11:05:43 -0800 2008 namespaced try_require method, added conditiona... [ryankinderman]
directory lib/
directory test/
README
= mimic_ssl plugin
 
* http://github.com/ryankinderman/mimic_ssl
* http://kinderman.net
 
== DESCRIPTION:

This is a Ruby on Rails plugin that allows an application using the 
ssl_requirement[http://github.com/rails/ssl_requirement] plugin to behave as if there is an SSL server running when 
there isn't. It does this by patching the way that Rails determines if a particular request is an SSL request and, 
correspondingly, the way that it and the ssl_requirement plugin construct a URL that targets the SSL protocol.

This patch makes it possible to test the SSL-dependent behavior of the system without having to actually set up an SSL 
server. This is useful if you don't want to go through the hassle and configuration limitations of running a local SSL 
server or proxy, but still want a way to test the SSL-dependent behavior of your application in, for example, Selenium, 
or manually in development mode.

== INSTALL:
  
  % cd <rails_app_directory>
  % script/plugin install git://github.com/ryankinderman/mimic_ssl.git
  
== USAGE:

To load the patches and functionality provided by the plugin, you must set the MIMIC_SSL environment variable to "true", 
either on the command-line, or in the environment-loading logic of your application, mabye based on some conditions. So, 
for example, you can do:

  % MIMIC_SSL=true script/server

or, in environment.rb, maybe something like:

  ...
  mimic_ssl_environments = ['development', 'selenium']
  
  Rails::Initializer.run do |config|
    ...
    ENV['MIMIC_SSL'] = mimic_ssl_environments.include?(ENV['RAILS_ENV']).to_s
    ...
  end
  ...

This was done so that the overhead of mimicking SSL can be completely avoided in production environments. How you manage 
this switch is completely up to you.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server