Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Patch to use SSL #1

Open
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+17 −2
Split
View
@@ -20,3 +20,6 @@ pkg
## PROJECT::SPECIFIC
pivotal_config.dont_commit.rb
+
+## RVM
+.rvmrc
View
@@ -15,8 +15,9 @@ Create an initializer to add the Whereuat::RackApp to your middleware stack and
require 'whereuat'
Whereuat.configure do |config|
- config.pivotal_tracker_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
- config.pivotal_tracker_project = 123456
+ config.pivotal_tracker_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+ config.pivotal_tracker_project = 123456
+ config.use_ssl = true # defaults to false
end
Use the following helper somewhere in your application layout (we recommend at the end of the body):
@@ -2,5 +2,15 @@ module Whereuat
class Configuration
attr_accessor :pivotal_tracker_token
attr_accessor :pivotal_tracker_project
+ attr_reader :use_ssl
+
+ def initialize
+ @use_ssl = false
+ end
+
+ def use_ssl=(b)
+ @use_ssl = !!b
+ end
+
end
end
View
@@ -11,6 +11,7 @@ class RackApp
def initialize(app)
@app = app
PT::Client.token = config.pivotal_tracker_token
+ PT::Client.use_ssl = config.use_ssl
end
def call(env)