Skip to content
A gem that decides whether to use TLS encryption or not on a per-environment basis in Rails.
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
Gemfile.lock
Guardfile
LICENSE
README.md
protocool.gemspec

README.md

Build Status

Protocool

Decides whether to use TLS encryption or not on a per-environment basis in Rails. Inspired by this discussion.

Installation

gem install protocool

Usage

Syntax

# In development mode:
Protcool.https   # => 'http'

# In any other environment:
Protcool.https   # => 'https'

Examples

In your routes:

scope constraints: { protocol: "#{Protocool.https}://" } do
  # ...
end
Something went wrong with that request. Please try again.