SslRequirement module

Discussion in 'Ruby' started by Ryan Sobol, Jun 26, 2007.

  1. Ryan Sobol

    Ryan Sobol Guest

    This is a question is about the SslRequirement rails plugin. However,
    it's also about core concepts behind ruby modules.

    Here's the code for the plugin.

    http://pastie.caboo.se/73773

    Here's an example of how you use it.

    http://pastie.caboo.se/73774

    I've used this plugin all over the place in my app. But now, I want
    to do some performance testing on the app WITHOUT using https (mainly
    because I don't have control over port 443 on the test machine).
    Ideally, I want to add a toggle variable to the module that I can set
    from an environment file or application_controller if I must. What I
    don't want to do is go around the app and comment out all my
    ssl_required statements.

    I'm at a loss as where to inject this toggle, and whether it should be
    a class variable or class instance variable or maybe something
    completely different. Any and all advice is welcome.

    --RYAN

    PS - Yes, I've double posted this in the rails talk and ruby
    discussion groups.
    Ryan Sobol, Jun 26, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jiong Feng
    Replies:
    2
    Views:
    533
    Wade A. Hilmo [MS]
    Nov 29, 2003
  2. Daniel Ortmann
    Replies:
    4
    Views:
    571
    Skip Montanaro
    Jul 2, 2003
  3. Marcus Schneider
    Replies:
    2
    Views:
    331
    Michael Peuser
    Aug 16, 2003
  4. Bob Gailer
    Replies:
    2
    Views:
    297
    Marcus Schneider
    Aug 16, 2003
  5. Maric Michaud
    Replies:
    0
    Views:
    7,186
    Maric Michaud
    Jun 24, 2006
Loading...

Share This Page