This file contains hidden or 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
    
  
  
    
  | module Rack | |
| class GoogleAnalytics | |
| TRACKING_CODE = <<-EOCODE | |
| <script type="text/javascript"> | |
| var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
| document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
| </script> | |
| <script type="text/javascript"> | |
| try { | |
| var pageTracker = _gat._getTracker("{{ID}}"); | 
  
    
      This file contains hidden or 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
    
  
  
    
  | module Rack | |
| class NoIE | |
| def initialize(app, options = {}) | |
| @app = app | |
| @options = options | |
| @options[:redirect] ||= 'http://www.microsoft.com/windows/internet-explorer/default.aspx' | |
| @options[:minimum] ||= 7.0 | |
| end | |
| def call(env) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | module Rack | |
| class RequestStatisticTracker | |
| def initialize(app) | |
| @app = app | |
| end | |
| def call(env) | |
| status, headers, response = @app.call(env) | |
| path = env['REQUEST_PATH'] || env['PATH_INFO'] | 
  
    
      This file contains hidden or 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
    
  
  
    
  | module Harmony | |
| # Allows accessing config variables from harmony.yml like so: | |
| # Harmony[:domain] => harmonyapp.com | |
| def self.[](key) | |
| unless @config | |
| raw_config = File.read(RAILS_ROOT + "/config/harmony.yml") | |
| @config = YAML.load(raw_config)[RAILS_ENV].symbolize_keys | |
| end | |
| @config[key] | |
| end | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # | |
| # = Rails Title Helper | |
| # | |
| # Provides helpers for managing page title. | |
| # | |
| # Category:: Rails | |
| # Package:: Helpers | |
| # Author:: Simone Carletti <[email protected]> | |
| # Copyright:: 2007-2008 The Authors | |
| # License:: MIT License | 
  
    
      This file contains hidden or 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
    
  
  
    
  | require(File.dirname(__FILE__) + '/../config/environment') unless defined?(Rails) | |
| class DbIndexes | |
| def initialize(app, message = "Database Indexes") | |
| @app = app | |
| @message = message | |
| end | |
| def call env | 
  
    
      This file contains hidden or 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
    
  
  
    
  | module Rack | |
| # A rack middleware for validating HTML via w3c validator | |
| class Validate | |
| def initialize( app ) | |
| @app = app | |
| end | |
| def call( env ) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # Hi! I'am rack middleware! | |
| # I was born for show right way to you JavaScript | |
| # My author's name was Aleksandr Koss. Mail him at [email protected] | |
| # Nice to MIT you! | |
| require(File.dirname(__FILE__) + '/../config/environment') unless defined?(Rails) | |
| class RoutesJs | |
| def initialize app, options = {} | 
  
    
      This file contains hidden or 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
    
  
  
    
  | require 'snip_snap' | |
| require 'hpricot' | |
| module Rack | |
| # = Rack::Snapshot | |
| # | |
| # Takes the image tags in your page and expands them using some of the popular | |
| # image sharing services. Currently supports these services: | |
| # |