forked from diegok/PhotoBooth
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add stackato-sso-workaround.rb
to switch Lobster font source to https when Stackato sso is enabled
- Loading branch information
Billy Tat
committed
Jul 14, 2014
1 parent
6441b35
commit 3e183ad
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require "json" | ||
|
||
sso_enabled = JSON.parse(ENV["VCAP_APPLICATION"])["sso_enabled"] | ||
|
||
file = "public/css/screen.css" | ||
|
||
# when sso is enabled use https for loading font from | ||
# http://fonts.googleapis.com/css?family=Lobster | ||
if sso_enabled | ||
text = File.read(file) | ||
text.gsub!("http://", "https://") | ||
File.open(file, "w") {|f| f.puts text} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ name: photobooth | |
|
||
framework: | ||
type: perl | ||
|
||
hooks: | ||
pre-running: ruby stackato-sso-workaround.rb |