Permalink
Browse files

Add config flag for ssl & ignore any .rvmrc files

  • Loading branch information...
1 parent 6a299d2 commit 6e99ec12b38336ead00a9b0deb906c310baafb6f @jc00ke jc00ke committed Feb 28, 2011
Showing with 17 additions and 2 deletions.
  1. +3 −0 .gitignore
  2. +3 −2 README.md
  3. +10 −0 lib/whereuat/configuration.rb
  4. +1 −0 lib/whereuat/rack_app.rb
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)

0 comments on commit 6e99ec1

Please sign in to comment.