celluloid / reel

UNMAINTAINED: See celluloid/celluloid#779 - Celluloid::IO-powered web server
https://celluloid.io
MIT License
596 stars 87 forks source link

From switch to if/elsif/else in Server::SSL #124

Closed digitalextremist closed 9 years ago

digitalextremist commented 10 years ago

Per @tarcieri comment at https://github.com/celluloid/reel/pull/121#discussion-diff-8277201R29

ssl_context.verify_mode =
  case
  when options.include?(:verify_mode) then options[:verify_mode]
  when options.include?(:ca_file)     then OpenSSL::SSL::VERIFY_PEER
  when options.include?(:ca_path)     then OpenSSL::SSL::VERIFY_PEER
  else                                     OpenSSL::SSL::VERIFY_NONE
  end

The above ought to be more idiomatic, and done with if/elsif/else approach.

@stouset, can you refactor that? I believe that came as part of your recent upgrades to what is now Server::SSL?

digitalextremist commented 9 years ago

Released in 0.6.0.pre1