lib/exvo_helpers/helpers.rb in exvo_helpers-0.5.1 vs lib/exvo_helpers/helpers.rb in exvo_helpers-0.5.2

- old
+ new

@@ -9,11 +9,12 @@ # def self.cdn_uri # protocol = 'http://' # protocol = 'https://' if service == "auth" && auth_require_ssl # protocol = '//' if ["cdn", "cfs", "themes"].include?(service) && env.to_sym == :production - # protocol + cdn_host + # suffix = '/blog' if service == "blog" + # protocol + cdn_host + suffix.to_s # end define_method "#{service}_uri" do protocol = 'http://' # explicit https for auth @@ -21,11 +22,14 @@ # special link starting with '//' in production so that the webserver can choose between HTTP and HTTPS # but only for those apps/services that have proper SSL support (i.e. valid certificates) protocol = '//' if ["cdn", "cfs", "themes"].include?(service) && env.to_sym == :production - protocol + send("#{service}_host") + # blog now lives at http://www.exvo.com/blog, so adding '/blog' suffix is required + suffix = '/blog' if service == "blog" + + protocol + send("#{service}_host") + suffix.to_s end # def self.cdn_host # @@cdn_host ||= ENV['CDN_HOST'] || default_opts[env.to_sym][:cdn_host] # end @@ -190,13 +194,13 @@ :auth_host => 'auth.exvo.com', :auth_require_ssl => true, :sso_cookie_domain => 'exvo.com', :cdn_host => 'd33gjlr95u9pgf.cloudfront.net', # cloudfront.net so we can use https (cdn.exvo.com via https does not work properly) :cfs_host => 'cfs.exvo.com', - :desktop_host => 'www.exvo.com', + :desktop_host => 'home.exvo.com', :themes_host => 'themes.exvo.com', - :blog_host => 'blog.exvo.com', + :blog_host => 'www.exvo.com', :contacts_host => 'contacts.exvo.com', :inbox_host => 'inbox.exvo.com', :music_host => 'music.exvo.com', :pics_host => 'pics.exvo.com', :preview_host => 'preview.exvo.com', @@ -207,13 +211,13 @@ :auth_host => 'auth.exvo.co', :auth_require_ssl => false, :sso_cookie_domain => 'exvo.co', :cdn_host => 'd1by559a994699.cloudfront.net', :cfs_host => 'cfs.exvo.co', - :desktop_host => 'www.exvo.co', + :desktop_host => 'home.exvo.co', :themes_host => 'themes.exvo.co', - :blog_host => 'blog.exvo.co', + :blog_host => 'www.exvo.co', :contacts_host => 'contacts.exvo.co', :inbox_host => 'inbox.exvo.co', :music_host => 'music.exvo.co', :pics_host => 'pics.exvo.co', :preview_host => 'preview.exvo.co', @@ -222,15 +226,15 @@ :development => { :auth_debug => false, :auth_host => 'auth.exvo.local', :auth_require_ssl => false, :sso_cookie_domain => 'exvo.local', - :cdn_host => 'www.exvo.local', + :cdn_host => 'home.exvo.local', :cfs_host => 'cfs.exvo.local', - :desktop_host => 'www.exvo.local', + :desktop_host => 'home.exvo.local', :themes_host => 'themes.exvo.local', - :blog_host => 'blog.exvo.local', + :blog_host => 'www.exvo.local', :contacts_host => 'contacts.exvo.local', :inbox_host => 'inbox.exvo.local', :music_host => 'music.exvo.local', :pics_host => 'pics.exvo.local', :preview_host => 'preview.exvo.local', @@ -239,14 +243,14 @@ :test => { :auth_debug => false, :auth_host => 'auth.exvo.local', :auth_require_ssl => false, :sso_cookie_domain => 'exvo.local', - :cdn_host => 'www.exvo.local', + :cdn_host => 'home.exvo.local', :cfs_host => 'cfs.exvo.local', - :desktop_host => 'www.exvo.local', + :desktop_host => 'home.exvo.local', :themes_host => 'themes.exvo.local', - :blog_host => 'blog.exvo.local', + :blog_host => 'www.exvo.local', :contacts_host => 'contacts.exvo.local', :inbox_host => 'inbox.exvo.local', :music_host => 'music.exvo.local', :pics_host => 'pics.exvo.local', :preview_host => 'preview.exvo.local',